From 596065ff05165f5b59cfcfdcee09166931455e19 Mon Sep 17 00:00:00 2001 From: Akshay Deep Date: Sun, 19 Jun 2016 14:38:54 +0530 Subject: GSoC tdf#87697 START CENTER: Indicate selected thumbnailview Added new "Active" state to PushButton class Active state used in MenuToggleButton class. Active => Pressed + Flyover When hovered in Active state, Active => Flyover only Change-Id: Iece1550b6d742a7ab3c9f4c7516ec855e1a1b6ef Reviewed-on: https://gerrit.libreoffice.org/26470 Reviewed-by: Akshay Deep Tested-by: Akshay Deep --- include/vcl/button.hxx | 1 + include/vcl/menubtn.hxx | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'include') diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 0fb7c98e72c6..a020bd6769e8 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -120,6 +120,7 @@ protected: PushButtonDropdownStyle mnDDStyle; bool mbPressed; bool mbInUserDraw; + bool mbIsActive; SAL_DLLPRIVATE void ImplInitPushButtonData(); SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ); diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx index 8d8438fac58b..0e57668037f4 100644 --- a/include/vcl/menubtn.hxx +++ b/include/vcl/menubtn.hxx @@ -78,6 +78,16 @@ public: void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } }; + +class VCL_DLLPUBLIC MenuToggleButton : public MenuButton +{ +public: + explicit MenuToggleButton( vcl::Window* pParent, WinBits nStyle = 0 ); + virtual ~MenuToggleButton(); + + void SetActive( bool bSel ); +}; + #endif // INCLUDED_VCL_MENUBTN_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit