moving value setting conformance to impl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,18 +34,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) intValue
|
|
||||||
{
|
|
||||||
return [self isOn] ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) setIntValue: (int) v
|
|
||||||
{
|
|
||||||
[self setOn:v != 0 animated:NO];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@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,
|
wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
|
||||||
wxWindowMac* WXUNUSED(parent),
|
wxWindowMac* WXUNUSED(parent),
|
||||||
wxWindowID WXUNUSED(id),
|
wxWindowID WXUNUSED(id),
|
||||||
@@ -61,7 +73,7 @@ wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
|
|||||||
// if (style & wxCHK_3STATE)
|
// if (style & wxCHK_3STATE)
|
||||||
// [v setAllowsMixedState:YES];
|
// [v setAllowsMixedState:YES];
|
||||||
|
|
||||||
wxWidgetIPhoneImpl* c = new wxWidgetIPhoneImpl( wxpeer, v );
|
wxCheckBoxIPhoneImpl* c = new wxCheckBoxIPhoneImpl( wxpeer, v );
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user