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