]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/slider.h
Only define wxIntegerHash::longlongHash when long long isn't long
[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
9b6dbb09
JS
15#include "wx/control.h"
16
9b6dbb09 17// Slider
93e73c74 18class WXDLLEXPORT wxSlider: public wxSliderBase
9b6dbb09 19{
83df96d6
JS
20 DECLARE_DYNAMIC_CLASS(wxSlider)
21
9b6dbb09 22public:
bfc6fde4 23 wxSlider();
83df96d6 24
bfc6fde4 25 wxSlider(wxWindow *parent, wxWindowID id,
83df96d6
JS
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)
bfc6fde4
VZ
32 {
33 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
34 }
83df96d6 35
bfc6fde4 36 ~wxSlider();
83df96d6 37
bfc6fde4 38 bool Create(wxWindow *parent, wxWindowID id,
83df96d6
JS
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
bfc6fde4
VZ
46 virtual int GetValue() const ;
47 virtual void SetValue(int);
83df96d6 48
bfc6fde4 49 void SetRange(int minValue, int maxValue);
83df96d6 50
bfc6fde4
VZ
51 inline int GetMin() const { return m_rangeMin; }
52 inline int GetMax() const { return m_rangeMax; }
83df96d6 53
bfc6fde4 54 // For trackbars only
bfc6fde4
VZ
55 void SetPageSize(int pageSize);
56 int GetPageSize() const ;
bfc6fde4
VZ
57 void SetLineSize(int lineSize);
58 int GetLineSize() const ;
bfc6fde4
VZ
59 void SetThumbLength(int len) ;
60 int GetThumbLength() const ;
83df96d6 61
bfc6fde4 62 void Command(wxCommandEvent& event);
83df96d6 63
bfc6fde4
VZ
64protected:
65 int m_rangeMin;
66 int m_rangeMax;
67 int m_pageSize;
68 int m_lineSize;
83df96d6 69
bfc6fde4 70 virtual void DoSetSize(int x, int y,
83df96d6
JS
71 int width, int height,
72 int sizeFlags = wxSIZE_AUTO);
73
bfc6fde4
VZ
74private:
75 DECLARE_EVENT_TABLE()
9b6dbb09
JS
76};
77
78#endif
83df96d6 79// _WX_SLIDER_H_