]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/spinbutt.cpp
Honous initial position for wxSpinCtrl.
[wxWidgets.git] / src / palmos / spinbutt.cpp
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/spinbutt.cpp
ffecfa5a 3// Purpose: wxSpinButton
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e2731512 7// RCS-ID: $Id$
ffecfa5a
JS
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
40IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
41
ffecfa5a
JS
42// ============================================================================
43// implementation
44// ============================================================================
45
46// ----------------------------------------------------------------------------
47// wxWin macros
48// ----------------------------------------------------------------------------
49
50
51#if wxUSE_EXTENDED_RTTI
52WX_DEFINE_FLAGS( wxSpinButtonStyle )
53
54wxBEGIN_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)
5445a26c 63
ffecfa5a
JS
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
87wxEND_FLAGS( wxSpinButtonStyle )
88
89IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h")
90
91wxBEGIN_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
98wxEND_PROPERTIES_TABLE()
99
100wxBEGIN_HANDLERS_TABLE(wxSpinButton)
101wxEND_HANDLERS_TABLE()
102
5445a26c 103wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
ffecfa5a
JS
104#else
105IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
106#endif
107
108
109
110// ----------------------------------------------------------------------------
111// wxSpinButton
112// ----------------------------------------------------------------------------
113
114bool 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
124wxSpinButton::~wxSpinButton()
125{
126}
127
128// ----------------------------------------------------------------------------
129// size calculation
130// ----------------------------------------------------------------------------
131
132wxSize wxSpinButton::DoGetBestSize() const
133{
134 return wxSize(0,0),
135}
136
137// ----------------------------------------------------------------------------
138// Attributes
139// ----------------------------------------------------------------------------
140
141int wxSpinButton::GetValue() const
142{
143 return 0;
144}
145
146void wxSpinButton::SetValue(int val)
147{
148}
149
150void wxSpinButton::SetRange(int minVal, int maxVal)
151{
152}
153
ffecfa5a
JS
154#endif
155 // wxUSE_SPINCTN
156