]>
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
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
32 #include "wx/spinbutt.h"
34 // ----------------------------------------------------------------------------
36 // ----------------------------------------------------------------------------
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
)
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
)
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
)
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
)
73 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton
, wxControl
, "wx/spinbutt.h")
75 wxBEGIN_PROPERTIES_TABLE(wxSpinButton
)
76 wxEVENT_RANGE_PROPERTY( Spin
, wxEVT_SCROLL_TOP
, wxEVT_SCROLL_CHANGED
, wxSpinEvent
)
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"))
85 wxPROPERTY_FLAGS( WindowStyle
, wxSpinButtonStyle
, long, SetWindowStyleFlag
, \
86 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
87 wxT("Helpstring"), wxT("group")) // style
88 wxEND_PROPERTIES_TABLE()
90 wxEMPTY_HANDLERS_TABLE(wxSpinButton
)
92 wxCONSTRUCTOR_5( wxSpinButton
, wxWindow
*, Parent
, wxWindowID
, Id
, \
93 wxPoint
, Position
, wxSize
, Size
, long, WindowStyle
)
95 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent
, wxNotifyEvent
)
98 #endif // wxUSE_SPINBTN