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