]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/slider.h
3 // Purpose: wxSlider class
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_SLIDER_H__
13 #define __WX_COCOA_SLIDER_H__
15 // #include "wx/cocoa/NSSlider.h"
17 // ========================================================================
19 // ========================================================================
20 class WXDLLEXPORT wxSlider
: public wxSliderBase
// , protected wxCocoaNSSlider
22 DECLARE_DYNAMIC_CLASS(wxSlider
)
24 // WX_DECLARE_COCOA_OWNER(NSSlider,NSControl,NSView)
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
30 wxSlider(wxWindow
*parent
, wxWindowID winid
,
31 int value
, int minValue
, int maxValue
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
34 long style
= wxSL_HORIZONTAL
,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxSliderNameStr
)
38 Create(parent
, winid
, value
, minValue
, maxValue
,
39 pos
, size
, style
, validator
, name
);
42 bool Create(wxWindow
*parent
, wxWindowID winid
,
43 int value
, int minValue
, int maxValue
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
46 long style
= wxSL_HORIZONTAL
,
47 const wxValidator
& validator
= wxDefaultValidator
,
48 const wxString
& name
= wxSliderNameStr
);
51 // ------------------------------------------------------------------------
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
57 // ------------------------------------------------------------------------
60 virtual int GetValue() const { return 0; }
61 virtual void SetValue(int value
) { }
63 // retrieve/change the range
64 virtual void SetRange(int minValue
, int maxValue
) { }
65 virtual int GetMin() const { return 0; }
66 virtual int GetMax() const { return 0; }
68 // the line/page size is the increment by which the slider moves when
69 // cursor arrow key/page up or down are pressed (clicking the mouse is like
70 // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range
71 virtual void SetLineSize(int lineSize
) { }
72 virtual void SetPageSize(int pageSize
) { }
73 virtual int GetLineSize() const { return 0; }
74 virtual int GetPageSize() const { return 0; }
76 // these methods get/set the length of the slider pointer in pixels
77 virtual void SetThumbLength(int lenPixels
) { }
78 virtual int GetThumbLength() const { return 0; }
83 // __WX_COCOA_SLIDER_H__