]> git.saurik.com Git - wxWidgets.git/blob - src/common/spinbtncmn.cpp
skip apple options
[wxWidgets.git] / src / common / spinbtncmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/spinbtncmn.cpp
3 // Purpose: wxSpinButton common code
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #ifndef WX_PRECOMP
27 #include "wx/app.h"
28 #endif
29
30 #if wxUSE_SPINBTN
31
32 #include "wx/spinbutt.h"
33
34 // ----------------------------------------------------------------------------
35 // XTI
36 // ----------------------------------------------------------------------------
37
38 wxDEFINE_FLAGS( wxSpinButtonStyle )
39 wxBEGIN_FLAGS( wxSpinButtonStyle )
40 // new style border flags, we put them first to
41 // use them for streaming out
42 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
43 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
44 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
45 wxFLAGS_MEMBER(wxBORDER_RAISED)
46 wxFLAGS_MEMBER(wxBORDER_STATIC)
47 wxFLAGS_MEMBER(wxBORDER_NONE)
48
49 // old style border flags
50 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
51 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
52 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
53 wxFLAGS_MEMBER(wxRAISED_BORDER)
54 wxFLAGS_MEMBER(wxSTATIC_BORDER)
55 wxFLAGS_MEMBER(wxBORDER)
56
57 // standard window styles
58 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
59 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
60 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
61 wxFLAGS_MEMBER(wxWANTS_CHARS)
62 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
63 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
64 wxFLAGS_MEMBER(wxVSCROLL)
65 wxFLAGS_MEMBER(wxHSCROLL)
66
67 wxFLAGS_MEMBER(wxSP_HORIZONTAL)
68 wxFLAGS_MEMBER(wxSP_VERTICAL)
69 wxFLAGS_MEMBER(wxSP_ARROW_KEYS)
70 wxFLAGS_MEMBER(wxSP_WRAP)
71 wxEND_FLAGS( wxSpinButtonStyle )
72
73 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl, "wx/spinbutt.h")
74
75 wxBEGIN_PROPERTIES_TABLE(wxSpinButton)
76 wxEVENT_RANGE_PROPERTY( Spin, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxSpinEvent )
77
78 wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \
79 wxT("Helpstring"), wxT("group"))
80 wxPROPERTY( Min, int, SetMin, GetMin, 0, 0 /*flags*/, \
81 wxT("Helpstring"), wxT("group"))
82 wxPROPERTY( Max, int, SetMax, GetMax, 0, 0 /*flags*/, \
83 wxT("Helpstring"), wxT("group"))
84
85 wxPROPERTY_FLAGS( WindowStyle, wxSpinButtonStyle, long, SetWindowStyleFlag, \
86 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
87 wxT("Helpstring"), wxT("group")) // style
88 wxEND_PROPERTIES_TABLE()
89
90 wxEMPTY_HANDLERS_TABLE(wxSpinButton)
91
92 wxCONSTRUCTOR_5( wxSpinButton, wxWindow*, Parent, wxWindowID, Id, \
93 wxPoint, Position, wxSize, Size, long, WindowStyle )
94
95 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
96
97
98 #endif // wxUSE_SPINBTN