]>
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 // RCS-ID: $Id: gauge.cpp 54820 2008-07-29 20:04:11Z SC $
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
18 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
20 #include "wx/osx/private.h"
22 bool wxGauge::Create( wxWindow
*parent
,
28 const wxValidator
& validator
,
29 const wxString
& name
)
31 m_macIsUserPane
= false;
33 if ( !wxGaugeBase::Create( parent
, id
, range
, pos
, s
, style
& 0xE0FFFFFF, validator
, name
) )
38 m_peer
= wxWidgetImpl::CreateGauge( this, parent
, id
, GetValue() , 0, GetRange(), pos
, size
, style
, GetExtraStyle() );
40 MacPostControlCreate( pos
, size
);
45 void wxGauge::SetRange(int r
)
47 // we are going via the base class in case there is
48 // some change behind the values by it
49 wxGaugeBase::SetRange( r
) ;
51 m_peer
->SetMaximum( GetRange() ) ;
54 void wxGauge::SetValue(int pos
)
56 // we are going via the base class in case there is
57 // some change behind the values by it
58 wxGaugeBase::SetValue( pos
) ;
61 m_peer
->SetValue( GetValue() ) ;
64 int wxGauge::GetValue() const