]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/spinbutt.cpp
Forgot to commit header.
[wxWidgets.git] / src / palmos / spinbutt.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: palmos/spinbutt.cpp
3 // Purpose: wxSpinButton
4 // Author: William Osborne
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id:
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "spinbutt.h"
22 #pragma implementation "spinbutbase.h"
23 #endif
24
25 // For compilers that support precompilation, includes "wx.h".
26 #include "wx/wxprec.h"
27
28 #ifdef __BORLANDC__
29 #pragma hdrstop
30 #endif
31
32 #ifndef WX_PRECOMP
33 #include "wx/app.h"
34 #endif
35
36 #if wxUSE_SPINBTN
37
38 #include "wx/spinbutt.h"
39
40 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
41
42 #if defined(__WIN95__)
43
44 #include "wx/msw/private.h"
45
46 // ============================================================================
47 // implementation
48 // ============================================================================
49
50 // ----------------------------------------------------------------------------
51 // wxWin macros
52 // ----------------------------------------------------------------------------
53
54
55 #if wxUSE_EXTENDED_RTTI
56 WX_DEFINE_FLAGS( wxSpinButtonStyle )
57
58 wxBEGIN_FLAGS( wxSpinButtonStyle )
59 // new style border flags, we put them first to
60 // use them for streaming out
61 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
62 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
63 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
64 wxFLAGS_MEMBER(wxBORDER_RAISED)
65 wxFLAGS_MEMBER(wxBORDER_STATIC)
66 wxFLAGS_MEMBER(wxBORDER_NONE)
67
68 // old style border flags
69 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
70 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
71 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
72 wxFLAGS_MEMBER(wxRAISED_BORDER)
73 wxFLAGS_MEMBER(wxSTATIC_BORDER)
74 wxFLAGS_MEMBER(wxBORDER)
75
76 // standard window styles
77 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
78 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
79 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
80 wxFLAGS_MEMBER(wxWANTS_CHARS)
81 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
82 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
83 wxFLAGS_MEMBER(wxVSCROLL)
84 wxFLAGS_MEMBER(wxHSCROLL)
85
86 wxFLAGS_MEMBER(wxSP_HORIZONTAL)
87 wxFLAGS_MEMBER(wxSP_VERTICAL)
88 wxFLAGS_MEMBER(wxSP_ARROW_KEYS)
89 wxFLAGS_MEMBER(wxSP_WRAP)
90
91 wxEND_FLAGS( wxSpinButtonStyle )
92
93 IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h")
94
95 wxBEGIN_PROPERTIES_TABLE(wxSpinButton)
96 wxEVENT_RANGE_PROPERTY( Spin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent )
97
98 wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
99 wxPROPERTY( Min , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
100 wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
101 wxPROPERTY_FLAGS( WindowStyle , wxSpinButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
102 wxEND_PROPERTIES_TABLE()
103
104 wxBEGIN_HANDLERS_TABLE(wxSpinButton)
105 wxEND_HANDLERS_TABLE()
106
107 wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
108 #else
109 IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
110 #endif
111
112
113
114 // ----------------------------------------------------------------------------
115 // wxSpinButton
116 // ----------------------------------------------------------------------------
117
118 bool wxSpinButton::Create(wxWindow *parent,
119 wxWindowID id,
120 const wxPoint& pos,
121 const wxSize& size,
122 long style,
123 const wxString& name)
124 {
125 return false;
126 }
127
128 wxSpinButton::~wxSpinButton()
129 {
130 }
131
132 // ----------------------------------------------------------------------------
133 // size calculation
134 // ----------------------------------------------------------------------------
135
136 wxSize wxSpinButton::DoGetBestSize() const
137 {
138 return wxSize(0,0),
139 }
140
141 // ----------------------------------------------------------------------------
142 // Attributes
143 // ----------------------------------------------------------------------------
144
145 int wxSpinButton::GetValue() const
146 {
147 return 0;
148 }
149
150 void wxSpinButton::SetValue(int val)
151 {
152 }
153
154 void wxSpinButton::SetRange(int minVal, int maxVal)
155 {
156 }
157
158 bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
159 WXWORD pos, WXHWND control)
160 {
161 return false;
162 }
163
164 bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *result)
165 {
166 return false;
167 }
168
169 bool wxSpinButton::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD WXUNUSED(id))
170 {
171 return false;
172 }
173
174 #endif // __WIN95__
175
176 #endif
177 // wxUSE_SPINCTN
178