+WXWidget wxWindow::DoCreateScrollBar(WXWidget parent,
+ wxOrientation orientation,
+ void (*callback)())
+{
+ int orient = ( orientation & wxHORIZONTAL ) ? XmHORIZONTAL : XmVERTICAL;
+ Widget sb =
+ XtVaCreateManagedWidget( "scrollBarWidget",
+ xmScrollBarWidgetClass, (Widget)parent,
+ XmNorientation, orient,
+ XmNincrement, 1,
+ XmNvalue, 0,
+ NULL );
+
+ XtPointer o = (XtPointer)orientation;
+ XtCallbackProc cb = (XtCallbackProc)callback;
+
+ XtAddCallback( sb, XmNvalueChangedCallback, cb, o );
+ XtAddCallback( sb, XmNdragCallback, cb, o );
+ XtAddCallback( sb, XmNincrementCallback, cb, o );
+ XtAddCallback( sb, XmNdecrementCallback, cb, o );
+ XtAddCallback( sb, XmNpageIncrementCallback, cb, o );
+ XtAddCallback( sb, XmNpageDecrementCallback, cb, o );
+ XtAddCallback( sb, XmNtoTopCallback, cb, o );
+ XtAddCallback( sb, XmNtoBottomCallback, cb, o );
+
+ return (WXWidget)sb;
+}
+