]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/spinctrl.h
Watcom C++ fixup in tbar95.cpp; removed WXWIN_COMPATIBILITY for 'old' menu
[wxWidgets.git] / include / wx / gtk1 / spinctrl.h
CommitLineData
738f9e5a
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: spinctrl.h
3// Purpose: wxSpinCtrl class
4// Author: Robert Roebling
5// Modified by:
6// RCS-ID: $Id$
7// Copyright: (c) Robert Roebling
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef __GTKSPINCTRLH__
12#define __GTKSPINCTRLH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18//-----------------------------------------------------------------------------
ce89fdd2 19// wxSpinCtrl
738f9e5a
RR
20//-----------------------------------------------------------------------------
21
22class wxSpinCtrl : public wxControl
23{
24public:
25 wxSpinCtrl() {}
26 wxSpinCtrl(wxWindow *parent,
27 wxWindowID id = -1,
ce89fdd2 28 const wxString& value = wxEmptyString,
738f9e5a
RR
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = wxSP_ARROW_KEYS,
32 int min = 0, int max = 100, int initial = 0,
33 const wxString& name = _T("wxSpinCtrl"))
34 {
ce89fdd2 35 Create(parent, id, value, pos, size, style, min, max, initial, name);
738f9e5a
RR
36 }
37
38 bool Create(wxWindow *parent,
39 wxWindowID id = -1,
ce89fdd2 40 const wxString& value = wxEmptyString,
738f9e5a
RR
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = wxSP_ARROW_KEYS,
44 int min = 0, int max = 100, int initial = 0,
45 const wxString& name = _T("wxSpinCtrl"));
46
ce89fdd2
VZ
47 void SetValue(const wxString& text);
48
738f9e5a
RR
49 virtual int GetValue() const;
50 virtual void SetValue( int value );
51 virtual void SetRange( int minVal, int maxVal );
52 virtual int GetMin() const;
53 virtual int GetMax() const;
54
ce89fdd2 55 // implementation
da048e3d
RR
56 void OnChar( wxKeyEvent &event );
57
738f9e5a
RR
58 bool IsOwnGtkWindow( GdkWindow *window );
59 void ApplyWidgetStyle();
60
61 GtkAdjustment *m_adjust;
62 float m_oldPos;
63
64private:
65 DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
da048e3d 66 DECLARE_EVENT_TABLE()
738f9e5a
RR
67};
68
69#endif
70 // __GTKSPINCTRLH__