]>
Commit | Line | Data |
---|---|---|
ffecfa5a JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/palmos/slider95.h | |
3 | // Purpose: wxSlider class | |
e1d63b79 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
bdb54365 | 5 | // Modified by: Wlodzimierz ABX Skiba - native implementation |
ffecfa5a | 6 | // Created: 10/13/04 |
e1d63b79 | 7 | // RCS-ID: $Id$ |
bdb54365 | 8 | // Copyright: (c) William Osborne, Wlodzimierz Skiba |
ffecfa5a JS |
9 | // Licence: wxWindows licence |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _SLIDER95_H_ | |
13 | #define _SLIDER95_H_ | |
14 | ||
15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
16 | #pragma interface "slider95.h" | |
17 | #endif | |
18 | ||
19 | // Slider | |
20 | class WXDLLEXPORT wxSlider : public wxSliderBase | |
21 | { | |
22 | public: | |
23 | wxSlider(); | |
24 | ||
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) | |
32 | { | |
33 | Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); | |
34 | } | |
35 | ||
36 | ~wxSlider(); | |
37 | ||
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); | |
45 | ||
46 | virtual int GetValue() const; | |
47 | virtual void SetValue(int); | |
48 | ||
ffecfa5a JS |
49 | void SetRange(int minValue, int maxValue); |
50 | ||
bdb54365 WS |
51 | int GetMin() const; |
52 | int GetMax() const; | |
ffecfa5a JS |
53 | |
54 | // For trackbars only | |
55 | void SetTickFreq(int n, int pos); | |
bdb54365 | 56 | int GetTickFreq() const { return GetPageSize(); } |
ffecfa5a JS |
57 | void SetPageSize(int pageSize); |
58 | int GetPageSize() const; | |
59 | void ClearSel(); | |
60 | void ClearTicks(); | |
61 | void SetLineSize(int lineSize); | |
62 | int GetLineSize() const; | |
63 | int GetSelEnd() const; | |
64 | int GetSelStart() const; | |
65 | void SetSelection(int minPos, int maxPos); | |
66 | void SetThumbLength(int len); | |
67 | int GetThumbLength() const; | |
68 | void SetTick(int tickPos); | |
69 | ||
bdb54365 | 70 | // implementation |
ffecfa5a | 71 | void Command(wxCommandEvent& event); |
ffecfa5a | 72 | |
9a727a3b WS |
73 | // send a notification event, return true if processed |
74 | bool SendUpdatedEvent(); | |
75 | ||
ffecfa5a | 76 | protected: |
ffecfa5a | 77 | virtual wxSize DoGetBestSize() const; |
e1d63b79 | 78 | |
ffecfa5a JS |
79 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider) |
80 | }; | |
81 | ||
82 | #endif | |
83 | // _SLIDER95_H_ |