]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/spinbutt.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: palmos/spinbutt.cpp
3 // Purpose: wxSpinButton
4 // Author: William Osborne
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "spinbutt.h"
22 #pragma implementation "spinbutbase.h"
25 // For compilers that support precompilation, includes "wx.h".
26 #include "wx/wxprec.h"
38 #include "wx/spinbutt.h"
40 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent
, wxNotifyEvent
)
42 // ============================================================================
44 // ============================================================================
46 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
51 #if wxUSE_EXTENDED_RTTI
52 WX_DEFINE_FLAGS( wxSpinButtonStyle
)
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
)
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
)
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
)
82 wxFLAGS_MEMBER(wxSP_HORIZONTAL
)
83 wxFLAGS_MEMBER(wxSP_VERTICAL
)
84 wxFLAGS_MEMBER(wxSP_ARROW_KEYS
)
85 wxFLAGS_MEMBER(wxSP_WRAP
)
87 wxEND_FLAGS( wxSpinButtonStyle
)
89 IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton
, wxControl
,"wx/spinbut.h")
91 wxBEGIN_PROPERTIES_TABLE(wxSpinButton
)
92 wxEVENT_RANGE_PROPERTY( Spin
, wxEVT_SCROLL_TOP
, wxEVT_SCROLL_ENDSCROLL
, wxSpinEvent
)
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()
100 wxBEGIN_HANDLERS_TABLE(wxSpinButton
)
101 wxEND_HANDLERS_TABLE()
103 wxCONSTRUCTOR_5( wxSpinButton
, wxWindow
* , Parent
, wxWindowID
, Id
, wxPoint
, Position
, wxSize
, Size
, long , WindowStyle
)
105 IMPLEMENT_DYNAMIC_CLASS(wxSpinButton
, wxControl
)
110 // ----------------------------------------------------------------------------
112 // ----------------------------------------------------------------------------
114 bool wxSpinButton::Create(wxWindow
*parent
,
119 const wxString
& name
)
124 wxSpinButton::~wxSpinButton()
128 // ----------------------------------------------------------------------------
130 // ----------------------------------------------------------------------------
132 wxSize
wxSpinButton::DoGetBestSize() const
137 // ----------------------------------------------------------------------------
139 // ----------------------------------------------------------------------------
141 int wxSpinButton::GetValue() const
146 void wxSpinButton::SetValue(int val
)
150 void wxSpinButton::SetRange(int minVal
, int maxVal
)