]> git.saurik.com Git - wxWidgets.git/blob - src/common/spinbtncmn.cpp
adding new files for xti merge
[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 // RCS-ID: $Id: spinbutt.cpp 44657 2007-03-07 22:56:34Z VZ $
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #ifndef WX_PRECOMP
28 #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
29 #include "wx/app.h"
30 #endif
31
32 #if wxUSE_SPINBTN
33
34 #include "wx/spinbutt.h"
35
36 // ----------------------------------------------------------------------------
37 // XTI
38 // ----------------------------------------------------------------------------
39
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)
50
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)
58
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)
68
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 )
74
75 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl, "wx/spinbut.h")
76
77 wxBEGIN_PROPERTIES_TABLE(wxSpinButton)
78 wxEVENT_RANGE_PROPERTY( Spin, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxSpinEvent )
79
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"))
86
87 wxPROPERTY_FLAGS( WindowStyle, wxSpinButtonStyle, long, SetWindowStyleFlag, \
88 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
89 wxT("Helpstring"), wxT("group")) // style
90 wxEND_PROPERTIES_TABLE()
91
92 wxEMPTY_HANDLERS_TABLE(wxSpinButton)
93
94 wxCONSTRUCTOR_5( wxSpinButton, wxWindow*, Parent, wxWindowID, Id, \
95 wxPoint, Position, wxSize, Size, long, WindowStyle )
96
97 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
98
99
100 #endif // wxUSE_SPINBTN