X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d408730ce4d27aeea9e798d887f4577a3c65f762..a20a357d928b6da93bc8b92193471f51a71127ba:/src/motif/toolbar.cpp?ds=sidebyside diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index 42851b1b38..75f4c0fbed 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -20,10 +20,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/toolbar.h" #ifndef WX_PRECOMP @@ -97,8 +93,8 @@ public: Init(); } - wxToolBarTool(wxToolBar *tbar, wxControl *control) - : wxToolBarToolBase(tbar, control) + wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label) + : wxToolBarToolBase(tbar, control, label) { Init(); } @@ -131,7 +127,7 @@ protected: // globals // ---------------------------------------------------------------------------- -static wxToolBarTimer* wxTheToolBarTimer = (wxToolBarTimer*) NULL; +static wxToolBarTimer* wxTheToolBarTimer = NULL; Widget wxToolBarTimer::help_popup = (Widget) 0; Widget wxToolBarTimer::buttonWidget = (Widget) 0; @@ -159,9 +155,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() @@ -203,11 +200,10 @@ bool wxToolBar::Create(wxWindow *parent, if( !wxControl::CreateControl( parent, id, pos, size, style, wxDefaultValidator, name ) ) return false; + PreCreation(); FixupStyle(); - m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); - Widget parentWidget = (Widget) parent->GetClientWidget(); Widget toolbar = XtVaCreateManagedWidget("toolbar", @@ -231,8 +227,6 @@ bool wxToolBar::Create(wxWindow *parent, m_mainWidget = (WXWidget) toolbar; - ChangeFont(false); - wxPoint rPos = pos; wxSize rSize = size; @@ -241,11 +235,10 @@ bool wxToolBar::Create(wxWindow *parent, if( rSize.x == -1 && GetParent() ) rSize.x = GetParent()->GetSize().x; + PostCreation(); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, rPos.x, rPos.y, rSize.x, rSize.y); - ChangeBackgroundColour(); - return true; } @@ -487,7 +480,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x), { wxFAIL_MSG( _T("TODO") ); - return (wxToolBarToolBase *)NULL; + return NULL; } bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool) @@ -659,7 +652,7 @@ wxToolBarToolBase *wxToolBar::FindToolByWidget(WXWidget w) const node = node->GetNext(); } - return (wxToolBarToolBase *)NULL; + return NULL; } static void wxToolButtonCallback(Widget w,