]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/slider.h
Expand tabs
[wxWidgets.git] / include / wx / cocoa / slider.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/slider.h
3// Purpose: wxSlider class
4// Author: David Elliott
5// Modified by:
6// Created: 2003/06/19
7// RCS-ID: $Id$
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __WX_COCOA_SLIDER_H__
13#define __WX_COCOA_SLIDER_H__
14
15// #include "wx/cocoa/NSSlider.h"
16
17// ========================================================================
18// wxSlider
19// ========================================================================
20class WXDLLEXPORT wxSlider: public wxSliderBase// , protected wxCocoaNSSlider
21{
22 DECLARE_DYNAMIC_CLASS(wxSlider)
23 DECLARE_EVENT_TABLE()
24// WX_DECLARE_COCOA_OWNER(NSSlider,NSControl,NSView)
25// ------------------------------------------------------------------------
26// initialization
27// ------------------------------------------------------------------------
28public:
29 wxSlider() { }
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)
37 {
38 Create(parent, winid, value, minValue, maxValue,
39 pos, size, style, validator, name);
40 }
41
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);
49 virtual ~wxSlider();
50
51// ------------------------------------------------------------------------
52// Cocoa callbacks
53// ------------------------------------------------------------------------
54protected:
55// ------------------------------------------------------------------------
56// Implementation
57// ------------------------------------------------------------------------
58public:
59 // Pure Virtuals
60 virtual int GetValue() const { return 0; }
61 virtual void SetValue(int value) { }
62
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; }
67
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; }
75
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; }
79
80};
81
82#endif // __WX_COCOA_SLIDER_H__