]>
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
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
);
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() const;
63 virtual void SetValue( int );
64 void SetRange( int minValue
, int maxValue
);
67 void SetTickFreq( int n
, int pos
);
68 int GetTickFreq() const;
69 void SetPageSize( int pageSize
);
70 int GetPageSize() const;
73 void SetLineSize( int lineSize
);
74 int GetLineSize() const;
75 int GetSelEnd() const;
76 int GetSelStart() const;
77 void SetSelection( int minPos
, int maxPos
);
78 void SetThumbLength( int len
);
79 int GetThumbLength() const;
80 void SetTick( int tickPos
);
85 bool IsOwnGtkWindow( GdkWindow
*window
);
86 void ApplyWidgetStyle();
88 GtkAdjustment
*m_adjust
;
92 DECLARE_DYNAMIC_CLASS(wxSlider
)
97 #endif // __GTKSLIDERH__