1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 #include <vcl/bitmap.hxx>
24 #include <salmenu.hxx>
26 class WinSalMenu
: public SalMenu
30 virtual ~WinSalMenu();
31 virtual sal_Bool
VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars
32 // otherwise only menu messages are processed (eg, OLE on Windows)
34 virtual void InsertItem( SalMenuItem
* pSalMenuItem
, unsigned nPos
);
35 virtual void RemoveItem( unsigned nPos
);
36 virtual void SetSubMenu( SalMenuItem
* pSalMenuItem
, SalMenu
* pSubMenu
, unsigned nPos
);
37 virtual void SetFrame( const SalFrame
* pFrame
);
38 virtual void CheckItem( unsigned nPos
, sal_Bool bCheck
);
39 virtual void EnableItem( unsigned nPos
, sal_Bool bEnable
);
40 virtual void SetItemText( unsigned nPos
, SalMenuItem
* pSalMenuItem
, const OUString
& rText
);
41 virtual void SetItemImage( unsigned nPos
, SalMenuItem
* pSalMenuItem
, const Image
& rImage
);
42 virtual void SetAccelerator( unsigned nPos
, SalMenuItem
* pSalMenuItem
, const KeyCode
& rKeyCode
, const OUString
& rKeyName
);
43 virtual void GetSystemMenuData( SystemMenuData
* pData
);
45 HMENU mhMenu
; // the menu handle
46 sal_Bool mbMenuBar
; // true for menu bars
47 HWND mhWnd
; // the window handle where the menubar is attached, may be NULL
48 WinSalMenu
*mpParentMenu
; // the parent menu
51 class WinSalMenuItem
: public SalMenuItem
55 virtual ~WinSalMenuItem();
59 void* mpMenu
; // pointer to corresponding VCL menu
60 XubString mText
; // the item text
61 XubString mAccelText
; // the accelerator string
62 Bitmap maBitmap
; // item image
64 WinSalMenu
* mpSalMenu
; // the menu where this item is inserted
67 #endif // _SV_SALMENU_H
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */