]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/slider95.h
Native SmartPhone wxChoice implementation.
[wxWidgets.git] / include / wx / msw / slider95.h
CommitLineData
780d37ac 1/////////////////////////////////////////////////////////////////////////////
1e6feb95 2// Name: wx/msw/slider95.h
780d37ac
JS
3// Purpose: wxSlider95 class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
780d37ac
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _SLIDER95_H_
13#define _SLIDER95_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
780d37ac
JS
16#pragma interface "slider95.h"
17#endif
18
780d37ac 19// Slider
1e6feb95 20class WXDLLEXPORT wxSlider95 : public wxSliderBase
780d37ac 21{
780d37ac 22public:
bfc6fde4
VZ
23 wxSlider95();
24
25 wxSlider95(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 ~wxSlider95();
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
7f1cf28c 46 virtual int GetValue() const;
bfc6fde4
VZ
47 virtual void SetValue(int);
48
5f605ccf 49 void GetPosition(int *x, int *y) const;
bfc6fde4 50
7f1cf28c 51 bool Show(bool show = TRUE);
bfc6fde4
VZ
52
53 void SetRange(int minValue, int maxValue);
54
55 int GetMin() const { return m_rangeMin; }
56 int GetMax() const { return m_rangeMax; }
57
58 // For trackbars only
59 void SetTickFreq(int n, int pos);
60 int GetTickFreq() const { return m_tickFreq; }
61 void SetPageSize(int pageSize);
7f1cf28c
VZ
62 int GetPageSize() const;
63 void ClearSel();
64 void ClearTicks();
bfc6fde4 65 void SetLineSize(int lineSize);
7f1cf28c
VZ
66 int GetLineSize() const;
67 int GetSelEnd() const;
68 int GetSelStart() const;
bfc6fde4 69 void SetSelection(int minPos, int maxPos);
7f1cf28c
VZ
70 void SetThumbLength(int len);
71 int GetThumbLength() const;
72 void SetTick(int tickPos);
bfc6fde4
VZ
73
74 // IMPLEMENTATION
75 WXHWND GetStaticMin() const { return m_staticMin; }
76 WXHWND GetStaticMax() const { return m_staticMax; }
77 WXHWND GetEditValue() const { return m_staticValue; }
78 virtual bool ContainsHWND(WXHWND hWnd) const;
79
80 void Command(wxCommandEvent& event);
81 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
82 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
a23fd0e1
VZ
83 virtual bool MSWOnScroll(int orientation, WXWORD wParam,
84 WXWORD pos, WXHWND control);
bfc6fde4
VZ
85
86protected:
87 WXHWND m_staticMin;
88 WXHWND m_staticMax;
89 WXHWND m_staticValue;
90 int m_rangeMin;
91 int m_rangeMax;
92 int m_pageSize;
93 int m_lineSize;
94 int m_tickFreq;
95
7f1cf28c
VZ
96 virtual void DoGetSize(int *width, int *height) const;
97
bfc6fde4
VZ
98 virtual void DoSetSize(int x, int y,
99 int width, int height,
100 int sizeFlags = wxSIZE_AUTO);
1e6feb95 101
7bdfb981
RD
102 virtual wxSize DoGetBestSize() const;
103
fc7a2a60 104 DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider95)
780d37ac
JS
105};
106
107#endif
108 // _SLIDER95_H_