]>
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 - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
34 #include "wx/palmos/private.h"
36 // ----------------------------------------------------------------------------
38 // ----------------------------------------------------------------------------
41 #define PBS_SMOOTH 0x01
45 #define PBS_VERTICAL 0x04
48 #ifndef PBM_SETBARCOLOR
49 #define PBM_SETBARCOLOR (WM_USER+9)
52 #ifndef PBM_SETBKCOLOR
53 #define PBM_SETBKCOLOR 0x2001
56 // ----------------------------------------------------------------------------
58 // ----------------------------------------------------------------------------
60 #if wxUSE_EXTENDED_RTTI
61 WX_DEFINE_FLAGS( wxGaugeStyle
)
63 wxBEGIN_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
)
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
)
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
)
91 wxFLAGS_MEMBER(wxGA_HORIZONTAL
)
92 wxFLAGS_MEMBER(wxGA_VERTICAL
)
93 wxFLAGS_MEMBER(wxGA_PROGRESSBAR
)
94 wxFLAGS_MEMBER(wxGA_SMOOTH
)
96 wxEND_FLAGS( wxGaugeStyle
)
98 IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge
, wxControl
,"wx/gauge.h")
100 wxBEGIN_PROPERTIES_TABLE(wxGauge
)
101 wxPROPERTY( Value
, int , SetValue
, GetValue
, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
102 wxPROPERTY( Range
, int , SetRange
, GetRange
, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
103 wxPROPERTY( ShadowWidth
, int , SetShadowWidth
, GetShadowWidth
, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
104 wxPROPERTY( BezelFace
, int , SetBezelFace
, GetBezelFace
, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
105 wxPROPERTY_FLAGS( WindowStyle
, wxGaugeStyle
, long , SetWindowStyleFlag
, GetWindowStyleFlag
, EMPTY_MACROVALUE
, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
106 wxEND_PROPERTIES_TABLE()
108 wxBEGIN_HANDLERS_TABLE(wxGauge
)
109 wxEND_HANDLERS_TABLE()
111 wxCONSTRUCTOR_6( wxGauge
, wxWindow
* , Parent
, wxWindowID
, Id
, int , Range
, wxPoint
, Position
, wxSize
, Size
, long , WindowStyle
)
113 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
116 // ============================================================================
117 // wxGauge implementation
118 // ============================================================================
120 // ----------------------------------------------------------------------------
122 // ----------------------------------------------------------------------------
124 bool wxGauge::Create(wxWindow
*parent
,
130 const wxValidator
& validator
,
131 const wxString
& name
)
136 WXDWORD
wxGauge::MSWGetStyle(long style
, WXDWORD
*exstyle
) const
141 // ----------------------------------------------------------------------------
143 // ----------------------------------------------------------------------------
145 wxSize
wxGauge::DoGetBestSize() const
150 // ----------------------------------------------------------------------------
152 // ----------------------------------------------------------------------------
154 void wxGauge::SetRange(int r
)
158 void wxGauge::SetValue(int pos
)
162 bool wxGauge::SetForegroundColour(const wxColour
& col
)
167 bool wxGauge::SetBackgroundColour(const wxColour
& col
)
172 #endif // wxUSE_GAUGE