]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/slider.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKSLIDERH__
13 #define __GTKSLIDERH__
20 #include "wx/object.h"
22 #include "wx/control.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 extern const char *wxSliderNameStr
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxSlider
: public wxControl
42 DECLARE_DYNAMIC_CLASS(wxSlider
)
46 inline wxSlider( wxWindow
*parent
, wxWindowID id
,
47 int value
, int minValue
, int maxValue
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
,
50 long style
= wxSL_HORIZONTAL
,
51 const wxValidator
& validator
= wxDefaultValidator
,
52 const wxString
& name
= wxSliderNameStr
)
54 Create( parent
, id
, value
, minValue
, maxValue
, pos
, size
, style
, validator
, name
);
57 bool Create(wxWindow
*parent
, wxWindowID id
,
58 int value
, int minValue
, int maxValue
,
59 const wxPoint
& pos
= wxDefaultPosition
,
60 const wxSize
& size
= wxDefaultSize
,
61 long style
= wxSL_HORIZONTAL
,
62 const wxValidator
& validator
= wxDefaultValidator
,
63 const wxString
& name
= wxSliderNameStr
);
64 virtual int GetValue(void) const;
65 virtual void SetValue( int );
66 void GetSize( int *x
, int *y
) const;
67 void SetSize( int x
, int y
, int width
, int height
, int sizeFlags
= wxSIZE_AUTO
);
68 void GetPosition( int *x
, int *y
) const;
69 void SetRange( int minValue
, int maxValue
);
70 int GetMin(void) const;
71 int GetMax(void) const;
72 void SetTickFreq( int n
, int pos
);
73 int GetTickFreq(void) const;
74 void SetPageSize( int pageSize
);
75 int GetPageSize(void) const;
77 void ClearTicks(void);
78 void SetLineSize( int lineSize
);
79 int GetLineSize(void) const;
80 int GetSelEnd(void) const;
81 int GetSelStart(void) const;
82 void SetSelection( int minPos
, int maxPos
);
83 void SetThumbLength( int len
);
84 int GetThumbLength(void) const;
85 void SetTick( int tickPos
);
89 bool IsOwnGtkWindow( GdkWindow
*window
);
91 GtkAdjustment
*m_adjust
;
96 #endif // __GTKSLIDERH__