X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d57be459406c2830f6abc9d99ae99166c6d133b..866592d872daa1f4e3d44948d7d3a6c90b0af9d0:/src/motif/scrolbar.cpp?ds=inline diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp index 3ac6967bf6..f6f2df3d36 100644 --- a/src/motif/scrolbar.cpp +++ b/src/motif/scrolbar.cpp @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -22,7 +22,7 @@ #include -void wxScrollBarCallback(Widget widget, XtPointer clientData, +static void wxScrollBarCallback(Widget widget, XtPointer clientData, XmScaleCallbackStruct *cbs); #if !USE_SHARED_LIBRARY @@ -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; @@ -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() +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;