]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/classic/gauge.cpp
a9c5f876495f77a9e624276f45ec04d9663cd48f
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 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
20 #include "wx/mac/uma.h"
22 bool wxGauge::Create(wxWindow
*parent
, wxWindowID id
,
27 const wxValidator
& validator
,
30 if ( !wxGaugeBase::Create(parent
, id
, range
, pos
, s
, style
, validator
, name
) )
39 if ( size
.x
== wxDefaultCoord
&& size
.y
== wxDefaultCoord
)
41 size
= wxSize( 200 , 16 ) ;
44 MacPreControlCreate( parent
, id
, wxEmptyString
, pos
, size
,style
& 0xE0FFFFFF /* no borders on mac */ , validator
, name
, &bounds
, title
) ;
46 m_macControl
= (WXWidget
) ::NewControl( MAC_WXHWND(parent
->MacGetRootWindow()) , &bounds
, title
, false , 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 ::SetControl32BitMaximum( (ControlHandle
) m_macControl
, m_rangeMax
) ;
68 void wxGauge::SetValue(int pos
)
71 ::SetControl32BitValue( (ControlHandle
) m_macControl
, m_gaugePos
) ;
74 int wxGauge::GetShadowWidth() const
79 int wxGauge::GetBezelFace() const
84 int wxGauge::GetRange() const
89 int wxGauge::GetValue() const