]>
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
,
36 m_macHorizontalBorder
= 2 ; // additional pixels around the real control
37 m_macVerticalBorder
= 2 ;
39 if ( size
.x
== wxDefaultSize
.x
&& size
.y
== wxDefaultSize
.y
)
41 size
= wxSize( 200 , 16 ) ;
44 MacPreControlCreate( parent
, id
, "" , pos
, size
,style
, validator
, name
, &bounds
, title
) ;
46 m_macControl
= UMANewControl( parent
->GetMacRootWindow() , &bounds
, title
, true , 0 , 0 , range
,
47 kControlProgressBarProc
, (long) this ) ;
49 MacPostControlCreate() ;
54 void wxGauge::SetShadowWidth(int w
)
58 void wxGauge::SetBezelFace(int w
)
62 void wxGauge::SetRange(int r
)
65 ::SetControlMaximum( m_macControl
, m_rangeMax
) ;
68 void wxGauge::SetValue(int pos
)
71 ::SetControlValue( m_macControl
, m_gaugePos
) ;
74 int wxGauge::GetShadowWidth() const
79 int wxGauge::GetBezelFace() const
84 int wxGauge::GetRange() const
89 int wxGauge::GetValue() const