]> git.saurik.com Git - wxWidgets.git/blame - include/wx/qt/slider.h
1. bug fixes in wxCaret
[wxWidgets.git] / include / wx / qt / slider.h
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: slider.h
01b2eeec
KB
3// Purpose: wxSlider class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
01b2eeec
KB
12#ifndef _WX_SLIDER_H_
13#define _WX_SLIDER_H_
7c78e7c7
RR
14
15#ifdef __GNUG__
01b2eeec 16#pragma interface "slider.h"
7c78e7c7
RR
17#endif
18
7c78e7c7
RR
19#include "wx/control.h"
20
01b2eeec 21WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
7c78e7c7 22
01b2eeec
KB
23// Slider
24class WXDLLEXPORT wxSlider: public wxControl
7c78e7c7
RR
25{
26 DECLARE_DYNAMIC_CLASS(wxSlider)
27
01b2eeec
KB
28public:
29 wxSlider();
30
31 inline wxSlider(wxWindow *parent, wxWindowID id,
7c78e7c7
RR
32 int value, int minValue, int maxValue,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 long style = wxSL_HORIZONTAL,
01b2eeec
KB
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxSliderNameStr)
38 {
39 Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
40 }
41
42 ~wxSlider();
43
44 bool Create(wxWindow *parent, wxWindowID id,
7c78e7c7
RR
45 int value, int minValue, int maxValue,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 long style = wxSL_HORIZONTAL,
01b2eeec 49 const wxValidator& validator = wxDefaultValidator,
7c78e7c7 50 const wxString& name = wxSliderNameStr);
01b2eeec
KB
51
52 virtual int GetValue() const ;
53 virtual void SetValue(int);
54 void GetSize(int *x, int *y) const ;
55 void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
56 void GetPosition(int *x, int *y) const ;
57 bool Show(bool show);
58
59 void SetRange(int minValue, int maxValue);
60
61 inline int GetMin() const { return m_rangeMin; }
62 inline int GetMax() const { return m_rangeMax; }
63
64 // For trackbars only
65 void SetTickFreq(int n, int pos);
66 inline int GetTickFreq() const { return m_tickFreq; }
67 void SetPageSize(int pageSize);
68 int GetPageSize() const ;
69 void ClearSel() ;
70 void ClearTicks() ;
71 void SetLineSize(int lineSize);
72 int GetLineSize() const ;
73 int GetSelEnd() const ;
74 int GetSelStart() const ;
75 void SetSelection(int minPos, int maxPos);
76 void SetThumbLength(int len) ;
77 int GetThumbLength() const ;
78 void SetTick(int tickPos) ;
79
80 void Command(wxCommandEvent& event);
81 protected:
82 int m_rangeMin;
83 int m_rangeMax;
84 int m_pageSize;
85 int m_lineSize;
86 int m_tickFreq;
87DECLARE_EVENT_TABLE()
7c78e7c7
RR
88};
89
01b2eeec
KB
90#endif
91 // _WX_SLIDER_H_