// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#include <Xm/RowColumn.h>
#include <Xm/ScrollBar.h>
-#include <wx/motif/private.h>
+#include "wx/motif/private.h"
static void wxScrollBarCallback(Widget widget, XtPointer clientData,
XmScaleCallbackStruct *cbs);
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;
{
}
-void wxScrollBar::SetPosition(int pos)
+void wxScrollBar::SetThumbPosition(int pos)
{
if (m_mainWidget)
{
}
}
-int wxScrollBar::GetPosition() const
+int wxScrollBar::GetThumbPosition() const
{
if (m_mainWidget)
{
}
void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize,
- bool refresh)
+ bool WXUNUSED(refresh))
{
m_viewSize = pageSize;
m_pageSize = thumbSize;
void wxScrollBar::Command(wxCommandEvent& event)
{
- SetPosition(event.m_commandInt);
+ SetThumbPosition(event.m_commandInt);
ProcessCommand(event);
}
-void wxScrollBar::ChangeFont(bool keepOriginalSize)
+void wxScrollBar::ChangeFont(bool WXUNUSED(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,
+static void wxScrollBarCallback(Widget WXUNUSED(widget), XtPointer clientData,
XmScaleCallbackStruct *cbs)
{
wxScrollBar *scrollBar = (wxScrollBar *)clientData;