]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/classic/gauge.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGauge class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
14 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
16 #include "wx/mac/uma.h"
18 bool wxGauge::Create(wxWindow
*parent
, wxWindowID id
,
23 const wxValidator
& validator
,
26 if ( !wxGaugeBase::Create(parent
, id
, range
, pos
, s
, style
, validator
, name
) )
35 if ( size
.x
== wxDefaultCoord
&& size
.y
== wxDefaultCoord
)
37 size
= wxSize( 200 , 16 ) ;
40 MacPreControlCreate( parent
, id
, wxEmptyString
, pos
, size
,style
& 0xE0FFFFFF /* no borders on mac */ , validator
, name
, &bounds
, title
) ;
42 m_macControl
= (WXWidget
) ::NewControl( MAC_WXHWND(parent
->MacGetRootWindow()) , &bounds
, title
, false , 0 , 0 , range
,
43 kControlProgressBarProc
, (long) this ) ;
45 MacPostControlCreate() ;
50 void wxGauge::SetShadowWidth(int w
)
54 void wxGauge::SetBezelFace(int w
)
58 void wxGauge::SetRange(int r
)
61 ::SetControl32BitMaximum( (ControlHandle
) m_macControl
, m_rangeMax
) ;
64 void wxGauge::SetValue(int pos
)
67 ::SetControl32BitValue( (ControlHandle
) m_macControl
, m_gaugePos
) ;
70 int wxGauge::GetShadowWidth() const
75 int wxGauge::GetBezelFace() const
80 int wxGauge::GetRange() const
85 int wxGauge::GetValue() const