X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b28757f5e64bac68d9b159240616fc4d9ad66bc..31e39e3c51f0a14a49ba86a5326e1461ad60dfee:/src/motif/toolbar.cpp diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index fec5196fb1..b38f1c3929 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -21,6 +21,10 @@ #pragma implementation "toolbar.h" #endif +#ifdef __VMS +#define XtDisplay XTDISPLAY +#endif + #include "wx/wx.h" #include "wx/app.h" #include "wx/timer.h" @@ -47,7 +51,7 @@ // ---------------------------------------------------------------------------- #if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase) #endif // ---------------------------------------------------------------------------- @@ -251,6 +255,7 @@ bool wxToolBar::Realize() // Separator spacing const int separatorSize = GetToolSeparation(); // 8; wxSize margins = GetToolMargins(); + int packing = GetToolPacking(); int marginX = margins.x; int marginY = margins.y; @@ -273,9 +278,15 @@ bool wxToolBar::Realize() switch ( tool->GetStyle() ) { case wxTOOL_STYLE_CONTROL: - wxFAIL_MSG( _T("not implemented") ); - break; + { + wxControl* control = tool->GetControl(); + wxSize sz = control->GetSize(); + wxPoint pos = control->GetPosition(); + control->Move(currentX, pos.y); + currentX += sz.x + packing; + break; + } case wxTOOL_STYLE_SEPARATOR: currentX += separatorSize; break; @@ -441,7 +452,7 @@ bool wxToolBar::Realize() XmNwidth, &width, XmNheight, & height, NULL); - currentX += width + marginX; + currentX += width + packing; buttonHeight = wxMax(buttonHeight, height); }