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