From 9d294e51cd846e312a3ca78ccb0e69aa05bd5233 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 7 Jul 2012 13:24:05 +0000 Subject: [PATCH] adding support for enabled property, avoiding missing return values git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/iphone/window.mm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index d453aa8871..2ad2b7e27f 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -561,10 +561,22 @@ void wxWidgetIPhoneImpl::GetBestRect( wxRect *r ) const bool wxWidgetIPhoneImpl::IsEnabled() const { + UIView* targetView = m_osxView; + // TODO add support for documentViews + + if ( [targetView respondsToSelector:@selector(isEnabled) ] ) + return [targetView isEnabled]; + + return true; } void wxWidgetIPhoneImpl::Enable( bool enable ) { + UIView* targetView = m_osxView; + // TODO add support for documentViews + + if ( [targetView respondsToSelector:@selector(setEnabled:) ] ) + [targetView setEnabled:enable]; } void wxWidgetIPhoneImpl::SetMinimum( wxInt32 v ) @@ -577,10 +589,12 @@ void wxWidgetIPhoneImpl::SetMaximum( wxInt32 v ) wxInt32 wxWidgetIPhoneImpl::GetMinimum() const { + return 0; } wxInt32 wxWidgetIPhoneImpl::GetMaximum() const { + return 0; } void wxWidgetIPhoneImpl::PulseGauge() -- 2.45.2