]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/gauge.cpp
wxUSE_PROPGRID is now recognized by source and header files
[wxWidgets.git] / src / palmos / gauge.cpp
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/palmos/gauge.cpp
3// Purpose: wxGauge class
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
ffecfa5a
JS
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
7520f3da
WS
27#if wxUSE_GAUGE
28
9d2c19f1
WS
29#include "wx/gauge.h"
30
ffecfa5a 31#ifndef WX_PRECOMP
ffecfa5a
JS
32#endif
33
ffecfa5a
JS
34#include "wx/palmos/private.h"
35
36// ----------------------------------------------------------------------------
37// constants
38// ----------------------------------------------------------------------------
39
40#ifndef PBS_SMOOTH
41 #define PBS_SMOOTH 0x01
42#endif
43
44#ifndef PBS_VERTICAL
45 #define PBS_VERTICAL 0x04
46#endif
47
48#ifndef PBM_SETBARCOLOR
49 #define PBM_SETBARCOLOR (WM_USER+9)
50#endif
51
52#ifndef PBM_SETBKCOLOR
53 #define PBM_SETBKCOLOR 0x2001
54#endif
55
56// ----------------------------------------------------------------------------
57// wxWin macros
58// ----------------------------------------------------------------------------
59
60#if wxUSE_EXTENDED_RTTI
61WX_DEFINE_FLAGS( wxGaugeStyle )
62
63wxBEGIN_FLAGS( wxGaugeStyle )
64 // new style border flags, we put them first to
65 // use them for streaming out
66 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
67 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
68 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
69 wxFLAGS_MEMBER(wxBORDER_RAISED)
70 wxFLAGS_MEMBER(wxBORDER_STATIC)
71 wxFLAGS_MEMBER(wxBORDER_NONE)
e2731512 72
ffecfa5a
JS
73 // old style border flags
74 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
75 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
76 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
77 wxFLAGS_MEMBER(wxRAISED_BORDER)
78 wxFLAGS_MEMBER(wxSTATIC_BORDER)
79 wxFLAGS_MEMBER(wxBORDER)
80
81 // standard window styles
82 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
83 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
84 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
85 wxFLAGS_MEMBER(wxWANTS_CHARS)
86 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
87 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
88 wxFLAGS_MEMBER(wxVSCROLL)
89 wxFLAGS_MEMBER(wxHSCROLL)
90
91 wxFLAGS_MEMBER(wxGA_HORIZONTAL)
92 wxFLAGS_MEMBER(wxGA_VERTICAL)
ffecfa5a
JS
93 wxFLAGS_MEMBER(wxGA_SMOOTH)
94
95wxEND_FLAGS( wxGaugeStyle )
96
97IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge, wxControl,"wx/gauge.h")
98
99wxBEGIN_PROPERTIES_TABLE(wxGauge)
100 wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
101 wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
102 wxPROPERTY( ShadowWidth , int , SetShadowWidth, GetShadowWidth, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
103 wxPROPERTY( BezelFace , int , SetBezelFace, GetBezelFace, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
104 wxPROPERTY_FLAGS( WindowStyle , wxGaugeStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
105wxEND_PROPERTIES_TABLE()
106
107wxBEGIN_HANDLERS_TABLE(wxGauge)
108wxEND_HANDLERS_TABLE()
109
e2731512 110wxCONSTRUCTOR_6( wxGauge , wxWindow* , Parent , wxWindowID , Id , int , Range , wxPoint , Position , wxSize , Size , long , WindowStyle )
ffecfa5a
JS
111#else
112IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
113#endif
114
115// ============================================================================
116// wxGauge implementation
117// ============================================================================
118
119// ----------------------------------------------------------------------------
120// wxGauge creation
121// ----------------------------------------------------------------------------
122
123bool wxGauge::Create(wxWindow *parent,
124 wxWindowID id,
125 int range,
126 const wxPoint& pos,
127 const wxSize& size,
128 long style,
129 const wxValidator& validator,
130 const wxString& name)
131{
132 return false;
133}
134
135WXDWORD wxGauge::MSWGetStyle(long style, WXDWORD *exstyle) const
136{
137 return 0;
138}
139
140// ----------------------------------------------------------------------------
141// wxGauge geometry
142// ----------------------------------------------------------------------------
143
144wxSize wxGauge::DoGetBestSize() const
145{
146 return wxSize(0,0);
147}
148
149// ----------------------------------------------------------------------------
150// wxGauge setters
151// ----------------------------------------------------------------------------
152
153void wxGauge::SetRange(int r)
154{
155}
156
157void wxGauge::SetValue(int pos)
158{
159}
160
161bool wxGauge::SetForegroundColour(const wxColour& col)
162{
163 return false;
164}
165
166bool wxGauge::SetBackgroundColour(const wxColour& col)
167{
168 return false;
169}
170
171#endif // wxUSE_GAUGE