]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/scrolbar.cpp
Changed two conflicting defines in defs.h
[wxWidgets.git] / src / motif / scrolbar.cpp
index 10b670d40019b9a1d440bc8886bc4d429bb7e29c..f6f2df3d3635727e026d02a508b8ab0bf9be2d73 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     17/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -43,13 +43,13 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
     SetValidator(validator);
-    
+
     m_windowStyle = style;
 
     if ( id == -1 )
-           m_windowId = (int)NewControlId();
+        m_windowId = (int)NewControlId();
     else
-           m_windowId = id;
+        m_windowId = id;
 
     int x = pos.x;
     int y = pos.y;
@@ -148,23 +148,28 @@ 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();
 }
 
 static void wxScrollBarCallback(Widget widget, XtPointer clientData,