From 07d02e9ee0fe990aeb81e152a668d0011659b5c7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 18 Mar 2007 23:57:20 +0000 Subject: [PATCH] fixed all the other ports broken by controls labels in wxToolBar patch commit git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cocoa/toolbar.h | 3 ++- include/wx/gtk/tbargtk.h | 9 +++++---- include/wx/gtk1/tbargtk.h | 3 ++- include/wx/motif/toolbar.h | 3 ++- include/wx/msw/wince/tbarwce.h | 3 ++- include/wx/os2/toolbar.h | 3 ++- include/wx/palmos/toolbar.h | 3 ++- src/cocoa/toolbar.mm | 9 +++++---- src/gtk/tbargtk.cpp | 9 +++++---- src/gtk1/tbargtk.cpp | 9 +++++---- src/motif/toolbar.cpp | 9 +++++---- src/os2/toolbar.cpp | 4 ++++ src/palmos/toolbar.cpp | 9 +++++---- 13 files changed, 46 insertions(+), 30 deletions(-) diff --git a/include/wx/cocoa/toolbar.h b/include/wx/cocoa/toolbar.h index 6371c261de..09ca34917b 100644 --- a/include/wx/cocoa/toolbar.h +++ b/include/wx/cocoa/toolbar.h @@ -103,7 +103,8 @@ protected: wxObject *clientData, const wxString& shortHelpString, const wxString& longHelpString); - virtual wxToolBarToolBase *CreateTool(wxControl *control); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); wxSize m_bestSize; wxFrame *m_owningFrame; diff --git a/include/wx/gtk/tbargtk.h b/include/wx/gtk/tbargtk.h index bcf5da4a0d..279f5e924e 100644 --- a/include/wx/gtk/tbargtk.h +++ b/include/wx/gtk/tbargtk.h @@ -54,10 +54,10 @@ public: virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap); virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap); - + static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - + // implementation from now on // -------------------------- @@ -75,7 +75,7 @@ protected: void GtkSetStyle(); virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; - + // implement base class pure virtuals virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); @@ -92,7 +92,8 @@ protected: wxObject *clientData, const wxString& shortHelpString, const wxString& longHelpString); - virtual wxToolBarToolBase *CreateTool(wxControl *control); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); private: DECLARE_DYNAMIC_CLASS(wxToolBar) diff --git a/include/wx/gtk1/tbargtk.h b/include/wx/gtk1/tbargtk.h index 5891f42aa5..9055c1fc1e 100644 --- a/include/wx/gtk1/tbargtk.h +++ b/include/wx/gtk1/tbargtk.h @@ -87,7 +87,8 @@ protected: wxObject *clientData, const wxString& shortHelpString, const wxString& longHelpString); - virtual wxToolBarToolBase *CreateTool(wxControl *control); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); private: DECLARE_DYNAMIC_CLASS(wxToolBar) diff --git a/include/wx/motif/toolbar.h b/include/wx/motif/toolbar.h index ca6a14377f..c577b02a8f 100644 --- a/include/wx/motif/toolbar.h +++ b/include/wx/motif/toolbar.h @@ -69,7 +69,8 @@ private: wxObject *clientData, const wxString& shortHelp, const wxString& longHelp); - virtual wxToolBarToolBase *CreateTool(wxControl *control); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); virtual void DoSetSize(int x, int y, int width, int height, diff --git a/include/wx/msw/wince/tbarwce.h b/include/wx/msw/wince/tbarwce.h index 616b5c8234..a32bab2f4e 100644 --- a/include/wx/msw/wince/tbarwce.h +++ b/include/wx/msw/wince/tbarwce.h @@ -63,7 +63,8 @@ protected: wxObject *clientData, const wxString& shortHelp, const wxString& longHelp); - virtual wxToolBarToolBase *CreateTool(wxControl *control); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); private: DECLARE_EVENT_TABLE() diff --git a/include/wx/os2/toolbar.h b/include/wx/os2/toolbar.h index 24adde3e98..77617a36ad 100644 --- a/include/wx/os2/toolbar.h +++ b/include/wx/os2/toolbar.h @@ -165,7 +165,8 @@ protected: ,const wxString& rsShortHelp ,const wxString& rsLongHelp ); - virtual wxToolBarToolBase* CreateTool(wxControl* pControl); + virtual wxToolBarToolBase* CreateTool(wxControl* pControl, + const wxString& label); // // Helpers diff --git a/include/wx/palmos/toolbar.h b/include/wx/palmos/toolbar.h index 217b79125f..4e4d85455e 100644 --- a/include/wx/palmos/toolbar.h +++ b/include/wx/palmos/toolbar.h @@ -83,7 +83,8 @@ protected: wxObject *clientData, const wxString& shortHelp, const wxString& longHelp); - virtual wxToolBarToolBase *CreateTool(wxControl *control); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); // return the appropriate size and flags for the toolbar control virtual wxSize DoGetBestSize() const; diff --git a/src/cocoa/toolbar.mm b/src/cocoa/toolbar.mm index f6211e3c79..7d923ed9c2 100644 --- a/src/cocoa/toolbar.mm +++ b/src/cocoa/toolbar.mm @@ -60,8 +60,8 @@ public: CreateButtonCell(); } - wxToolBarTool(wxToolBar *tbar, wxControl *control) - : wxToolBarToolBase(tbar, control) + wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label) + : wxToolBarToolBase(tbar, control, label) { Init(); } @@ -208,9 +208,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int toolid, clientData, shortHelpString, longHelpString); } -wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) +wxToolBarToolBase * +wxToolBar::CreateTool(wxControl *control, const wxString& label) { - return new wxToolBarTool(this, control); + return new wxToolBarTool(this, control, label); } void wxToolBar::SetWindowStyleFlag( long style ) diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 8ba9d4ef1f..86fda2bd50 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -91,8 +91,8 @@ public: Init(); } - wxToolBarTool(wxToolBar *tbar, wxControl *control) - : wxToolBarToolBase(tbar, control) + wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label) + : wxToolBarToolBase(tbar, control, label) { Init(); } @@ -269,9 +269,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int id, clientData, shortHelpString, longHelpString); } -wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) +wxToolBarToolBase * +wxToolBar::CreateTool(wxControl *control, const wxString& label) { - return new wxToolBarTool(this, control); + return new wxToolBarTool(this, control, label); } //----------------------------------------------------------------------------- diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index fab29b7cfe..462561c522 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -88,8 +88,8 @@ public: Init(); } - wxToolBarTool(wxToolBar *tbar, wxControl *control) - : wxToolBarToolBase(tbar, control) + wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label) + : wxToolBarToolBase(tbar, control, label) { Init(); } @@ -246,9 +246,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int id, clientData, shortHelpString, longHelpString); } -wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) +wxToolBarToolBase * +wxToolBar::CreateTool(wxControl *control, const wxString& label) { - return new wxToolBarTool(this, control); + return new wxToolBarTool(this, control, label); } //----------------------------------------------------------------------------- diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index 42851b1b38..98619468b5 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -97,8 +97,8 @@ public: Init(); } - wxToolBarTool(wxToolBar *tbar, wxControl *control) - : wxToolBarToolBase(tbar, control) + wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label) + : wxToolBarToolBase(tbar, control, label) { Init(); } @@ -159,9 +159,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int id, } -wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) +wxToolBarToolBase * +wxToolBar::CreateTool(wxControl *control, const wxString& label) { - return new wxToolBarTool(this, control); + return new wxToolBarTool(this, control, label); } void wxToolBarTool::Init() diff --git a/src/os2/toolbar.cpp b/src/os2/toolbar.cpp index 230adb16e8..40e61c1be4 100644 --- a/src/os2/toolbar.cpp +++ b/src/os2/toolbar.cpp @@ -60,8 +60,10 @@ public: inline wxToolBarTool( wxToolBar* pTbar ,wxControl* pControl + ,const wxString& label ) : wxToolBarToolBase( pTbar ,pControl + ,label ) { } @@ -128,10 +130,12 @@ wxToolBarToolBase* wxToolBar::CreateTool( wxToolBarToolBase *wxToolBar::CreateTool( wxControl* pControl +, const wxString& label ) { return new wxToolBarTool( this ,pControl + ,label ); } // end of wxToolBarSimple::CreateTool diff --git a/src/palmos/toolbar.cpp b/src/palmos/toolbar.cpp index af18c32293..886cdcbb70 100644 --- a/src/palmos/toolbar.cpp +++ b/src/palmos/toolbar.cpp @@ -112,8 +112,8 @@ public: { } - wxToolBarTool(wxToolBar *tbar, wxControl *control) - : wxToolBarToolBase(tbar, control) + wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label) + : wxToolBarToolBase(tbar, control, label) { } @@ -154,9 +154,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int id, clientData, shortHelp, longHelp); } -wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) +wxToolBarToolBase * +wxToolBar::CreateTool(wxControl *control, const wxString& label) { - return new wxToolBarTool(this, control); + return new wxToolBarTool(this, control, label); } // ---------------------------------------------------------------------------- -- 2.45.2