m_maxHeight = -1;
m_defaultWidth = 24;
m_defaultHeight = 22;
+ m_toolPacking = 2;
+ m_toolSeparation = 8;
+ m_xMargin = 2;
+ m_yMargin = 2;
+ m_maxRows = 100;
+ m_maxCols = 100;
}
bool wxToolBar::Create(wxWindow *parent,
// Separator spacing
const int separatorSize = GetToolSeparation(); // 8;
wxSize margins = GetToolMargins();
+ int packing = GetToolPacking();
int marginX = margins.x;
int marginY = margins.y;
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;
XmNwidth, &width,
XmNheight, & height,
NULL);
- currentX += width + marginX;
+ currentX += width + packing;
buttonHeight = wxMax(buttonHeight, height);
}