- if (tool->m_isToggle)
- {
- button = XtVaCreateManagedWidget("toggleButton",
- xmToggleButtonWidgetClass, (Widget) m_mainWidget,
- XmNleftAttachment, (prevButton == (Widget) 0) ? XmATTACH_FORM : XmATTACH_WIDGET,
- XmNleftWidget, (prevButton == (Widget) 0) ? NULL : prevButton,
- XmNleftOffset, currentSpacing,
- XmNtopAttachment, XmATTACH_FORM,
- // XmNpushButtonEnabled, True,
- XmNmultiClick, XmMULTICLICK_KEEP,
- XmNlabelType, XmPIXMAP,
- NULL);
- XtAddCallback ((Widget) button, XmNvalueChangedCallback, (XtCallbackProc) wxToolButtonCallback,
- (XtPointer) this);
- }
- else
- {
- button = XtVaCreateManagedWidget("button",
- xmPushButtonWidgetClass, (Widget) m_mainWidget,
- XmNleftAttachment, (prevButton == (Widget) 0) ? XmATTACH_FORM : XmATTACH_WIDGET,
- XmNleftWidget, (prevButton == (Widget) 0) ? NULL : prevButton,
- XmNleftOffset, currentSpacing,
- XmNtopAttachment, XmATTACH_FORM,
- XmNpushButtonEnabled, True,
- XmNmultiClick, XmMULTICLICK_KEEP,
- XmNlabelType, XmPIXMAP,
- NULL);
- XtAddCallback (button,
- XmNactivateCallback, (XtCallbackProc) wxToolButtonCallback,
- (XtPointer) this);
- }