]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/slider.h
Added wxQuantize, wxSplashScreen, wxEffects & added palette to wxImage
[wxWidgets.git] / include / wx / mac / slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: slider.h
3 // Purpose: wxSlider class
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SLIDER_H_
13 #define _WX_SLIDER_H_
14
15 #ifdef __GNUG__
16 #pragma interface "slider.h"
17 #endif
18
19 #include "wx/control.h"
20
21 WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
22
23 // Slider
24 class WXDLLEXPORT wxSlider: public wxControl
25 {
26 DECLARE_DYNAMIC_CLASS(wxSlider)
27
28 public:
29 wxSlider();
30
31 inline wxSlider(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)
38 {
39 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
40 }
41
42 ~wxSlider();
43
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);
51
52 virtual int GetValue() const ;
53 virtual void SetValue(int);
54 bool Show(bool show);
55
56 void SetRange(int minValue, int maxValue);
57
58 inline int GetMin() const { return m_rangeMin; }
59 inline int GetMax() const { return m_rangeMax; }
60
61 // For trackbars only
62 void SetTickFreq(int n, int pos);
63 inline int GetTickFreq() const { return m_tickFreq; }
64 void SetPageSize(int pageSize);
65 int GetPageSize() const ;
66 void ClearSel() ;
67 void ClearTicks() ;
68 void SetLineSize(int lineSize);
69 int GetLineSize() const ;
70 int GetSelEnd() const ;
71 int GetSelStart() const ;
72 void SetSelection(int minPos, int maxPos);
73 void SetThumbLength(int len) ;
74 int GetThumbLength() const ;
75 void SetTick(int tickPos) ;
76
77 void Command(wxCommandEvent& event);
78 void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ;
79 protected:
80 wxStaticText* m_macMinimumStatic ;
81 wxStaticText* m_macMaximumStatic ;
82 wxStaticText* m_macValueStatic ;
83
84 int m_rangeMin;
85 int m_rangeMax;
86 int m_pageSize;
87 int m_lineSize;
88 int m_tickFreq;
89 DECLARE_EVENT_TABLE()
90 };
91
92 #endif
93 // _WX_SLIDER_H_