]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/slider.h
wxOverlay compile fix
[wxWidgets.git] / include / wx / motif / slider.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
925f7740 2// Name: wx/motif/slider.h
9b6dbb09
JS
3// Purpose: wxSlider class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
925f7740 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SLIDER_H_
13#define _WX_SLIDER_H_
14
9b6dbb09
JS
15#include "wx/control.h"
16
9b6dbb09 17// Slider
93e73c74 18class WXDLLEXPORT wxSlider: public wxSliderBase
9b6dbb09 19{
83df96d6 20 DECLARE_DYNAMIC_CLASS(wxSlider)
925f7740 21
9b6dbb09 22public:
bfc6fde4 23 wxSlider();
925f7740 24
bfc6fde4 25 wxSlider(wxWindow *parent, wxWindowID id,
83df96d6
JS
26 int value, int minValue, int maxValue,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxSL_HORIZONTAL,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxSliderNameStr)
bfc6fde4
VZ
32 {
33 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
34 }
925f7740 35
d3c7fc99 36 virtual ~wxSlider();
925f7740 37
bfc6fde4 38 bool Create(wxWindow *parent, wxWindowID id,
83df96d6
JS
39 int value, int minValue, int maxValue,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxSL_HORIZONTAL,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxSliderNameStr);
925f7740 45
bfc6fde4
VZ
46 virtual int GetValue() const ;
47 virtual void SetValue(int);
925f7740 48
bfc6fde4 49 void SetRange(int minValue, int maxValue);
925f7740 50
bfc6fde4
VZ
51 inline int GetMin() const { return m_rangeMin; }
52 inline int GetMax() const { return m_rangeMax; }
925f7740 53
bfc6fde4 54 // For trackbars only
bfc6fde4
VZ
55 void SetPageSize(int pageSize);
56 int GetPageSize() const ;
bfc6fde4
VZ
57 void SetLineSize(int lineSize);
58 int GetLineSize() const ;
bfc6fde4
VZ
59 void SetThumbLength(int len) ;
60 int GetThumbLength() const ;
925f7740 61
bfc6fde4 62 void Command(wxCommandEvent& event);
925f7740 63
bfc6fde4
VZ
64protected:
65 int m_rangeMin;
66 int m_rangeMax;
67 int m_pageSize;
68 int m_lineSize;
925f7740 69
bfc6fde4 70 virtual void DoSetSize(int x, int y,
83df96d6
JS
71 int width, int height,
72 int sizeFlags = wxSIZE_AUTO);
925f7740 73
bfc6fde4
VZ
74private:
75 DECLARE_EVENT_TABLE()
9b6dbb09
JS
76};
77
78#endif
83df96d6 79// _WX_SLIDER_H_