diff --git a/include/wx/taskbarbutton.h b/include/wx/taskbarbutton.h index 3aaf5aadca..5436e41488 100644 --- a/include/wx/taskbarbutton.h +++ b/include/wx/taskbarbutton.h @@ -75,8 +75,7 @@ public: void Hide() { Show(false); } bool IsInteractive() const { return m_interactive; } - void EnableInteractive(bool interactive = true); - void DisableInteractive() { EnableInteractive(false); } + void SetInteractive(bool interactive = true); void SetParent(wxTaskBarButton *parent) { m_taskBarButtonParent = parent; } wxTaskBarButton* GetParent() const { return m_taskBarButtonParent; } diff --git a/interface/wx/taskbarbutton.h b/interface/wx/taskbarbutton.h index c4b6a10c7e..b44bbe089f 100644 --- a/interface/wx/taskbarbutton.h +++ b/interface/wx/taskbarbutton.h @@ -94,34 +94,77 @@ public: const wxIcon& GetIcon() const; /** - Return the tooltip. + Returns the tooltip. */ const wxString& GetTooltip() const; /** - Return @true if the button is enabled, @false if it has been disabled. + Returns @true if the button is enabled, @false if it has been disabled. */ bool IsEnable() const; /** - Return @true if the button will dismiss on click. + Enables or disables the thumbnail toolbar button. + */ + void Enable(bool enable = true); + + /** + Equivalent to calling wxThumbBarButton::Enable(false). + */ + void Disable(); + + /** + Returns @true if the button will dismiss on click. */ bool IsDismissOnClick() const; /** - Return @true if the button has button border. + Whether the window thumbnail is dismissed after a button click. + */ + void EnableDismissOnClick(bool enable = true); + + /** + Equivalent to calling wxThumbBarButton::DisableDimissOnClick(false). + */ + void DisableDimissOnClick(); + + /** + Returns @true if the button has button border. */ bool HasBackground() const; + /** + Set the property that whether the button has background. + */ + void SetHasBackground(bool has = true); + /** Returns @true if the button is shown, @false if it has been hidden. */ bool IsShown() const; /** - Return @true if the button is interactive. + Show or hide the thumbnail toolbar button. + */ + void Show(bool shown = true); + + /** + Hide the thumbnail toolbar button. Equivalent to calling wxThumbBarButton::Show(false). + */ + void Hide(); + + /** + Returns @true if the button is interactive. */ bool IsInteractive() const; + + /** + Set the property which holds whether the button is interactive. + + A non-interactive thumbnail toolbar button does not react to user + interaction, but is still visually enabled. + */ + void SetInteractive(bool interactive = true); }; /** diff --git a/src/msw/taskbarbutton.cpp b/src/msw/taskbarbutton.cpp index 2f168b0d8a..c05751a2b8 100644 --- a/src/msw/taskbarbutton.cpp +++ b/src/msw/taskbarbutton.cpp @@ -130,7 +130,7 @@ void wxThumbBarButton::Show(bool shown) } } -void wxThumbBarButton::EnableInteractive(bool interactive) +void wxThumbBarButton::SetInteractive(bool interactive) { if ( m_interactive != interactive ) {