]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/slider.h
warning for 2.5.3
[wxWidgets.git] / include / wx / motif / slider.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: slider.h
3// Purpose: wxSlider class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SLIDER_H_
13#define _WX_SLIDER_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
9b6dbb09
JS
16#pragma interface "slider.h"
17#endif
18
19#include "wx/control.h"
20
9b6dbb09 21// Slider
93e73c74 22class WXDLLEXPORT wxSlider: public wxSliderBase
9b6dbb09 23{
83df96d6
JS
24 DECLARE_DYNAMIC_CLASS(wxSlider)
25
9b6dbb09 26public:
bfc6fde4 27 wxSlider();
83df96d6 28
bfc6fde4 29 wxSlider(wxWindow *parent, wxWindowID id,
83df96d6
JS
30 int value, int minValue, int maxValue,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = wxSL_HORIZONTAL,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxSliderNameStr)
bfc6fde4
VZ
36 {
37 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
38 }
83df96d6 39
bfc6fde4 40 ~wxSlider();
83df96d6 41
bfc6fde4 42 bool Create(wxWindow *parent, wxWindowID id,
83df96d6
JS
43 int value, int minValue, int maxValue,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxSL_HORIZONTAL,
47 const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxSliderNameStr);
49
bfc6fde4
VZ
50 virtual int GetValue() const ;
51 virtual void SetValue(int);
83df96d6 52
bfc6fde4 53 void SetRange(int minValue, int maxValue);
83df96d6 54
bfc6fde4
VZ
55 inline int GetMin() const { return m_rangeMin; }
56 inline int GetMax() const { return m_rangeMax; }
83df96d6 57
bfc6fde4 58 // For trackbars only
bfc6fde4
VZ
59 void SetPageSize(int pageSize);
60 int GetPageSize() const ;
bfc6fde4
VZ
61 void SetLineSize(int lineSize);
62 int GetLineSize() const ;
bfc6fde4
VZ
63 void SetThumbLength(int len) ;
64 int GetThumbLength() const ;
83df96d6 65
bfc6fde4 66 void Command(wxCommandEvent& event);
83df96d6 67
bfc6fde4
VZ
68protected:
69 int m_rangeMin;
70 int m_rangeMax;
71 int m_pageSize;
72 int m_lineSize;
83df96d6 73
bfc6fde4 74 virtual void DoSetSize(int x, int y,
83df96d6
JS
75 int width, int height,
76 int sizeFlags = wxSIZE_AUTO);
77
bfc6fde4
VZ
78private:
79 DECLARE_EVENT_TABLE()
9b6dbb09
JS
80};
81
82#endif
83df96d6 83// _WX_SLIDER_H_