]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/slider95.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSlider95 class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "slider95.h"
19 #include "wx/control.h"
21 WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr
;
24 class WXDLLEXPORT wxSlider95
: public wxControl
26 DECLARE_DYNAMIC_CLASS(wxSlider95
)
31 inline wxSlider95(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(void) const ;
53 virtual void SetValue(int);
55 void GetSize(int *x
, int *y
) const ;
56 wxSize
GetSize() const { return wxWindow::GetSize(); }
58 void SetSize(int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
59 void SetSize(const wxRect
& rect
, int sizeFlags
= wxSIZE_AUTO
)
60 { wxWindow::SetSize(rect
, sizeFlags
); }
61 void SetSize(const wxSize
& size
) { wxWindow::SetSize(size
); }
63 void GetPosition(int *x
, int *y
) const ;
64 wxPoint
GetPosition() const { return wxWindow::GetPosition(); }
68 void SetRange(int minValue
, int maxValue
);
70 inline int GetMin(void) const { return m_rangeMin
; }
71 inline int GetMax(void) const { return m_rangeMax
; }
74 void SetTickFreq(int n
, int pos
);
75 inline int GetTickFreq(void) const { return m_tickFreq
; }
76 void SetPageSize(int pageSize
);
77 int GetPageSize(void) const ;
79 void ClearTicks(void) ;
80 void SetLineSize(int lineSize
);
81 int GetLineSize(void) const ;
82 int GetSelEnd(void) const ;
83 int GetSelStart(void) const ;
84 void SetSelection(int minPos
, int maxPos
);
85 void SetThumbLength(int len
) ;
86 int GetThumbLength(void) const ;
87 void SetTick(int tickPos
) ;
90 inline WXHWND
GetStaticMin() const { return m_staticMin
; }
91 inline WXHWND
GetStaticMax() const { return m_staticMax
; }
92 inline WXHWND
GetEditValue() const { return m_staticValue
; }
93 virtual bool ContainsHWND(WXHWND hWnd
) const;
95 // Backward compatibility: translate to familiar wxEVT_COMMAND_SLIDER_UPDATED
96 #if WXWIN_COMPATIBILITY
97 void OnScroll(wxScrollEvent
& event
);
100 void Command(wxCommandEvent
& event
);
101 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
102 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
103 void MSWOnVScroll(WXWORD wParam
, WXWORD pos
, WXHWND control
);
104 void MSWOnHScroll(WXWORD wParam
, WXWORD pos
, WXHWND control
);
109 WXHWND m_staticValue
;
115 DECLARE_EVENT_TABLE()