]>
git.saurik.com Git - wxWidgets.git/blob - src/common/spinbtncmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/spinbtncmn.cpp
3 // Purpose: wxSpinButton common code
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
33 #include "wx/spinbutt.h"
35 // ----------------------------------------------------------------------------
37 // ----------------------------------------------------------------------------
39 wxDEFINE_FLAGS( wxSpinButtonStyle
)
40 wxBEGIN_FLAGS( wxSpinButtonStyle
)
41 // new style border flags, we put them first to
42 // use them for streaming out
43 wxFLAGS_MEMBER(wxBORDER_SIMPLE
)
44 wxFLAGS_MEMBER(wxBORDER_SUNKEN
)
45 wxFLAGS_MEMBER(wxBORDER_DOUBLE
)
46 wxFLAGS_MEMBER(wxBORDER_RAISED
)
47 wxFLAGS_MEMBER(wxBORDER_STATIC
)
48 wxFLAGS_MEMBER(wxBORDER_NONE
)
50 // old style border flags
51 wxFLAGS_MEMBER(wxSIMPLE_BORDER
)
52 wxFLAGS_MEMBER(wxSUNKEN_BORDER
)
53 wxFLAGS_MEMBER(wxDOUBLE_BORDER
)
54 wxFLAGS_MEMBER(wxRAISED_BORDER
)
55 wxFLAGS_MEMBER(wxSTATIC_BORDER
)
56 wxFLAGS_MEMBER(wxBORDER
)
58 // standard window styles
59 wxFLAGS_MEMBER(wxTAB_TRAVERSAL
)
60 wxFLAGS_MEMBER(wxCLIP_CHILDREN
)
61 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW
)
62 wxFLAGS_MEMBER(wxWANTS_CHARS
)
63 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE
)
64 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB
)
65 wxFLAGS_MEMBER(wxVSCROLL
)
66 wxFLAGS_MEMBER(wxHSCROLL
)
68 wxFLAGS_MEMBER(wxSP_HORIZONTAL
)
69 wxFLAGS_MEMBER(wxSP_VERTICAL
)
70 wxFLAGS_MEMBER(wxSP_ARROW_KEYS
)
71 wxFLAGS_MEMBER(wxSP_WRAP
)
72 wxEND_FLAGS( wxSpinButtonStyle
)
74 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton
, wxControl
, "wx/spinbutt.h")
76 wxBEGIN_PROPERTIES_TABLE(wxSpinButton
)
77 wxEVENT_RANGE_PROPERTY( Spin
, wxEVT_SCROLL_TOP
, wxEVT_SCROLL_CHANGED
, wxSpinEvent
)
79 wxPROPERTY( Value
, int, SetValue
, GetValue
, 0, 0 /*flags*/, \
80 wxT("Helpstring"), wxT("group"))
81 wxPROPERTY( Min
, int, SetMin
, GetMin
, 0, 0 /*flags*/, \
82 wxT("Helpstring"), wxT("group"))
83 wxPROPERTY( Max
, int, SetMax
, GetMax
, 0, 0 /*flags*/, \
84 wxT("Helpstring"), wxT("group"))
86 wxPROPERTY_FLAGS( WindowStyle
, wxSpinButtonStyle
, long, SetWindowStyleFlag
, \
87 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
88 wxT("Helpstring"), wxT("group")) // style
89 wxEND_PROPERTIES_TABLE()
91 wxEMPTY_HANDLERS_TABLE(wxSpinButton
)
93 wxCONSTRUCTOR_5( wxSpinButton
, wxWindow
*, Parent
, wxWindowID
, Id
, \
94 wxPoint
, Position
, wxSize
, Size
, long, WindowStyle
)
96 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent
, wxNotifyEvent
)
99 #endif // wxUSE_SPINBTN