- button = XtVaCreateWidget("toggleButton",
- xmToggleButtonWidgetClass, (Widget) m_mainWidget,
- XmNx, currentX, XmNy, currentY,
- // XmNpushButtonEnabled, True,
- XmNmultiClick, XmMULTICLICK_KEEP,
- XmNlabelType, XmPIXMAP,
- NULL);
- XtAddCallback ((Widget) button, XmNvalueChangedCallback, (XtCallbackProc) wxToolButtonCallback,
- (XtPointer) this);
-
- XtVaSetValues ((Widget) button,
- XmNselectColor, m_backgroundColour.AllocColour(XtDisplay((Widget) button)),
- NULL);
- }
- else
- {
- button = XtVaCreateWidget("button",
- xmPushButtonWidgetClass, (Widget) m_mainWidget,
- XmNx, currentX, XmNy, currentY,
- XmNpushButtonEnabled, True,
- XmNmultiClick, XmMULTICLICK_KEEP,
- XmNlabelType, XmPIXMAP,
- NULL);
- XtAddCallback (button,
- XmNactivateCallback, (XtCallbackProc) wxToolButtonCallback,
- (XtPointer) this);
+ wxControl* control = tool->GetControl();
+ wxSize sz = control->GetSize();
+ wxPoint pos = control->GetPosition();
+ control->Move(currentX, pos.y);
+ currentX += sz.x + packing;
+
+ break;