]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/slider.h
Added some tentative wxMotif clipboard code; did some file formatting
[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"
18#include "wx/object.h"
19#include "wx/list.h"
20#include "wx/control.h"
21
22//-----------------------------------------------------------------------------
23// classes
24//-----------------------------------------------------------------------------
25
26class wxSlider;
27
28//-----------------------------------------------------------------------------
29// global data
30//-----------------------------------------------------------------------------
31
32extern const char *wxSliderNameStr;
33
34//-----------------------------------------------------------------------------
35// wxSlider
36//-----------------------------------------------------------------------------
37
38class wxSlider: public wxControl
39{
40 DECLARE_DYNAMIC_CLASS(wxSlider)
41
42 public:
43 wxSlider(void);
6de97a3b 44 inline wxSlider( wxWindow *parent, wxWindowID id,
debe6624 45 int value, int minValue, int maxValue,
c801d85f
KB
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
debe6624 48 long style = wxSL_HORIZONTAL,
6de97a3b
RR
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxSliderNameStr )
51 {
52 Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name );
53 }
54 ~wxSlider(void);
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,
6de97a3b
RR
60 const wxValidator& validator = wxDefaultValidator,
61 const wxString& name = wxSliderNameStr );
c801d85f 62 virtual int GetValue(void) const;
debe6624 63 virtual void SetValue( int );
debe6624 64 void SetRange( int minValue, int maxValue );
c801d85f
KB
65 int GetMin(void) const;
66 int GetMax(void) const;
debe6624 67 void SetTickFreq( int n, int pos );
c801d85f 68 int GetTickFreq(void) const;
debe6624 69 void SetPageSize( int pageSize );
c801d85f
KB
70 int GetPageSize(void) const;
71 void ClearSel(void);
72 void ClearTicks(void);
debe6624 73 void SetLineSize( int lineSize );
c801d85f
KB
74 int GetLineSize(void) const;
75 int GetSelEnd(void) const;
76 int GetSelStart(void) const;
debe6624
JS
77 void SetSelection( int minPos, int maxPos );
78 void SetThumbLength( int len );
c801d85f 79 int GetThumbLength(void) const;
debe6624 80 void SetTick( int tickPos );
c801d85f 81
b4071e91
RR
82 // implementation
83
84 bool IsOwnGtkWindow( GdkWindow *window );
58614078 85 void ApplyWidgetStyle();
b4071e91 86
c801d85f
KB
87 GtkAdjustment *m_adjust;
88 float m_oldPos;
89
90};
91
92#endif // __GTKSLIDERH__