This keyword is not expanded by Git which means it's not replaced with the correct revision value in the releases made using git-based scripts and it's confusing to have lines with unexpanded "$Id$" in the released files. As expanding them with Git is not that simple (it could be done with git archive and export-subst attribute) and there are not many benefits in having them in the first place, just remove all these lines. If nothing else, this will make an eventual transition to Git simpler. Closes #14487. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
80 lines
1.9 KiB
Plaintext
80 lines
1.9 KiB
Plaintext
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/osx/iphone/checkbox.mm
|
|
// Purpose: wxCheckBox
|
|
// Author: Stefan Csomor
|
|
// Modified by:
|
|
// Created: 2008-08-20
|
|
// Copyright: (c) Stefan Csomor
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "wx/wxprec.h"
|
|
|
|
#if wxUSE_CHECKBOX
|
|
|
|
#include "wx/checkbox.h"
|
|
#include "wx/osx/private.h"
|
|
|
|
@interface wxUISwitch : UISwitch
|
|
{
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation wxUISwitch
|
|
|
|
+ (void)initialize
|
|
{
|
|
static BOOL initialized = NO;
|
|
if (!initialized)
|
|
{
|
|
initialized = YES;
|
|
wxOSXIPhoneClassAddWXMethods( self );
|
|
}
|
|
}
|
|
|
|
@end
|
|
|
|
class wxCheckBoxIPhoneImpl : public wxWidgetIPhoneImpl
|
|
{
|
|
public:
|
|
wxCheckBoxIPhoneImpl(wxWindowMac *wxpeer, UISwitch *v)
|
|
: wxWidgetIPhoneImpl(wxpeer, v)
|
|
{
|
|
m_control = v;
|
|
}
|
|
|
|
wxInt32 GetValue() const
|
|
{
|
|
return [m_control isOn] ? 1 : 0;
|
|
}
|
|
|
|
void SetValue( wxInt32 v )
|
|
{
|
|
[m_control setOn:v != 0 animated:NO];
|
|
}
|
|
private:
|
|
UISwitch* m_control;
|
|
};
|
|
|
|
wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
|
|
wxWindowMac* WXUNUSED(parent),
|
|
wxWindowID WXUNUSED(id),
|
|
const wxString& WXUNUSED(label),
|
|
const wxPoint& pos,
|
|
const wxSize& size,
|
|
long style,
|
|
long WXUNUSED(extraStyle))
|
|
{
|
|
CGRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
|
|
wxUISwitch* v = [[wxUISwitch alloc] initWithFrame:r];
|
|
|
|
// if (style & wxCHK_3STATE)
|
|
// [v setAllowsMixedState:YES];
|
|
|
|
wxCheckBoxIPhoneImpl* c = new wxCheckBoxIPhoneImpl( wxpeer, v );
|
|
return c;
|
|
}
|
|
|
|
#endif
|