]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/scrolbar.cpp
removed rpmfiles.lst
[wxWidgets.git] / src / motif / scrolbar.cpp
index 0ceefef6b6b0226ea3e68d5213d11c1b60b3f371..e0a15b4a4ccdbfdd788b6d2e74a4923c14f29987 100644 (file)
@@ -13,6 +13,8 @@
 #pragma implementation "scrolbar.h"
 #endif
 
 #pragma implementation "scrolbar.h"
 #endif
 
+#include "wx/defs.h"
+
 #include "wx/scrolbar.h"
 
 #ifdef __VMS__
 #include "wx/scrolbar.h"
 
 #ifdef __VMS__
@@ -31,9 +33,7 @@
 static void wxScrollBarCallback(Widget widget, XtPointer clientData,
                         XmScaleCallbackStruct *cbs);
 
 static void wxScrollBarCallback(Widget widget, XtPointer clientData,
                         XmScaleCallbackStruct *cbs);
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
-#endif
 
 // Scrollbar
 bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
 
 // Scrollbar
 bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
@@ -87,8 +87,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
 
     m_mainWidget = (Widget) scrollBarWidget;
 
 
     m_mainWidget = (Widget) scrollBarWidget;
 
-    // This will duplicate other events
-    //    XtAddCallback(scrollBarWidget, XmNvalueChangedCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
+    XtAddCallback(scrollBarWidget, XmNvalueChangedCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
     XtAddCallback(scrollBarWidget, XmNdragCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
     XtAddCallback(scrollBarWidget, XmNdecrementCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
     XtAddCallback(scrollBarWidget, XmNincrementCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
     XtAddCallback(scrollBarWidget, XmNdragCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
     XtAddCallback(scrollBarWidget, XmNdecrementCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
     XtAddCallback(scrollBarWidget, XmNincrementCallback, (XtCallbackProc)wxScrollBarCallback, (XtPointer)this);
@@ -182,8 +181,8 @@ static void wxScrollBarCallback(Widget WXUNUSED(widget), XtPointer clientData,
                         XmScaleCallbackStruct *cbs)
 {
     wxScrollBar *scrollBar = (wxScrollBar *)clientData;
                         XmScaleCallbackStruct *cbs)
 {
     wxScrollBar *scrollBar = (wxScrollBar *)clientData;
-
     wxEventType eventType = wxEVT_NULL;
     wxEventType eventType = wxEVT_NULL;
+
     switch (cbs->reason)
     {
         case XmCR_INCREMENT:
     switch (cbs->reason)
     {
         case XmCR_INCREMENT:
@@ -203,9 +202,7 @@ static void wxScrollBarCallback(Widget WXUNUSED(widget), XtPointer clientData,
         }
         case XmCR_VALUE_CHANGED:
         {
         }
         case XmCR_VALUE_CHANGED:
         {
-            // TODO: Should this be intercepted too, or will it cause
-            // duplicate events?
-            eventType = wxEVT_SCROLL_THUMBTRACK;
+            eventType = wxEVT_SCROLL_THUMBRELEASE;
             break;
         }
         case XmCR_PAGE_INCREMENT:
             break;
         }
         case XmCR_PAGE_INCREMENT: