]> git.saurik.com Git - wxWidgets.git/commitdiff
adding support for enabled property, avoiding missing return values
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 7 Jul 2012 13:24:05 +0000 (13:24 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 7 Jul 2012 13:24:05 +0000 (13:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/iphone/window.mm

index d453aa88710ab81becb7a32ce4a8415e7a1f55f7..2ad2b7e27f9107bda00d7c73ee7d2ec342ca3100 100644 (file)
@@ -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()