]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/slider.h
added more HP-UX charset names
[wxWidgets.git] / include / wx / motif / slider.h
... / ...
CommitLineData
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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SLIDER_H_
13#define _WX_SLIDER_H_
14
15#include "wx/control.h"
16
17// Slider
18class WXDLLEXPORT wxSlider: public wxSliderBase
19{
20 DECLARE_DYNAMIC_CLASS(wxSlider)
21
22public:
23 wxSlider();
24
25 wxSlider(wxWindow *parent, wxWindowID id,
26 int value, int minValue, int maxValue,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxSL_HORIZONTAL,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxSliderNameStr)
32 {
33 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
34 }
35
36 ~wxSlider();
37
38 bool Create(wxWindow *parent, wxWindowID id,
39 int value, int minValue, int maxValue,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxSL_HORIZONTAL,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxSliderNameStr);
45
46 virtual int GetValue() const ;
47 virtual void SetValue(int);
48
49 void SetRange(int minValue, int maxValue);
50
51 inline int GetMin() const { return m_rangeMin; }
52 inline int GetMax() const { return m_rangeMax; }
53
54 // For trackbars only
55 void SetPageSize(int pageSize);
56 int GetPageSize() const ;
57 void SetLineSize(int lineSize);
58 int GetLineSize() const ;
59 void SetThumbLength(int len) ;
60 int GetThumbLength() const ;
61
62 void Command(wxCommandEvent& event);
63
64protected:
65 int m_rangeMin;
66 int m_rangeMax;
67 int m_pageSize;
68 int m_lineSize;
69
70 virtual void DoSetSize(int x, int y,
71 int width, int height,
72 int sizeFlags = wxSIZE_AUTO);
73
74private:
75 DECLARE_EVENT_TABLE()
76};
77
78#endif
79// _WX_SLIDER_H_