]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/slider.h
argh... yet another compilation fix
[wxWidgets.git] / include / wx / gtk / slider.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: slider.h
3// Purpose:
4// Author: Robert Roebling
58614078 5// Id: $Id$
c801d85f
KB
6// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKSLIDERH__
11#define __GTKSLIDERH__
12
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17#include "wx/defs.h"
dcf924a3
RR
18
19#if wxUSE_SLIDER
20
c801d85f
KB
21#include "wx/object.h"
22#include "wx/list.h"
23#include "wx/control.h"
24
25//-----------------------------------------------------------------------------
26// classes
27//-----------------------------------------------------------------------------
28
29class wxSlider;
30
31//-----------------------------------------------------------------------------
32// global data
33//-----------------------------------------------------------------------------
34
35extern const char *wxSliderNameStr;
36
37//-----------------------------------------------------------------------------
38// wxSlider
39//-----------------------------------------------------------------------------
40
41class wxSlider: public wxControl
42{
a075e27b 43public:
5ef9f903 44 wxSlider() {}
6de97a3b 45 inline wxSlider( wxWindow *parent, wxWindowID id,
debe6624 46 int value, int minValue, int maxValue,
c801d85f
KB
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
debe6624 49 long style = wxSL_HORIZONTAL,
6de97a3b
RR
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxSliderNameStr )
52 {
53 Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name );
54 }
6de97a3b 55 bool Create(wxWindow *parent, wxWindowID id,
debe6624 56 int value, int minValue, int maxValue,
c801d85f
KB
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
debe6624 59 long style = wxSL_HORIZONTAL,
aa9a4ae1 60 const wxValidator& validator = wxDefaultValidator,
6de97a3b 61 const wxString& name = wxSliderNameStr );
a075e27b 62 virtual int GetValue() const;
debe6624 63 virtual void SetValue( int );
debe6624 64 void SetRange( int minValue, int maxValue );
a075e27b
RR
65 int GetMin() const;
66 int GetMax() const;
debe6624 67 void SetTickFreq( int n, int pos );
a075e27b 68 int GetTickFreq() const;
debe6624 69 void SetPageSize( int pageSize );
a075e27b
RR
70 int GetPageSize() const;
71 void ClearSel();
72 void ClearTicks();
debe6624 73 void SetLineSize( int lineSize );
a075e27b
RR
74 int GetLineSize() const;
75 int GetSelEnd() const;
76 int GetSelStart() const;
debe6624
JS
77 void SetSelection( int minPos, int maxPos );
78 void SetThumbLength( int len );
a075e27b 79 int GetThumbLength() const;
debe6624 80 void SetTick( int tickPos );
c801d85f 81
aa9a4ae1 82 // implementation
a075e27b 83 // --------------
aa9a4ae1 84
b4071e91 85 bool IsOwnGtkWindow( GdkWindow *window );
58614078 86 void ApplyWidgetStyle();
aa9a4ae1 87
c801d85f
KB
88 GtkAdjustment *m_adjust;
89 float m_oldPos;
aa9a4ae1 90
a075e27b
RR
91private:
92 DECLARE_DYNAMIC_CLASS(wxSlider)
c801d85f
KB
93};
94
dcf924a3
RR
95#endif
96
c801d85f 97#endif // __GTKSLIDERH__