]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/slider.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKSLIDERH__
12 #define __GTKSLIDERH__
19 #include "wx/object.h"
21 #include "wx/control.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 extern const char *wxSliderNameStr
;
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 class wxSlider
: public wxControl
41 DECLARE_DYNAMIC_CLASS(wxSlider
)
45 inline wxSlider( wxWindow
*parent
, wxWindowID id
,
46 int value
, int minValue
, int maxValue
,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
,
49 long style
= wxSL_HORIZONTAL
,
50 const wxValidator
& validator
= wxDefaultValidator
,
51 const wxString
& name
= wxSliderNameStr
)
53 Create( parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
56 bool Create(wxWindow
*parent
, wxWindowID id
,
57 int value
, int minValue
, int maxValue
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
60 long style
= wxSL_HORIZONTAL
,
61 const wxValidator
& validator
= wxDefaultValidator
,
62 const wxString
& name
= wxSliderNameStr
);
63 virtual int GetValue(void) const;
64 virtual void SetValue( int );
65 void SetRange( int minValue
, int maxValue
);
66 int GetMin(void) const;
67 int GetMax(void) const;
68 void SetTickFreq( int n
, int pos
);
69 int GetTickFreq(void) const;
70 void SetPageSize( int pageSize
);
71 int GetPageSize(void) const;
73 void ClearTicks(void);
74 void SetLineSize( int lineSize
);
75 int GetLineSize(void) const;
76 int GetSelEnd(void) const;
77 int GetSelStart(void) const;
78 void SetSelection( int minPos
, int maxPos
);
79 void SetThumbLength( int len
);
80 int GetThumbLength(void) const;
81 void SetTick( int tickPos
);
85 bool IsOwnGtkWindow( GdkWindow
*window
);
86 void ApplyWidgetStyle();
88 GtkAdjustment
*m_adjust
;
93 #endif // __GTKSLIDERH__