]>
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 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
20 #include <wx/mac/uma.h>
22 bool wxGauge::Create(wxWindow
*parent
, wxWindowID id
,
27 const wxValidator
& validator
,
34 m_macHorizontalBorder
= 2 ; // additional pixels around the real control
35 m_macVerticalBorder
= 2 ;
37 if ( size
.x
== wxDefaultSize
.x
&& size
.y
== wxDefaultSize
.y
)
39 size
= wxSize( 200 , 16 ) ;
42 MacPreControlCreate( parent
, id
, "" , pos
, size
,style
, validator
, name
, &bounds
, title
) ;
44 m_macControl
= UMANewControl( parent
->GetMacRootWindow() , &bounds
, title
, true , 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