]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/slider.h
HTML_xxxx constants changed to wxHTML_xxxx (with backward compatibility through WXWIN...
[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{
43 DECLARE_DYNAMIC_CLASS(wxSlider)
44
45 public:
46 wxSlider(void);
6de97a3b 47 inline wxSlider( wxWindow *parent, wxWindowID id,
debe6624 48 int value, int minValue, int maxValue,
c801d85f
KB
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
debe6624 51 long style = wxSL_HORIZONTAL,
6de97a3b
RR
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxSliderNameStr )
54 {
55 Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name );
56 }
57 ~wxSlider(void);
58 bool Create(wxWindow *parent, wxWindowID id,
debe6624 59 int value, int minValue, int maxValue,
c801d85f
KB
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize,
debe6624 62 long style = wxSL_HORIZONTAL,
6de97a3b
RR
63 const wxValidator& validator = wxDefaultValidator,
64 const wxString& name = wxSliderNameStr );
c801d85f 65 virtual int GetValue(void) const;
debe6624 66 virtual void SetValue( int );
debe6624 67 void SetRange( int minValue, int maxValue );
c801d85f
KB
68 int GetMin(void) const;
69 int GetMax(void) const;
debe6624 70 void SetTickFreq( int n, int pos );
c801d85f 71 int GetTickFreq(void) const;
debe6624 72 void SetPageSize( int pageSize );
c801d85f
KB
73 int GetPageSize(void) const;
74 void ClearSel(void);
75 void ClearTicks(void);
debe6624 76 void SetLineSize( int lineSize );
c801d85f
KB
77 int GetLineSize(void) const;
78 int GetSelEnd(void) const;
79 int GetSelStart(void) const;
debe6624
JS
80 void SetSelection( int minPos, int maxPos );
81 void SetThumbLength( int len );
c801d85f 82 int GetThumbLength(void) const;
debe6624 83 void SetTick( int tickPos );
c801d85f 84
b4071e91
RR
85 // implementation
86
87 bool IsOwnGtkWindow( GdkWindow *window );
58614078 88 void ApplyWidgetStyle();
b4071e91 89
c801d85f
KB
90 GtkAdjustment *m_adjust;
91 float m_oldPos;
92
93};
94
dcf924a3
RR
95#endif
96
c801d85f 97#endif // __GTKSLIDERH__