- Widget button = (Widget) 0;
-
- if (tool->m_isToggle)
- {
- 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);
- }
- 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);
- }
-
- // For each button, if there is a mask, we must create
- // a new wxBitmap that has the correct background colour
- // for the button. Otherwise the background will just be
- // e.g. black if a transparent XPM has been loaded.
- wxBitmap originalBitmap = tool->m_bitmap1;
-
- if (tool->m_bitmap1.GetMask())