xref: /aoo42x/main/vcl/inc/os2/salmenu.h (revision 77438bbc)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SV_SALMENU_H
25 #define _SV_SALMENU_H
26 
27 #include <vcl/bitmap.hxx>
28 #include <salmenu.hxx>
29 
30 #define INIAPP_XWPHOOK              "XWorkplace:Hook"
31 #define INIKEY_HOOK_CONFIG          "Config"
32 
33 typedef struct _HOOKCONFIG
34 {
35 	PM_BOOL         __fSlidingFocus;
36 	ULONG           __ulSlidingFocusDelay;
37 	PM_BOOL         __fSlidingBring2Top;
38 	PM_BOOL         __fSlidingIgnoreDesktop;
39 	PM_BOOL         __fSlidingIgnoreSeamless;
40 	HOBJECT         ahobjDummy[4];
41 	PM_BYTE         bMonitorDrives[30];
42 	PM_BOOL         fChordWinList;
43 	PM_BOOL         fSysMenuMB2TitleBar;
44 	PM_BOOL         fMB3Scroll;
45 	PM_BOOL         fMB3ScrollReverse;
46 	USHORT          usScrollMode;
47 	USHORT          usMB3ScrollMin;
48 	SHORT           sAmplification;
49 	PM_BOOL         __fAutoHideMouse;
50 	ULONG           __ulAutoHideDelay;
51 	PM_BOOL         __fGlobalHotkeys;
52 	PM_BOOL         fRemoved1, fRemoved2;
53 	PM_BOOL         fSlidingMenus;
54 	ULONG           ulSubmenuDelay;
55 	PM_BOOL         fMenuImmediateHilite;
56 	PM_BOOL         fMB3Click2MB1DblClk;
57 	HOBJECT         ahobjHotCornerObjects[8];
58 	PM_BOOL         fConditionalCascadeSensitive;
59 	PM_BOOL         fRemoved3;
60 	ULONG           ulCornerSensitivity;
61 	PM_BOOL         fMB3AutoScroll;
62 	PM_BOOL         fMB3Push2Bottom;
63 	ULONG           __ulAutoHideFlags;
64 	PM_BOOL         __fAutoMoveMouse;
65 	ULONG           __ulAutoMoveFlags;
66 	ULONG           __ulAutoMoveDelay;
67 	ULONG           __ulMouseMappingsCount;
68 } HOOKCONFIG, *PHOOKCONFIG;
69 #pragma pack()
70 
71 class Os2SalMenu : public SalMenu
72 {
73 public:
Os2SalMenu()74 	Os2SalMenu() {}
75 	virtual ~Os2SalMenu();
76 
77     virtual sal_Bool VisibleMenuBar();  // must return TRUE to actually DISPLAY native menu bars
78                             // otherwise only menu messages are processed (eg, OLE on Windows)
79 
80     virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos );
81     virtual void RemoveItem( unsigned nPos );
82     virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos );
83     virtual void SetFrame( const SalFrame* pFrame );
84     virtual void CheckItem( unsigned nPos, sal_Bool bCheck );
85     virtual void EnableItem( unsigned nPos, sal_Bool bEnable );
86     virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText );
87     virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage);
88     virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName );
89     virtual void GetSystemMenuData( SystemMenuData* pData );
90 };
91 
92 class Os2SalMenuItem : public SalMenuItem
93 {
94 public:
Os2SalMenuItem()95 	Os2SalMenuItem() {}
96         virtual ~Os2SalMenuItem();
97 };
98 
99 #endif // _SV_SALMENU_H
100 
101