]>
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 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxSliderNameStr
)
37 Create(parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
42 bool Create(wxWindow
*parent
, wxWindowID id
,
43 int value
, int minValue
, int maxValue
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
46 long style
= wxSL_HORIZONTAL
,
48 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxSliderNameStr
);
52 virtual int GetValue() const ;
53 virtual void SetValue(int);
55 void GetSize(int *x
, int *y
) const ;
56 void GetPosition(int *x
, int *y
) const ;
60 void SetRange(int minValue
, int maxValue
);
62 inline int GetMin() const { return m_rangeMin
; }
63 inline int GetMax() const { return m_rangeMax
; }
65 void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
70 void SetTickFreq(int n
, int pos
);
71 inline int GetTickFreq() const { return m_tickFreq
; }
72 void SetPageSize(int pageSize
);
73 int GetPageSize() const ;
76 void SetLineSize(int lineSize
);
77 int GetLineSize() const ;
78 int GetSelEnd() const ;
79 int GetSelStart() const ;
80 void SetSelection(int minPos
, int maxPos
);
81 void SetThumbLength(int len
) ;
82 int GetThumbLength() const ;
83 void SetTick(int tickPos
) ;
86 WXHWND
GetStaticMin() const { return m_staticMin
; }
87 WXHWND
GetStaticMax() const { return m_staticMax
; }
88 WXHWND
GetEditValue() const { return m_staticValue
; }
89 virtual bool ContainsHWND(WXHWND hWnd
) const;
91 void Command(wxCommandEvent
& event
);
92 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
93 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
94 virtual bool OS2OnScroll(int orientation
, WXWORD wParam
,
95 WXWORD pos
, WXHWND control
);
100 WXHWND m_staticValue
;
107 virtual void DoSetSize(int x
, int y
,
108 int width
, int height
,
109 int sizeFlags
= wxSIZE_AUTO
);