diff options
author | Antonio Fernandez <antonio.fernandez@aentos.es> | 2012-09-24 13:11:45 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-11-14 13:52:54 +0100 |
commit | 30e4465c44cb729b9238f33c4f21dade2a83d6f1 (patch) | |
tree | 5d3dc8d4f8438835a41866480225409da0e11e64 /vcl/inc | |
parent | cf7908f875a6091e8fe8dd7bfe87dfbd9ac5078e (diff) |
Hidden items are not shown anymore.
Change-Id: I957c8c7690321be58e8daaf2fb65ebef136d95bc
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/salmenu.hxx | 6 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtksalmenu.hxx | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx index fcec96af5590..13f058c6047b 100644 --- a/vcl/inc/salmenu.hxx +++ b/vcl/inc/salmenu.hxx @@ -66,7 +66,7 @@ public: virtual ~SalMenu(); virtual sal_Bool VisibleMenuBar() = 0; // must return sal_True to actually DISPLAY native menu bars - // otherwise only menu messages are processed (eg, OLE on Windows) + // otherwise only menu messages are processed (eg, OLE on Windows) virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) = 0; virtual void RemoveItem( unsigned nPos ) = 0; @@ -82,7 +82,9 @@ public: virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure virtual void RemoveMenuBarButton( sal_uInt16 nId ); - virtual void SetItemCommand( unsigned nPos, SalMenuItem* pSalMenuItem, const rtl::OUString& aCommandStr ) {} + // FIXME: Make the other VCL native backends to work with these new methods. + virtual void SetItemCommand( unsigned, SalMenuItem*, const rtl::OUString& ) {} + virtual void ShowItem( unsigned nPos, sal_Bool bShow ) { EnableItem( nPos, bShow ); } virtual void Freeze() {} // return an empty rectangle if not implemented diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx index e9ffb017ff81..1c4a326485fd 100644 --- a/vcl/inc/unx/gtk/gtksalmenu.hxx +++ b/vcl/inc/unx/gtk/gtksalmenu.hxx @@ -69,6 +69,7 @@ public: virtual const GtkSalFrame* GetFrame() const; virtual void CheckItem( unsigned nPos, sal_Bool bCheck ); virtual void EnableItem( unsigned nPos, sal_Bool bEnable ); + virtual void ShowItem( unsigned nPos, sal_Bool bShow ); virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const rtl::OUString& rText ); virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage); virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const rtl::OUString& rKeyName ); @@ -85,6 +86,7 @@ public: virtual GtkSalMenuItem* GetItemAtPos( unsigned nPos ) { return maItems[ nPos ]; } virtual void SetActionGroup( GActionGroup* pActionGroup ) { mpActionGroup = pActionGroup; } virtual GActionGroup* GetActionGroup() { return mpActionGroup; } + virtual sal_Bool IsItemVisible( unsigned nPos ); void NativeSetItemText( unsigned nSection, unsigned nItemPos, const rtl::OUString& rText ); void NativeSetItemCommand( unsigned nSection, @@ -114,9 +116,10 @@ public: sal_uInt16 mnId; // Item ID MenuItemType mnType; // Item type - Menu* mpVCLMenu; // VCL Menu into which this MenuItem is inserted - GtkSalMenu* mpParentMenu; // The menu in which this menu item is inserted - GtkSalMenu* mpSubMenu; // Sub menu of this item (if defined) + sal_Bool mbVisible; // Item visibility. + Menu* mpVCLMenu; // VCL Menu into which this menu item is inserted + GtkSalMenu* mpParentMenu; // The menu into which this menu item is inserted + GtkSalMenu* mpSubMenu; // Submenu of this item (if defined) }; #endif // GTKSALMENU_HXX |