1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/gauge_osx.cpp
3 // Purpose: wxGauge class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
18 #include "wx/osx/private.h"
20 bool wxGauge
::Create( wxWindow
*parent
,
26 const wxValidator
& validator
,
27 const wxString
& name
)
29 m_macIsUserPane
= false;
31 if ( !wxGaugeBase
::Create( parent
, id
, range
, pos
, s
, style
& 0xE0FFFFFF, validator
, name
) )
36 SetPeer(wxWidgetImpl
::CreateGauge( this, parent
, id
, GetValue() , 0, GetRange(), pos
, size
, style
, GetExtraStyle() ));
38 MacPostControlCreate( pos
, size
);
43 void wxGauge
::SetRange(int r
)
45 // we are going via the base class in case there is
46 // some change behind the values by it
47 wxGaugeBase
::SetRange( r
) ;
49 GetPeer()->SetMaximum( GetRange() ) ;
52 void wxGauge
::SetValue(int pos
)
54 // we are going via the base class in case there is
55 // some change behind the values by it
56 wxGaugeBase
::SetValue( pos
) ;
59 GetPeer()->SetValue( GetValue() ) ;
62 int wxGauge
::GetValue() const
69 GetPeer()->PulseGauge();