]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/spinbutt.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / gtk1 / spinbutt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/spinbutt.h
3 // Purpose: wxSpinButton class
4 // Author: Robert Roebling
5 // Modified by:
6 // Copyright: (c) Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_SPINBUTT_H_
11 #define _WX_GTK_SPINBUTT_H_
12
13 //-----------------------------------------------------------------------------
14 // wxSpinButton
15 //-----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
18 {
19 public:
20 wxSpinButton() { }
21 wxSpinButton(wxWindow *parent,
22 wxWindowID id = -1,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 long style = wxSP_VERTICAL,
26 const wxString& name = wxSPIN_BUTTON_NAME)
27 {
28 Create(parent, id, pos, size, style, name);
29 }
30
31 bool Create(wxWindow *parent,
32 wxWindowID id = -1,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 long style = wxSP_VERTICAL,
36 const wxString& name = wxSPIN_BUTTON_NAME);
37
38 virtual int GetValue() const;
39 virtual void SetValue( int value );
40 virtual void SetRange( int minVal, int maxVal );
41 virtual int GetMin() const;
42 virtual int GetMax() const;
43
44 static wxVisualAttributes
45 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
46
47 // implementation
48 void OnSize( wxSizeEvent &event );
49
50 bool IsOwnGtkWindow( GdkWindow *window );
51
52 GtkAdjustment *m_adjust;
53 float m_oldPos;
54
55 protected:
56 virtual wxSize DoGetBestSize() const;
57
58 private:
59 DECLARE_EVENT_TABLE()
60 DECLARE_DYNAMIC_CLASS(wxSpinButton)
61 };
62
63 #endif
64 // _WX_GTK_SPINBUTT_H_