]>
Commit | Line | Data |
---|---|---|
8e189077 | 1 | ///////////////////////////////////////////////////////////////////////////// |
1e6feb95 | 2 | // Name: wx/gtk/spinbutt.h |
8e189077 RR |
3 | // Purpose: wxSpinButton class |
4 | // Author: Robert Roebling | |
5 | // Modified by: | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) Robert Roebling | |
65571936 | 8 | // Licence: wxWindows licence |
8e189077 RR |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
1e6feb95 VZ |
11 | #ifndef _WX_GTK_SPINBUTT_H_ |
12 | #define _WX_GTK_SPINBUTT_H_ | |
8e189077 | 13 | |
12028905 | 14 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
8e189077 RR |
15 | #pragma interface |
16 | #endif | |
17 | ||
8e189077 RR |
18 | //----------------------------------------------------------------------------- |
19 | // wxSpinButton | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
20123d49 | 22 | class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase |
8e189077 | 23 | { |
8e189077 | 24 | public: |
31528cd3 | 25 | wxSpinButton() { } |
1e6feb95 VZ |
26 | wxSpinButton(wxWindow *parent, |
27 | wxWindowID id = -1, | |
28 | const wxPoint& pos = wxDefaultPosition, | |
29 | const wxSize& size = wxDefaultSize, | |
30 | long style = wxSP_VERTICAL, | |
31 | const wxString& name = wxSPIN_BUTTON_NAME) | |
31528cd3 VZ |
32 | { |
33 | Create(parent, id, pos, size, style, name); | |
34 | } | |
31528cd3 | 35 | |
1e6feb95 VZ |
36 | bool Create(wxWindow *parent, |
37 | wxWindowID id = -1, | |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, | |
40 | long style = wxSP_VERTICAL, | |
41 | const wxString& name = wxSPIN_BUTTON_NAME); | |
31528cd3 VZ |
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 | ||
9d522606 RD |
49 | static wxVisualAttributes |
50 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
51 | ||
31528cd3 VZ |
52 | // implementation |
53 | void OnSize( wxSizeEvent &event ); | |
54 | ||
55 | bool IsOwnGtkWindow( GdkWindow *window ); | |
31528cd3 VZ |
56 | |
57 | GtkAdjustment *m_adjust; | |
58 | float m_oldPos; | |
59 | ||
9d9b7755 VZ |
60 | protected: |
61 | virtual wxSize DoGetBestSize() const; | |
62 | ||
31528cd3 VZ |
63 | private: |
64 | DECLARE_EVENT_TABLE() | |
738f9e5a | 65 | DECLARE_DYNAMIC_CLASS(wxSpinButton) |
8e189077 RR |
66 | }; |
67 | ||
a075e27b | 68 | #endif |
1e6feb95 | 69 | // _WX_GTK_SPINBUTT_H_ |