Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already allow to disable the "Close" button using EnableCloseButton(). Currently implemented for MSW and OSX only. Closes #17133.
This commit is contained in:
committed by
Vadim Zeitlin
parent
6055d8d0a5
commit
fe9a5f47f4
@@ -68,6 +68,8 @@ public:
|
||||
// wxMSW only: EnableCloseButton(false) may be used to remove the "Close"
|
||||
// button from the title bar
|
||||
virtual bool EnableCloseButton(bool enable = true);
|
||||
virtual bool EnableMaximizeButton(bool enable = true) wxOVERRIDE;
|
||||
virtual bool EnableMinimizeButton(bool enable = true) wxOVERRIDE;
|
||||
|
||||
// Set window transparency if the platform supports it
|
||||
virtual bool SetTransparent(wxByte alpha);
|
||||
|
@@ -232,6 +232,8 @@ public :
|
||||
virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ;
|
||||
|
||||
virtual bool EnableCloseButton(bool enable) wxOVERRIDE;
|
||||
virtual bool EnableMaximizeButton(bool enable) wxOVERRIDE;
|
||||
virtual bool EnableMinimizeButton(bool enable) wxOVERRIDE;
|
||||
|
||||
virtual bool IsMaximized() const;
|
||||
|
||||
|
@@ -848,6 +848,8 @@ public :
|
||||
virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) = 0;
|
||||
|
||||
virtual bool EnableCloseButton(bool enable) = 0;
|
||||
virtual bool EnableMaximizeButton(bool enable) = 0;
|
||||
virtual bool EnableMinimizeButton(bool enable) = 0;
|
||||
|
||||
virtual bool IsMaximized() const = 0;
|
||||
|
||||
|
@@ -77,6 +77,8 @@ public:
|
||||
// EnableCloseButton(false) used to disable the "Close"
|
||||
// button on the title bar
|
||||
virtual bool EnableCloseButton(bool enable = true) wxOVERRIDE;
|
||||
virtual bool EnableMaximizeButton(bool enable = true) wxOVERRIDE;
|
||||
virtual bool EnableMinimizeButton(bool enable = true) wxOVERRIDE;
|
||||
|
||||
virtual void SetLabel(const wxString& label) { SetTitle( label ); }
|
||||
virtual wxString GetLabel() const { return GetTitle(); }
|
||||
|
@@ -206,6 +206,8 @@ public:
|
||||
|
||||
// enable/disable close button [x]
|
||||
virtual bool EnableCloseButton(bool WXUNUSED(enable) = true) { return false; }
|
||||
virtual bool EnableMaximizeButton(bool WXUNUSED(enable) = true) { return false; }
|
||||
virtual bool EnableMinimizeButton(bool WXUNUSED(enable) = true) { return false; }
|
||||
|
||||
// Attracts the users attention to this window if the application is
|
||||
// inactive (should be called when a background event occurs)
|
||||
|
Reference in New Issue
Block a user