]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/gauge_osx.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/gauge_osx.cpp
3 // Purpose: wxGauge class
4 // Author: Stefan Csomor
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/wxprec.h"
17 #include "wx/osx/private.h"
19 bool wxGauge::Create( wxWindow
*parent
,
25 const wxValidator
& validator
,
26 const wxString
& name
)
30 if ( !wxGaugeBase::Create( parent
, id
, range
, pos
, s
, style
& 0xE0FFFFFF, validator
, name
) )
35 SetPeer(wxWidgetImpl::CreateGauge( this, parent
, id
, GetValue() , 0, GetRange(), pos
, size
, style
, GetExtraStyle() ));
37 MacPostControlCreate( pos
, size
);
42 void wxGauge::SetRange(int r
)
44 // we are going via the base class in case there is
45 // some change behind the values by it
46 wxGaugeBase::SetRange( r
) ;
48 GetPeer()->SetMaximum( GetRange() ) ;
51 void wxGauge::SetValue(int pos
)
53 // we are going via the base class in case there is
54 // some change behind the values by it
55 wxGaugeBase::SetValue( pos
) ;
58 GetPeer()->SetValue( GetValue() ) ;
61 int wxGauge::GetValue() const
68 GetPeer()->PulseGauge();