]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/gauge.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGauge class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "gauge.h"
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
22 #include "wx/mac/uma.h"
24 bool wxGauge::Create(wxWindow
*parent
, wxWindowID id
,
29 const wxValidator
& validator
,
38 if ( size
.x
== wxDefaultSize
.x
&& size
.y
== wxDefaultSize
.y
)
40 size
= wxSize( 200 , 16 ) ;
43 MacPreControlCreate( parent
, id
, "" , pos
, size
,style
& 0xE0FFFFFF /* no borders on mac */ , validator
, name
, &bounds
, title
) ;
45 m_macControl
= ::NewControl( MAC_WXHWND(parent
->MacGetRootWindow()) , &bounds
, title
, false , 0 , 0 , range
,
46 kControlProgressBarProc
, (long) this ) ;
48 MacPostControlCreate() ;
53 void wxGauge::SetShadowWidth(int w
)
57 void wxGauge::SetBezelFace(int w
)
61 void wxGauge::SetRange(int r
)
64 ::SetControlMaximum( (ControlHandle
) m_macControl
, m_rangeMax
) ;
67 void wxGauge::SetValue(int pos
)
70 ::SetControlValue( (ControlHandle
) m_macControl
, m_gaugePos
) ;
73 int wxGauge::GetShadowWidth() const
78 int wxGauge::GetBezelFace() const
83 int wxGauge::GetRange() const
88 int wxGauge::GetValue() const