]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/slider95.h
3 // Purpose: wxSlider class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "slider95.h"
20 class WXDLLEXPORT wxSlider
: public wxSliderBase
25 wxSlider(wxWindow
*parent
, wxWindowID id
,
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
)
33 Create(parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
38 bool Create(wxWindow
*parent
, wxWindowID id
,
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
);
46 virtual int GetValue() const;
47 virtual void SetValue(int);
49 void GetPosition(int *x
, int *y
) const;
51 bool Show(bool show
= TRUE
);
53 void SetRange(int minValue
, int maxValue
);
55 int GetMin() const { return m_rangeMin
; }
56 int GetMax() const { return m_rangeMax
; }
59 void SetTickFreq(int n
, int pos
);
60 int GetTickFreq() const { return m_tickFreq
; }
61 void SetPageSize(int pageSize
);
62 int GetPageSize() const;
65 void SetLineSize(int lineSize
);
66 int GetLineSize() const;
67 int GetSelEnd() const;
68 int GetSelStart() const;
69 void SetSelection(int minPos
, int maxPos
);
70 void SetThumbLength(int len
);
71 int GetThumbLength() const;
72 void SetTick(int tickPos
);
75 WXHWND
GetStaticMin() const { return m_staticMin
; }
76 WXHWND
GetStaticMax() const { return m_staticMax
; }
77 WXHWND
GetEditValue() const { return m_staticValue
; }
78 virtual bool ContainsHWND(WXHWND hWnd
) const;
80 void Command(wxCommandEvent
& event
);
81 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
82 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
83 virtual bool MSWOnScroll(int orientation
, WXWORD wParam
,
84 WXWORD pos
, WXHWND control
);
96 virtual void DoGetSize(int *width
, int *height
) const;
98 virtual void DoSetSize(int x
, int y
,
99 int width
, int height
,
100 int sizeFlags
= wxSIZE_AUTO
);
102 virtual wxSize
DoGetBestSize() const;
104 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider
)