]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/slider.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSlider class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/control.h"
17 WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr
;
20 class WXDLLEXPORT wxSlider
: public wxControl
22 DECLARE_DYNAMIC_CLASS(wxSlider
)
27 inline wxSlider(wxWindow
*parent
, wxWindowID id
,
28 int value
, int minValue
, int maxValue
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
,
31 long style
= wxSL_HORIZONTAL
,
33 # if defined(__VISAGECPP__)
34 const wxValidator
* validator
= wxDefaultValidator
,
36 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxSliderNameStr
)
41 Create(parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
46 bool Create(wxWindow
*parent
, wxWindowID id
,
47 int value
, int minValue
, int maxValue
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
,
50 long style
= wxSL_HORIZONTAL
,
52 # if defined(__VISAGECPP__)
53 const wxValidator
* validator
= wxDefaultValidator
,
55 const wxValidator
& validator
= wxDefaultValidator
,
58 const wxString
& name
= wxSliderNameStr
);
60 virtual int GetValue() const ;
61 virtual void SetValue(int);
63 void GetSize(int *x
, int *y
) const ;
64 void GetPosition(int *x
, int *y
) const ;
68 void SetRange(int minValue
, int maxValue
);
70 inline int GetMin() const { return m_rangeMin
; }
71 inline int GetMax() const { return m_rangeMax
; }
73 void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
78 void SetTickFreq(int n
, int pos
);
79 inline int GetTickFreq() const { return m_tickFreq
; }
80 void SetPageSize(int pageSize
);
81 int GetPageSize() const ;
84 void SetLineSize(int lineSize
);
85 int GetLineSize() const ;
86 int GetSelEnd() const ;
87 int GetSelStart() const ;
88 void SetSelection(int minPos
, int maxPos
);
89 void SetThumbLength(int len
) ;
90 int GetThumbLength() const ;
91 void SetTick(int tickPos
) ;
94 WXHWND
GetStaticMin() const { return m_staticMin
; }
95 WXHWND
GetStaticMax() const { return m_staticMax
; }
96 WXHWND
GetEditValue() const { return m_staticValue
; }
97 virtual bool ContainsHWND(WXHWND hWnd
) const;
99 void Command(wxCommandEvent
& event
);
100 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
101 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
102 virtual bool OS2OnScroll(int orientation
, WXWORD wParam
,
103 WXWORD pos
, WXHWND control
);
108 WXHWND m_staticValue
;
115 virtual void DoSetSize(int x
, int y
,
116 int width
, int height
,
117 int sizeFlags
= wxSIZE_AUTO
);