-// ----------------------------------------------------------------------------
-// callbacks
-// ----------------------------------------------------------------------------
-
-// TODO: implement wxWindow scrollbar, presumably using wxScrollBar
-#if 0
-static void wxScrollBarCallback(Widget scrollbar,
- XtPointer clientData,
- XmScrollBarCallbackStruct *cbs)
-{
- wxWindow *win = wxGetWindowFromTable(scrollbar);
- int orientation = (int) clientData;
-
- wxEventType eventType = wxEVT_NULL;
- switch (cbs->reason)
- {
- case XmCR_INCREMENT:
- {
- eventType = wxEVT_SCROLLWIN_LINEDOWN;
- break;
- }
- case XmCR_DECREMENT:
- {
- eventType = wxEVT_SCROLLWIN_LINEUP;
- break;
- }
- case XmCR_DRAG:
- {
- eventType = wxEVT_SCROLLWIN_THUMBTRACK;
- break;
- }
- case XmCR_VALUE_CHANGED:
- {
- eventType = wxEVT_SCROLLWIN_THUMBRELEASE;
- break;
- }
- case XmCR_PAGE_INCREMENT:
- {
- eventType = wxEVT_SCROLLWIN_PAGEDOWN;
- break;
- }
- case XmCR_PAGE_DECREMENT:
- {
- eventType = wxEVT_SCROLLWIN_PAGEUP;
- break;
- }
- case XmCR_TO_TOP:
- {
- eventType = wxEVT_SCROLLWIN_TOP;
- break;
- }
- case XmCR_TO_BOTTOM:
- {
- eventType = wxEVT_SCROLLWIN_BOTTOM;
- break;
- }
- default:
- {
- // Should never get here
- wxFAIL_MSG("Unknown scroll event.");
- break;
- }
- }
-
- wxScrollWinEvent event(eventType,
- cbs->value,
- ((orientation == XmHORIZONTAL) ?
- wxHORIZONTAL : wxVERTICAL));
- event.SetEventObject( win );
- win->GetEventHandler()->ProcessEvent(event);
-}
-#endif
-