]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/scrolbar.cpp
1. more keyboard navigation fixes - seems to work now
[wxWidgets.git] / src / motif / scrolbar.cpp
index 0f19d1e20f6e001310bebdba468c64238dd7a41c..5bd38a4ee53ba900df16bfffcca865c922f3a842 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <wx/motif/private.h>
 
-void wxScrollBarCallback(Widget widget, XtPointer clientData,
+static void wxScrollBarCallback(Widget widget, XtPointer clientData,
                         XmScaleCallbackStruct *cbs);
 
 #if !USE_SHARED_LIBRARY
@@ -102,7 +102,7 @@ wxScrollBar::~wxScrollBar()
 {
 }
 
-void wxScrollBar::SetPosition(int pos)
+void wxScrollBar::SetThumbPosition(int pos)
 {
        if (m_mainWidget)
        {
@@ -112,7 +112,7 @@ void wxScrollBar::SetPosition(int pos)
        }
 }
 
-int wxScrollBar::GetPosition() const
+int wxScrollBar::GetThumbPosition() const
 {
        if (m_mainWidget)
        {
@@ -148,26 +148,31 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
 
 void wxScrollBar::Command(wxCommandEvent& event)
 {
-    SetPosition(event.m_commandInt);
+    SetThumbPosition(event.m_commandInt);
     ProcessCommand(event);
 }
 
 void wxScrollBar::ChangeFont(bool keepOriginalSize)
 {
     // TODO
+    // Do anything for a scrollbar? A font will never be seen.
 }
 
 void wxScrollBar::ChangeBackgroundColour()
 {
-    // TODO
+    wxWindow::ChangeBackgroundColour();
+
+    XtVaSetValues ((Widget) GetMainWidget(),
+        XmNtroughColor, m_backgroundColour.AllocColour(XtDisplay((Widget) GetMainWidget())),
+        NULL);
 }
 
 void wxScrollBar::ChangeForegroundColour()
 {
-    // TODO
+    wxWindow::ChangeForegroundColour();
 }
 
-void wxScrollBarCallback(Widget widget, XtPointer clientData,
+static void wxScrollBarCallback(Widget widget, XtPointer clientData,
                         XmScaleCallbackStruct *cbs)
 {
     wxScrollBar *scrollBar = (wxScrollBar *)clientData;