]>
git.saurik.com Git - wxWidgets.git/blob - src/common/spinbtncmn.cpp
ed6848d61acbcd4844919baa62f3d13258c66df5
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/spinbtncmn.cpp
3 // Purpose: wxSpinButton common code
4 // Author: Julian Smart
7 // RCS-ID: $Id: spinbutt.cpp 44657 2007-03-07 22:56:34Z VZ $
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"
28 #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
34 #include "wx/spinbutt.h"
36 // ----------------------------------------------------------------------------
38 // ----------------------------------------------------------------------------
40 wxDEFINE_FLAGS( wxSpinButtonStyle
)
41 wxBEGIN_FLAGS( wxSpinButtonStyle
)
42 // new style border flags, we put them first to
43 // use them for streaming out
44 wxFLAGS_MEMBER(wxBORDER_SIMPLE
)
45 wxFLAGS_MEMBER(wxBORDER_SUNKEN
)
46 wxFLAGS_MEMBER(wxBORDER_DOUBLE
)
47 wxFLAGS_MEMBER(wxBORDER_RAISED
)
48 wxFLAGS_MEMBER(wxBORDER_STATIC
)
49 wxFLAGS_MEMBER(wxBORDER_NONE
)
51 // old style border flags
52 wxFLAGS_MEMBER(wxSIMPLE_BORDER
)
53 wxFLAGS_MEMBER(wxSUNKEN_BORDER
)
54 wxFLAGS_MEMBER(wxDOUBLE_BORDER
)
55 wxFLAGS_MEMBER(wxRAISED_BORDER
)
56 wxFLAGS_MEMBER(wxSTATIC_BORDER
)
57 wxFLAGS_MEMBER(wxBORDER
)
59 // standard window styles
60 wxFLAGS_MEMBER(wxTAB_TRAVERSAL
)
61 wxFLAGS_MEMBER(wxCLIP_CHILDREN
)
62 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW
)
63 wxFLAGS_MEMBER(wxWANTS_CHARS
)
64 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE
)
65 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB
)
66 wxFLAGS_MEMBER(wxVSCROLL
)
67 wxFLAGS_MEMBER(wxHSCROLL
)
69 wxFLAGS_MEMBER(wxSP_HORIZONTAL
)
70 wxFLAGS_MEMBER(wxSP_VERTICAL
)
71 wxFLAGS_MEMBER(wxSP_ARROW_KEYS
)
72 wxFLAGS_MEMBER(wxSP_WRAP
)
73 wxEND_FLAGS( wxSpinButtonStyle
)
75 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton
, wxControl
, "wx/spinbut.h")
77 wxBEGIN_PROPERTIES_TABLE(wxSpinButton
)
78 wxEVENT_RANGE_PROPERTY( Spin
, wxEVT_SCROLL_TOP
, wxEVT_SCROLL_CHANGED
, wxSpinEvent
)
80 wxPROPERTY( Value
, int, SetValue
, GetValue
, 0, 0 /*flags*/, \
81 wxT("Helpstring"), wxT("group"))
82 wxPROPERTY( Min
, int, SetMin
, GetMin
, 0, 0 /*flags*/, \
83 wxT("Helpstring"), wxT("group"))
84 wxPROPERTY( Max
, int, SetMax
, GetMax
, 0, 0 /*flags*/, \
85 wxT("Helpstring"), wxT("group"))
87 wxPROPERTY_FLAGS( WindowStyle
, wxSpinButtonStyle
, long, SetWindowStyleFlag
, \
88 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
89 wxT("Helpstring"), wxT("group")) // style
90 wxEND_PROPERTIES_TABLE()
92 wxEMPTY_HANDLERS_TABLE(wxSpinButton
)
94 wxCONSTRUCTOR_5( wxSpinButton
, wxWindow
*, Parent
, wxWindowID
, Id
, \
95 wxPoint
, Position
, wxSize
, Size
, long, WindowStyle
)
97 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent
, wxNotifyEvent
)
100 #endif // wxUSE_SPINBTN