]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/slidrmsw.h
Added wxPaintDCEx class, to handle the case where an HDC
[wxWidgets.git] / include / wx / msw / slidrmsw.h
CommitLineData
780d37ac 1/////////////////////////////////////////////////////////////////////////////
1e6feb95 2// Name: wx/msw/slidrmsw.h
780d37ac
JS
3// Purpose: wxSliderMSW class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
1e6feb95 9// Licence: wxWindows licence
780d37ac
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _SLIDRMSW_H_
13#define _SLIDRMSW_H_
14
15#ifdef __GNUG__
16#pragma interface "slidrmsw.h"
17#endif
18
780d37ac 19// Slider
1e6feb95 20class WXDLLEXPORT wxSliderMSW : public wxSliderBase
780d37ac 21{
780d37ac 22public:
bfc6fde4
VZ
23 wxSliderMSW();
24
25 wxSliderMSW(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 ~wxSliderMSW();
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
1e6feb95 46 virtual int GetValue() const;
bfc6fde4
VZ
47 virtual void SetValue(int);
48
1e6feb95
VZ
49 void GetSize(int *x, int *y) const;
50 void GetPosition(int *x, int *y) const;
bfc6fde4
VZ
51
52 bool Show(bool show);
53
54 void SetRange(int minValue, int maxValue);
55
56 int GetMin() const { return m_rangeMin; }
57 int GetMax() const { return m_rangeMax; }
58
59 // For trackbars only
bfc6fde4 60 void SetPageSize(int pageSize);
1e6feb95 61 int GetPageSize() const;
bfc6fde4 62 void SetLineSize(int lineSize);
1e6feb95 63 int GetLineSize() const;
bfc6fde4 64
ff8b6290
JS
65 // these methods get/set the length of the slider pointer in pixels
66 virtual void SetThumbLength(int lenPixels);
67 virtual int GetThumbLength() const ;
68
bfc6fde4
VZ
69 // IMPLEMENTATION
70 WXHWND GetStaticMin() const { return m_staticMin; }
71 WXHWND GetStaticMax() const { return m_staticMax; }
72 WXHWND GetEditValue() const { return m_staticValue; }
73 virtual bool ContainsHWND(WXHWND hWnd) const;
74
75 void Command(wxCommandEvent& event);
76 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
77 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
a23fd0e1
VZ
78 virtual bool MSWOnScroll(int orientation, WXWORD wParam,
79 WXWORD pos, WXHWND control);
bfc6fde4
VZ
80
81protected:
82 WXHWND m_staticMin;
83 WXHWND m_staticMax;
84 WXHWND m_staticValue;
85 int m_rangeMin;
86 int m_rangeMax;
87 int m_pageSize;
88 int m_lineSize;
bfc6fde4
VZ
89
90 virtual void DoSetSize(int x, int y,
91 int width, int height,
92 int sizeFlags = wxSIZE_AUTO);
1e6feb95
VZ
93
94 DECLARE_DYNAMIC_CLASS(wxSliderMSW)
780d37ac
JS
95};
96
97#endif
98 // _SLIDRMSW_H_