]>
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 #if defined(__WIN95__)
44 #include "wx/msw/private.h"
46 // ============================================================================
48 // ============================================================================
50 // ----------------------------------------------------------------------------
52 // ----------------------------------------------------------------------------
55 #if wxUSE_EXTENDED_RTTI
56 WX_DEFINE_FLAGS( wxSpinButtonStyle
)
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
)
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
)
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
)
86 wxFLAGS_MEMBER(wxSP_HORIZONTAL
)
87 wxFLAGS_MEMBER(wxSP_VERTICAL
)
88 wxFLAGS_MEMBER(wxSP_ARROW_KEYS
)
89 wxFLAGS_MEMBER(wxSP_WRAP
)
91 wxEND_FLAGS( wxSpinButtonStyle
)
93 IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton
, wxControl
,"wx/spinbut.h")
95 wxBEGIN_PROPERTIES_TABLE(wxSpinButton
)
96 wxEVENT_RANGE_PROPERTY( Spin
, wxEVT_SCROLL_TOP
, wxEVT_SCROLL_ENDSCROLL
, wxSpinEvent
)
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()
104 wxBEGIN_HANDLERS_TABLE(wxSpinButton
)
105 wxEND_HANDLERS_TABLE()
107 wxCONSTRUCTOR_5( wxSpinButton
, wxWindow
* , Parent
, wxWindowID
, Id
, wxPoint
, Position
, wxSize
, Size
, long , WindowStyle
)
109 IMPLEMENT_DYNAMIC_CLASS(wxSpinButton
, wxControl
)
114 // ----------------------------------------------------------------------------
116 // ----------------------------------------------------------------------------
118 bool wxSpinButton::Create(wxWindow
*parent
,
123 const wxString
& name
)
128 wxSpinButton::~wxSpinButton()
132 // ----------------------------------------------------------------------------
134 // ----------------------------------------------------------------------------
136 wxSize
wxSpinButton::DoGetBestSize() const
141 // ----------------------------------------------------------------------------
143 // ----------------------------------------------------------------------------
145 int wxSpinButton::GetValue() const
150 void wxSpinButton::SetValue(int val
)
154 void wxSpinButton::SetRange(int minVal
, int maxVal
)
158 bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation
), WXWORD wParam
,
159 WXWORD pos
, WXHWND control
)
164 bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl
), WXLPARAM lParam
, WXLPARAM
*result
)
169 bool wxSpinButton::MSWCommand(WXUINT
WXUNUSED(cmd
), WXWORD
WXUNUSED(id
))