Add wxInfoBar::RemoveButton() method.
Also change the GTK implementation to use a separate wxInfoBarGTKImpl to store its data, this object won't be even allocated if a generic implementation is used under GTK. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,6 +43,7 @@ public:
|
||||
|
||||
virtual void AddButton(wxWindowID btnid, const wxString& label = wxString());
|
||||
|
||||
virtual void RemoveButton(wxWindowID btnid);
|
||||
|
||||
// methods specific to this version
|
||||
// --------------------------------
|
||||
|
@@ -44,6 +44,8 @@ public:
|
||||
virtual void AddButton(wxWindowID btnid,
|
||||
const wxString& label = wxString());
|
||||
|
||||
virtual void RemoveButton(wxWindowID btnid);
|
||||
|
||||
// implementation only
|
||||
// -------------------
|
||||
|
||||
@@ -53,9 +55,11 @@ protected:
|
||||
virtual bool GTKShouldConnectSizeRequest() const { return false; }
|
||||
|
||||
private:
|
||||
void Init() { m_label = NULL; }
|
||||
void Init() { m_impl = NULL; }
|
||||
|
||||
GtkWidget *m_label;
|
||||
|
||||
// only used when the native implementation is really being used
|
||||
class wxInfoBarGTKImpl *m_impl;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxInfoBar);
|
||||
};
|
||||
|
@@ -40,6 +40,9 @@ public:
|
||||
virtual void AddButton(wxWindowID btnid,
|
||||
const wxString& label = wxString()) = 0;
|
||||
|
||||
// remove a button previously added by AddButton()
|
||||
virtual void RemoveButton(wxWindowID btnid) = 0;
|
||||
|
||||
private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxInfoBarBase);
|
||||
};
|
||||
|
Reference in New Issue
Block a user