1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/slider.h
3 // Purpose: wxSlider class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by: Wlodzimierz ABX Skiba - native implementation
8 // Copyright: (c) William Osborne, Wlodzimierz Skiba
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _SLIDERPALM_H_
13 #define _SLIDERPALM_H_
16 class WXDLLIMPEXP_CORE wxSlider
: public wxSliderBase
24 wxSlider(wxWindow
*parent
, wxWindowID id
,
25 int value
, int minValue
, int maxValue
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
28 long style
= wxSL_HORIZONTAL
,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 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 SetRange(int minValue
, int maxValue
);
55 int GetTickFreq() const;
56 void SetPageSize(int pageSize
);
57 int GetPageSize() const;
60 void SetLineSize(int lineSize
);
61 int GetLineSize() const;
62 int GetSelEnd() const;
63 int GetSelStart() const;
64 void SetSelection(int minPos
, int maxPos
);
65 void SetThumbLength(int len
);
66 int GetThumbLength() const;
67 void SetTick(int tickPos
);
70 void Command(wxCommandEvent
& event
);
72 // send a notification event, return true if processed
73 bool SendUpdatedEvent();
74 bool SendScrollEvent(WXEVENTPTR event
);
77 // Platform-specific implementation of SetTickFreq
78 virtual void DoSetTickFreq(int freq
);
80 virtual wxSize
DoGetBestSize() const;
86 int m_oldPos
; // needed for tracing thumb position during scrolling
87 int m_oldValue
; // needed for comparing thumb position before and after scrolling
88 int m_lineSize
; // imitate line size
90 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider
)