]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/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__
21 #include "wx/object.h"
23 #include "wx/control.h"
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 extern const char *wxSliderNameStr
;
37 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
41 class wxSlider
: public wxControl
43 DECLARE_DYNAMIC_CLASS(wxSlider
)
47 inline wxSlider( wxWindow
*parent
, wxWindowID id
,
48 int value
, int minValue
, int maxValue
,
49 const wxPoint
& pos
= wxDefaultPosition
,
50 const wxSize
& size
= wxDefaultSize
,
51 long style
= wxSL_HORIZONTAL
,
52 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxSliderNameStr
)
55 Create( parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
58 bool Create(wxWindow
*parent
, wxWindowID id
,
59 int value
, int minValue
, int maxValue
,
60 const wxPoint
& pos
= wxDefaultPosition
,
61 const wxSize
& size
= wxDefaultSize
,
62 long style
= wxSL_HORIZONTAL
,
63 const wxValidator
& validator
= wxDefaultValidator
,
64 const wxString
& name
= wxSliderNameStr
);
65 virtual int GetValue(void) const;
66 virtual void SetValue( int );
67 void SetRange( int minValue
, int maxValue
);
68 int GetMin(void) const;
69 int GetMax(void) const;
70 void SetTickFreq( int n
, int pos
);
71 int GetTickFreq(void) const;
72 void SetPageSize( int pageSize
);
73 int GetPageSize(void) const;
75 void ClearTicks(void);
76 void SetLineSize( int lineSize
);
77 int GetLineSize(void) const;
78 int GetSelEnd(void) const;
79 int GetSelStart(void) const;
80 void SetSelection( int minPos
, int maxPos
);
81 void SetThumbLength( int len
);
82 int GetThumbLength(void) const;
83 void SetTick( int tickPos
);
87 bool IsOwnGtkWindow( GdkWindow
*window
);
88 void ApplyWidgetStyle();
90 GtkAdjustment
*m_adjust
;
97 #endif // __GTKSLIDERH__