merge the formfield patch from ooo-build
[ooovba.git] / vcl / win / inc / salmenu.h
blob2ff0759dab3b97eb8ef6c65eee0b18934f3a1243
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: salmenu.h,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SV_SALMENU_H
32 #define _SV_SALMENU_H
34 #include <vcl/sv.h>
35 #include <vcl/bitmap.hxx>
36 #include <vcl/salmenu.hxx>
39 class WinSalMenu : public SalMenu
41 public:
42 WinSalMenu();
43 virtual ~WinSalMenu();
44 virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars
45 // otherwise only menu messages are processed (eg, OLE on Windows)
47 virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos );
48 virtual void RemoveItem( unsigned nPos );
49 virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos );
50 virtual void SetFrame( const SalFrame* pFrame );
51 virtual void CheckItem( unsigned nPos, BOOL bCheck );
52 virtual void EnableItem( unsigned nPos, BOOL bEnable );
53 virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText );
54 virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage );
55 virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName );
56 virtual void GetSystemMenuData( SystemMenuData* pData );
58 HMENU mhMenu; // the menu handle
59 BOOL mbMenuBar; // true for menu bars
60 HWND mhWnd; // the window handle where the menubar is attached, may be NULL
61 WinSalMenu *mpParentMenu; // the parent menu
64 class WinSalMenuItem : public SalMenuItem
66 public:
67 WinSalMenuItem();
68 virtual ~WinSalMenuItem();
71 MENUITEMINFOW mInfo;
72 void* mpMenu; // pointer to corresponding VCL menu
73 XubString mText; // the item text
74 XubString mAccelText; // the accelerator string
75 Bitmap maBitmap; // item image
76 int mnId; // item id
77 WinSalMenu* mpSalMenu; // the menu where this item is inserted
80 #endif // _SV_SALMENU_H