]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/spinbutt.cpp
added setup.h file containing the settings common to all ports and a script to update...
[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 // ============================================================================
43 // implementation
44 // ============================================================================
45
46 // ----------------------------------------------------------------------------
47 // wxWin macros
48 // ----------------------------------------------------------------------------
49
50
51 #if wxUSE_EXTENDED_RTTI
52 WX_DEFINE_FLAGS( wxSpinButtonStyle )
53
54 wxBEGIN_FLAGS( wxSpinButtonStyle )
55 // new style border flags, we put them first to
56 // use them for streaming out
57 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
58 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
59 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
60 wxFLAGS_MEMBER(wxBORDER_RAISED)
61 wxFLAGS_MEMBER(wxBORDER_STATIC)
62 wxFLAGS_MEMBER(wxBORDER_NONE)
63
64 // old style border flags
65 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
66 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
67 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
68 wxFLAGS_MEMBER(wxRAISED_BORDER)
69 wxFLAGS_MEMBER(wxSTATIC_BORDER)
70 wxFLAGS_MEMBER(wxBORDER)
71
72 // standard window styles
73 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
74 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
75 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
76 wxFLAGS_MEMBER(wxWANTS_CHARS)
77 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
78 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
79 wxFLAGS_MEMBER(wxVSCROLL)
80 wxFLAGS_MEMBER(wxHSCROLL)
81
82 wxFLAGS_MEMBER(wxSP_HORIZONTAL)
83 wxFLAGS_MEMBER(wxSP_VERTICAL)
84 wxFLAGS_MEMBER(wxSP_ARROW_KEYS)
85 wxFLAGS_MEMBER(wxSP_WRAP)
86
87 wxEND_FLAGS( wxSpinButtonStyle )
88
89 IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h")
90
91 wxBEGIN_PROPERTIES_TABLE(wxSpinButton)
92 wxEVENT_RANGE_PROPERTY( Spin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent )
93
94 wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
95 wxPROPERTY( Min , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
96 wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
97 wxPROPERTY_FLAGS( WindowStyle , wxSpinButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
98 wxEND_PROPERTIES_TABLE()
99
100 wxBEGIN_HANDLERS_TABLE(wxSpinButton)
101 wxEND_HANDLERS_TABLE()
102
103 wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
104 #else
105 IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
106 #endif
107
108
109
110 // ----------------------------------------------------------------------------
111 // wxSpinButton
112 // ----------------------------------------------------------------------------
113
114 bool wxSpinButton::Create(wxWindow *parent,
115 wxWindowID id,
116 const wxPoint& pos,
117 const wxSize& size,
118 long style,
119 const wxString& name)
120 {
121 return false;
122 }
123
124 wxSpinButton::~wxSpinButton()
125 {
126 }
127
128 // ----------------------------------------------------------------------------
129 // size calculation
130 // ----------------------------------------------------------------------------
131
132 wxSize wxSpinButton::DoGetBestSize() const
133 {
134 return wxSize(0,0),
135 }
136
137 // ----------------------------------------------------------------------------
138 // Attributes
139 // ----------------------------------------------------------------------------
140
141 int wxSpinButton::GetValue() const
142 {
143 return 0;
144 }
145
146 void wxSpinButton::SetValue(int val)
147 {
148 }
149
150 void wxSpinButton::SetRange(int minVal, int maxVal)
151 {
152 }
153
154 #endif
155 // wxUSE_SPINCTN
156