]>
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 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKSLIDERH__
11 #define __GTKSLIDERH__
18 #include "wx/object.h"
20 #include "wx/control.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 extern const char *wxSliderNameStr
;
34 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 class wxSlider
: public wxControl
40 DECLARE_DYNAMIC_CLASS(wxSlider
)
44 inline wxSlider( 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
)
52 Create( parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
55 bool Create(wxWindow
*parent
, wxWindowID id
,
56 int value
, int minValue
, int maxValue
,
57 const wxPoint
& pos
= wxDefaultPosition
,
58 const wxSize
& size
= wxDefaultSize
,
59 long style
= wxSL_HORIZONTAL
,
60 const wxValidator
& validator
= wxDefaultValidator
,
61 const wxString
& name
= wxSliderNameStr
);
62 virtual int GetValue(void) const;
63 virtual void SetValue( int );
64 void SetRange( int minValue
, int maxValue
);
65 int GetMin(void) const;
66 int GetMax(void) const;
67 void SetTickFreq( int n
, int pos
);
68 int GetTickFreq(void) const;
69 void SetPageSize( int pageSize
);
70 int GetPageSize(void) const;
72 void ClearTicks(void);
73 void SetLineSize( int lineSize
);
74 int GetLineSize(void) const;
75 int GetSelEnd(void) const;
76 int GetSelStart(void) const;
77 void SetSelection( int minPos
, int maxPos
);
78 void SetThumbLength( int len
);
79 int GetThumbLength(void) const;
80 void SetTick( int tickPos
);
84 bool IsOwnGtkWindow( GdkWindow
*window
);
85 void ApplyWidgetStyle();
87 GtkAdjustment
*m_adjust
;
92 #endif // __GTKSLIDERH__