diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-28 11:48:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-28 12:22:52 +0100 |
commit | 94af3da7e11e82c4ed2d59655e246b5201c18709 (patch) | |
tree | a5c07d6b7d0d9420722b4112dc36820fea11a81c /include/vcl | |
parent | 6dc8f25ecf676a2e4d1a1018b729fef4096df8e7 (diff) |
rename and explain the MENUBUTTON_MENUMODE_TIMED stuff
Change-Id: Ifc6ddfb0cc249e537c01f28bab84b42c6b1577d9
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/menubtn.hxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx index 6063c5a61f78..f5056c1a5f9c 100644 --- a/include/vcl/menubtn.hxx +++ b/include/vcl/menubtn.hxx @@ -28,8 +28,6 @@ class PopupMenu; class VclBuilder; class VclSimpleEvent; -#define MENUBUTTON_MENUMODE_TIMED ((sal_uInt16)0x0001) - class VCL_DLLPUBLIC MenuButton : public PushButton { private: @@ -38,7 +36,7 @@ private: Timer* mpMenuTimer; VclPtr<PopupMenu> mpMenu; sal_uInt16 mnCurItemId; - sal_uInt16 mnMenuMode; + bool mbDelayMenu; Link<MenuButton*,void> maActivateHdl; Link<MenuButton*,void> maSelectHdl; @@ -65,7 +63,13 @@ public: void ExecuteMenu(); - void SetMenuMode(sal_uInt16 nMode) { mnMenuMode = nMode; } + //if false then the whole button launches the menu + //if true, then the button has a separator + //where the right portion launches the menu immediately + //where the left portion activates the underlying Button handlers + //before launching the menu in an idle, allowing it to be cancelled + //before being shown + void SetDelayMenu(bool bDelay) { mbDelayMenu = bDelay; } void SetPopupMenu( PopupMenu* pNewMenu ); PopupMenu* GetPopupMenu() const { return mpMenu; } |