]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/gauge.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/gauge.cpp
3 // Purpose: wxGauge class
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 "gauge.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
38 #include "wx/palmos/private.h"
40 // ----------------------------------------------------------------------------
42 // ----------------------------------------------------------------------------
45 #define PBS_SMOOTH 0x01
49 #define PBS_VERTICAL 0x04
52 #ifndef PBM_SETBARCOLOR
53 #define PBM_SETBARCOLOR (WM_USER+9)
56 #ifndef PBM_SETBKCOLOR
57 #define PBM_SETBKCOLOR 0x2001
60 // ----------------------------------------------------------------------------
62 // ----------------------------------------------------------------------------
64 #if wxUSE_EXTENDED_RTTI
65 WX_DEFINE_FLAGS( wxGaugeStyle
)
67 wxBEGIN_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
)
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
)
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
)
95 wxFLAGS_MEMBER(wxGA_HORIZONTAL
)
96 wxFLAGS_MEMBER(wxGA_VERTICAL
)
97 wxFLAGS_MEMBER(wxGA_PROGRESSBAR
)
98 wxFLAGS_MEMBER(wxGA_SMOOTH
)
100 wxEND_FLAGS( wxGaugeStyle
)
102 IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge
, wxControl
,"wx/gauge.h")
104 wxBEGIN_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
110 wxEND_PROPERTIES_TABLE()
112 wxBEGIN_HANDLERS_TABLE(wxGauge
)
113 wxEND_HANDLERS_TABLE()
115 wxCONSTRUCTOR_6( wxGauge
, wxWindow
* , Parent
, wxWindowID
, Id
, int , Range
, wxPoint
, Position
, wxSize
, Size
, long , WindowStyle
)
117 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
120 // ============================================================================
121 // wxGauge implementation
122 // ============================================================================
124 // ----------------------------------------------------------------------------
126 // ----------------------------------------------------------------------------
128 bool wxGauge::Create(wxWindow
*parent
,
134 const wxValidator
& validator
,
135 const wxString
& name
)
140 WXDWORD
wxGauge::MSWGetStyle(long style
, WXDWORD
*exstyle
) const
145 // ----------------------------------------------------------------------------
147 // ----------------------------------------------------------------------------
149 wxSize
wxGauge::DoGetBestSize() const
154 // ----------------------------------------------------------------------------
156 // ----------------------------------------------------------------------------
158 void wxGauge::SetRange(int r
)
162 void wxGauge::SetValue(int pos
)
166 bool wxGauge::SetForegroundColour(const wxColour
& col
)
171 bool wxGauge::SetBackgroundColour(const wxColour
& col
)
176 #endif // wxUSE_GAUGE