]> git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/slider.h
wxButton, wxCheckBox, wxSlider, wxToggleButton native implementations for PalmOS.
[wxWidgets.git] / include / wx / palmos / slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/slider95.h
3 // Purpose: wxSlider class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by: Wlodzimierz ABX Skiba - native implementation
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne, Wlodzimierz Skiba
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
49 void GetPosition(int *x, int *y) const;
50
51 void SetRange(int minValue, int maxValue);
52
53 int GetMin() const;
54 int GetMax() const;
55
56 // For trackbars only
57 void SetTickFreq(int n, int pos);
58 int GetTickFreq() const { return GetPageSize(); }
59 void SetPageSize(int pageSize);
60 int GetPageSize() const;
61 void ClearSel();
62 void ClearTicks();
63 void SetLineSize(int lineSize);
64 int GetLineSize() const;
65 int GetSelEnd() const;
66 int GetSelStart() const;
67 void SetSelection(int minPos, int maxPos);
68 void SetThumbLength(int len);
69 int GetThumbLength() const;
70 void SetTick(int tickPos);
71
72 // implementation
73 void Command(wxCommandEvent& event);
74
75 protected:
76 virtual void DoGetSize(int *width, int *height) const;
77
78 virtual void DoSetSize(int x, int y,
79 int width, int height,
80 int sizeFlags = wxSIZE_AUTO);
81
82 virtual wxSize DoGetBestSize() const;
83
84 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider)
85 };
86
87 #endif
88 // _SLIDER95_H_