X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76b49cf49ba9ee9f3eeec9730cb4bc4569ab17f1..2ada746fb47bf68c9f2dab6399a6cd5510320984:/src/motif/toolbar.cpp diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index dc724b395e..cbb8223d82 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -29,11 +29,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/frame.h" + #include "wx/timer.h" + #include "wx/settings.h" #endif -#include "wx/settings.h" -#include "wx/timer.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif @@ -98,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(); } @@ -160,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() @@ -204,8 +204,9 @@ bool wxToolBar::Create(wxWindow *parent, if( !wxControl::CreateControl( parent, id, pos, size, style, wxDefaultValidator, name ) ) return false; + PreCreation(); - m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + FixupStyle(); Widget parentWidget = (Widget) parent->GetClientWidget(); @@ -230,8 +231,6 @@ bool wxToolBar::Create(wxWindow *parent, m_mainWidget = (WXWidget) toolbar; - ChangeFont(false); - wxPoint rPos = pos; wxSize rSize = size; @@ -240,11 +239,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; } @@ -380,7 +378,7 @@ bool wxToolBar::Realize() insensBmp = tool->GetDisabledBitmap(); if ( bmp.GetMask() || insensBmp.GetMask() ) { - int backgroundPixel; + WXPixel backgroundPixel; XtVaGetValues(button, XmNbackground, &backgroundPixel, NULL); @@ -403,7 +401,7 @@ bool wxToolBar::Realize() // Create a selected/toggled bitmap. If there isn't a 2nd // bitmap, we need to create it (with a darker, selected // background) - int backgroundPixel; + WXPixel backgroundPixel; if ( tool->CanBeToggled() ) XtVaGetValues(button, XmNselectColor, &backgroundPixel, NULL);