]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/slider.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSlider class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "slider.h"
19 #include "wx/control.h"
21 WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr
;
24 class WXDLLEXPORT wxSlider
: public wxControl
26 DECLARE_DYNAMIC_CLASS(wxSlider
)
31 inline wxSlider(wxWindow
*parent
, wxWindowID id
,
32 int value
, int minValue
, int maxValue
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
,
35 long style
= wxSL_HORIZONTAL
,
36 const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxSliderNameStr
)
39 Create(parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
44 bool Create(wxWindow
*parent
, wxWindowID id
,
45 int value
, int minValue
, int maxValue
,
46 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxSize
& size
= wxDefaultSize
,
48 long style
= wxSL_HORIZONTAL
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxSliderNameStr
);
52 virtual int GetValue() const ;
53 virtual void SetValue(int);
54 void GetSize(int *x
, int *y
) const ;
55 wxSize
GetSize() const { return wxWindow::GetSize(); }
57 void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
58 void SetSize(const wxRect
& rect
, int sizeFlags
= wxSIZE_AUTO
)
59 { wxWindow::SetSize(rect
, sizeFlags
); }
60 void SetSize(const wxSize
& size
) { wxWindow::SetSize(size
); }
62 void SetRange(int minValue
, int maxValue
);
64 inline int GetMin() const { return m_rangeMin
; }
65 inline int GetMax() const { return m_rangeMax
; }
68 void SetTickFreq(int n
, int pos
);
69 inline int GetTickFreq() const { return m_tickFreq
; }
70 void SetPageSize(int pageSize
);
71 int GetPageSize() const ;
74 void SetLineSize(int lineSize
);
75 int GetLineSize() const ;
76 int GetSelEnd() const ;
77 int GetSelStart() const ;
78 void SetSelection(int minPos
, int maxPos
);
79 void SetThumbLength(int len
) ;
80 int GetThumbLength() const ;
81 void SetTick(int tickPos
) ;
83 void Command(wxCommandEvent
& event
);
86 virtual void ChangeFont(bool keepOriginalSize
= TRUE
);
87 virtual void ChangeBackgroundColour();
88 virtual void ChangeForegroundColour();