]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/spinbutt.h
Removed unnecessary code from utilsunx.cpp
[wxWidgets.git] / include / wx / gtk / spinbutt.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: spinbutt.h
3// Purpose: wxSpinButton 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 __GTKSPINBUTTH__
12#define __GTKSPINBUTTH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19
20#if wxUSE_SPINBTN
21
22#include "wx/control.h"
23
24//-----------------------------------------------------------------------------
25// wxSpinButton
26//-----------------------------------------------------------------------------
27
28class wxSpinButton : public wxSpinButtonBase
29{
30public:
31 wxSpinButton() { }
32 wxSpinButton( wxWindow *parent, wxWindowID id = -1,
33 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
34 long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton")
35 {
36 Create(parent, id, pos, size, style, name);
37 }
38
39 bool Create( wxWindow *parent, wxWindowID id = -1,
40 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
41 long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton" );
42
43 virtual int GetValue() const;
44 virtual void SetValue( int value );
45 virtual void SetRange( int minVal, int maxVal );
46 virtual int GetMin() const;
47 virtual int GetMax() const;
48
49 // implementation
50 void OnSize( wxSizeEvent &event );
51
52 bool IsOwnGtkWindow( GdkWindow *window );
53 void ApplyWidgetStyle();
54
55 GtkAdjustment *m_adjust;
56 float m_oldPos;
57
58protected:
59 virtual wxSize DoGetBestSize() const;
60
61private:
62 DECLARE_EVENT_TABLE()
63 DECLARE_DYNAMIC_CLASS(wxSpinButton)
64};
65
66#endif
67 // wxUSE_SPINBTN
68
69#endif
70 // __GTKSPINBUTTH__