]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/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
,
37 if ( size
.x
== wxDefaultSize
.x
&& size
.y
== wxDefaultSize
.y
)
39 size
= wxSize( 200 , 16 ) ;
42 MacPreControlCreate( parent
, id
, "" , pos
, size
,style
& 0xE0FFFFFF /* no borders on mac */ , validator
, name
, &bounds
, title
) ;
44 m_macControl
= UMANewControl( parent
->GetMacRootWindow() , &bounds
, title
, false , 0 , 0 , range
,
45 kControlProgressBarProc
, (long) this ) ;
47 MacPostControlCreate() ;
52 void wxGauge::SetShadowWidth(int w
)
56 void wxGauge::SetBezelFace(int w
)
60 void wxGauge::SetRange(int r
)
63 ::SetControlMaximum( m_macControl
, m_rangeMax
) ;
66 void wxGauge::SetValue(int pos
)
69 ::SetControlValue( m_macControl
, m_gaugePos
) ;
72 int wxGauge::GetShadowWidth() const
77 int wxGauge::GetBezelFace() const
82 int wxGauge::GetRange() const
87 int wxGauge::GetValue() const