]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/gauge.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGauge class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
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
,
32 m_macIsUserPane
= FALSE
;
34 if ( !wxGaugeBase::Create(parent
, id
, range
, pos
, s
, style
& 0xE0FFFFFF, validator
, name
) )
42 if ( size
.x
== wxDefaultSize
.x
&& size
.y
== wxDefaultSize
.y
)
44 size
= wxSize( 200 , 16 ) ;
47 Rect bounds
= wxMacGetBoundsForControl( this , pos
, size
) ;
48 verify_noerr ( CreateProgressBarControl( MAC_WXHWND(parent
->MacGetTopLevelWindowRef()) , &bounds
,
49 m_gaugePos
, 0 , m_rangeMax
, false /* not indeterminate */ , (ControlRef
*) &m_macControl
) ) ;
51 MacPostControlCreate(pos
,size
) ;
56 void wxGauge::SetShadowWidth(int w
)
60 void wxGauge::SetBezelFace(int w
)
64 void wxGauge::SetRange(int r
)
67 ::SetControl32BitMaximum( (ControlRef
) m_macControl
, m_rangeMax
) ;
70 void wxGauge::SetValue(int pos
)
73 ::SetControl32BitValue( (ControlRef
) m_macControl
, m_gaugePos
) ;
76 int wxGauge::GetShadowWidth() const
81 int wxGauge::GetBezelFace() const
86 int wxGauge::GetRange() const
91 int wxGauge::GetValue() const