]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/slider95.h
tree control and dc::drawlines bug
[wxWidgets.git] / include / wx / msw / slider95.h
CommitLineData
780d37ac
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: slider95.h
3// Purpose: wxSlider95 class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _SLIDER95_H_
13#define _SLIDER95_H_
14
15#ifdef __GNUG__
16#pragma interface "slider95.h"
17#endif
18
19#include "wx/control.h"
20
21WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
22
23// Slider
24class WXDLLEXPORT wxSlider95: public wxControl
25{
26 DECLARE_DYNAMIC_CLASS(wxSlider95)
27
28public:
29 wxSlider95(void);
30
debe6624
JS
31 inline wxSlider95(wxWindow *parent, wxWindowID id,
32 int value, int minValue, int maxValue,
780d37ac
JS
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
debe6624 35 long style = wxSL_HORIZONTAL,
780d37ac
JS
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 ~wxSlider95(void);
43
debe6624
JS
44 bool Create(wxWindow *parent, wxWindowID id,
45 int value, int minValue, int maxValue,
780d37ac
JS
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
debe6624 48 long style = wxSL_HORIZONTAL,
780d37ac
JS
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxSliderNameStr);
51
52 virtual int GetValue(void) const ;
debe6624 53 virtual void SetValue(int);
780d37ac 54 void GetSize(int *x, int *y) const ;
debe6624 55 void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
780d37ac 56 void GetPosition(int *x, int *y) const ;
debe6624 57 bool Show(bool show);
780d37ac 58
debe6624 59 void SetRange(int minValue, int maxValue);
780d37ac
JS
60
61 inline int GetMin(void) const { return m_rangeMin; }
62 inline int GetMax(void) const { return m_rangeMax; }
63
64 // For trackbars only
debe6624 65 void SetTickFreq(int n, int pos);
780d37ac 66 inline int GetTickFreq(void) const { return m_tickFreq; }
debe6624 67 void SetPageSize(int pageSize);
780d37ac
JS
68 int GetPageSize(void) const ;
69 void ClearSel(void) ;
70 void ClearTicks(void) ;
debe6624 71 void SetLineSize(int lineSize);
780d37ac
JS
72 int GetLineSize(void) const ;
73 int GetSelEnd(void) const ;
74 int GetSelStart(void) const ;
debe6624
JS
75 void SetSelection(int minPos, int maxPos);
76 void SetThumbLength(int len) ;
780d37ac 77 int GetThumbLength(void) const ;
debe6624 78 void SetTick(int tickPos) ;
780d37ac
JS
79
80 // IMPLEMENTATION
81 inline WXHWND GetStaticMin() const { return m_staticMin; }
82 inline WXHWND GetStaticMax() const { return m_staticMax; }
83 inline WXHWND GetEditValue() const { return m_staticValue; }
84 virtual bool ContainsHWND(WXHWND hWnd) const;
85
86 // Backward compatibility: translate to familiar wxEVT_COMMAND_SLIDER_UPDATED
87#if WXWIN_COMPATIBILITY
88 void OnScroll(wxScrollEvent& event);
89#endif
90
91 void Command(wxCommandEvent& event);
debe6624 92 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
780d37ac 93 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
debe6624
JS
94 void MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control);
95 void MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control);
780d37ac
JS
96
97 protected:
98 WXHWND m_staticMin;
99 WXHWND m_staticMax;
100 WXHWND m_staticValue;
101 int m_rangeMin;
102 int m_rangeMax;
103 int m_pageSize;
104 int m_lineSize;
105 int m_tickFreq;
106DECLARE_EVENT_TABLE()
107};
108
109#endif
110 // _SLIDER95_H_