int proc = OS.kControlPopupArrowEastProc; if ((style & SWT.LEFT) != 0) proc = OS.kControlPopupArrowWestProc; if ((style & SWT.UP) != 0) proc = OS.kControlPopupArrowNorthProc; if ((style & SWT.DOWN) != 0) proc = OS.kControlPopupArrowSouthProc; handle= MacUtil.newControl(parentHandle, (short)proc);
handle= MacUtil.newControl(parentHandle, (short)OS.kControlBevelButtonNormalBevelProc);
void createHandle (int index) {	state |= HANDLE;	/* AW	int borderWidth = (style & SWT.BORDER) != 0 ? 1 : 0;	*/	int parentHandle = parent.handle;	/* ARROW button */	if ((style & SWT.ARROW) != 0) {        /*		int alignment = OS.XmARROW_UP;		if ((style & SWT.UP) != 0) alignment = OS.XmARROW_UP;		if ((style & SWT.DOWN) != 0) alignment = OS.XmARROW_DOWN;		if ((style & SWT.LEFT) != 0) alignment = OS.XmARROW_LEFT;		if ((style & SWT.RIGHT) != 0) alignment = OS.XmARROW_RIGHT;		int [] argList = {			OS.XmNtraversalOn, 0,			OS.XmNarrowDirection, alignment,			OS.XmNborderWidth, borderWidth,			OS.XmNancestorSensitive, 1,		};		handle = OS.XmCreateArrowButton (parentHandle, null, argList, argList.length / 2);        */        int proc = OS.kControlPopupArrowEastProc;        if ((style & SWT.LEFT) != 0) proc = OS.kControlPopupArrowWestProc;        if ((style & SWT.UP) != 0) proc = OS.kControlPopupArrowNorthProc;        if ((style & SWT.DOWN) != 0) proc = OS.kControlPopupArrowSouthProc;        handle= MacUtil.newControl(parentHandle, (short)proc);		if (handle == 0) error (SWT.ERROR_NO_HANDLES);        /* AW		if ((style & SWT.FLAT) != 0) {			int [] argList1 = {OS.XmNshadowThickness, 1};			OS.XtSetValues (handle, argList1, argList1.length / 2);		}        */		return;	}	/* Compute alignment */    /* AW	int alignment = OS.XmALIGNMENT_BEGINNING;	if ((style & SWT.CENTER) != 0) alignment = OS.XmALIGNMENT_CENTER;	if ((style & SWT.RIGHT) != 0) alignment = OS.XmALIGNMENT_END;    */	/* TOGGLE button */	if ((style & SWT.TOGGLE) != 0) {		/*		* Bug in Motif.  When XmNindicatorOn is set to false,		* Motif doesn't reset the shadow thickness to give a		* push button look.  The fix is to set the shadow		* thickness when ever this resource is changed.		*/        /* AW		Display display = getDisplay ();		int thickness = display.buttonShadowThickness;		int [] argList = {			OS.XmNancestorSensitive, 1,			OS.XmNrecomputeSize, 0,			OS.XmNindicatorOn, 0,			OS.XmNshadowThickness, (style & SWT.FLAT) != 0 ? 1 : thickness,			OS.XmNalignment, alignment,			OS.XmNborderWidth, borderWidth,		};		handle = OS.XmCreateToggleButton (parentHandle, null, argList, argList.length / 2);        */		handle= MacUtil.newControl(parentHandle, (short)0, OS.kControlBehaviorToggles, (short)0, OS.kControlBevelButtonNormalBevelProc);		if (handle == 0) error (SWT.ERROR_NO_HANDLES);		setFont(defaultFont());		return;	}	/* CHECK or RADIO button */	if ((style & (SWT.CHECK | SWT.RADIO)) != 0) {		/*		* Bug in Motif.  For some reason, a toggle button		* with XmNindicatorType XmONE_OF_MANY must have this		* value set at creation or the highlight color will		* not be correct.  The fix is to set these values		* on create.		*/        /* AW		int indicatorType = OS.XmONE_OF_MANY;		if ((style & SWT.CHECK) != 0) indicatorType = OS.XmN_OF_MANY;		int [] argList = {			OS.XmNancestorSensitive, 1,			OS.XmNrecomputeSize, 0,			OS.XmNindicatorType, indicatorType,			OS.XmNalignment, alignment,			OS.XmNborderWidth, borderWidth,		};		handle = OS.XmCreateToggleButton (parentHandle, null, argList, argList.length / 2);        */		short type= (style & SWT.CHECK) != 0					? OS.kControlCheckBoxAutoToggleProc					: OS.kControlRadioButtonAutoToggleProc;		handle= MacUtil.newControl(parentHandle, (short)0, (short)0, (short)100, type);		if (handle == 0) error (SWT.ERROR_NO_HANDLES);		setFont(defaultFont());		return;	}	/* PUSH button */    /* AW	int [] argList = {		OS.XmNancestorSensitive, 1,		OS.XmNrecomputeSize, 0,		OS.XmNalignment, alignment,		OS.XmNborderWidth, borderWidth,    */	short type= (style & SWT.FLAT) != 0					? OS.kControlBevelButtonNormalBevelProc					: OS.kControlPushButtonProc;    handle= MacUtil.newControl(parentHandle, type);	if (handle == 0) error (SWT.ERROR_NO_HANDLES);	setFont(defaultFont());	/* AW	if ((style & SWT.FLAT) != 0) {		int [] argList1 = {OS.XmNshadowThickness, 1};		OS.XtSetValues (handle, argList1, argList1.length / 2);	}	*/}