mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 21:37:37 +02:00

long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
74 lines
1.7 KiB
C++
74 lines
1.7 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/osx/gauge_osx.cpp
|
|
// Purpose: wxGauge class
|
|
// Author: Stefan Csomor
|
|
// Modified by:
|
|
// Created: 1998-01-01
|
|
// RCS-ID: $Id: gauge_osx.cpp 67243 2011-03-19 08:36:23Z SC $
|
|
// Copyright: (c) Stefan Csomor
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "wx/wxprec.h"
|
|
|
|
#if wxUSE_GAUGE
|
|
|
|
#include "wx/gauge.h"
|
|
|
|
#include "wx/osx/private.h"
|
|
|
|
bool wxGauge::Create( wxWindow *parent,
|
|
wxWindowID id,
|
|
int range,
|
|
const wxPoint& pos,
|
|
const wxSize& s,
|
|
long style,
|
|
const wxValidator& validator,
|
|
const wxString& name )
|
|
{
|
|
DontCreatePeer();
|
|
|
|
if ( !wxGaugeBase::Create( parent, id, range, pos, s, style & 0xE0FFFFFF, validator, name ) )
|
|
return false;
|
|
|
|
wxSize size = s;
|
|
|
|
SetPeer(wxWidgetImpl::CreateGauge( this, parent, id, GetValue() , 0, GetRange(), pos, size, style, GetExtraStyle() ));
|
|
|
|
MacPostControlCreate( pos, size );
|
|
|
|
return true;
|
|
}
|
|
|
|
void wxGauge::SetRange(int r)
|
|
{
|
|
// we are going via the base class in case there is
|
|
// some change behind the values by it
|
|
wxGaugeBase::SetRange( r ) ;
|
|
if ( GetPeer() )
|
|
GetPeer()->SetMaximum( GetRange() ) ;
|
|
}
|
|
|
|
void wxGauge::SetValue(int pos)
|
|
{
|
|
// we are going via the base class in case there is
|
|
// some change behind the values by it
|
|
wxGaugeBase::SetValue( pos ) ;
|
|
|
|
if ( GetPeer() )
|
|
GetPeer()->SetValue( GetValue() ) ;
|
|
}
|
|
|
|
int wxGauge::GetValue() const
|
|
{
|
|
return m_gaugePos ;
|
|
}
|
|
|
|
void wxGauge::Pulse()
|
|
{
|
|
GetPeer()->PulseGauge();
|
|
}
|
|
|
|
#endif // wxUSE_GAUGE
|
|
|