]> git.saurik.com Git - wxWidgets.git/commitdiff
adapting to widgetimpl extensions and iPhone OS 3.0
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 10 Jul 2009 19:19:36 +0000 (19:19 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 10 Jul 2009 19:19:36 +0000 (19:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/iphone/private.h
src/osx/carbon/dcscreen.cpp
src/osx/cocoa/textctrl.mm
src/osx/iphone/window.mm

index 0782922cb9d9065972c075071bfed073aa3b7a7d..252b26c10e1ea611c8184b170badc7d143903b03 100644 (file)
@@ -78,7 +78,11 @@ public :
 
     wxInt32             GetValue() const;
     void                SetValue( wxInt32 v );
 
     wxInt32             GetValue() const;
     void                SetValue( wxInt32 v );
-    void                SetBitmap( const wxBitmap& bitmap );
+
+    virtual wxBitmap    GetBitmap() const;
+    virtual void        SetBitmap( const wxBitmap& bitmap );
+    virtual void        SetBitmapPosition( wxDirection dir );
+       
     void                SetupTabs( const wxNotebook &notebook );
     void                GetBestRect( wxRect *r ) const;
     bool                IsEnabled() const;
     void                SetupTabs( const wxNotebook &notebook );
     void                GetBestRect( wxRect *r ) const;
     bool                IsEnabled() const;
index 0777c55d525f5fef20ad7f574f1517077237e32f..9dfcfef8701d014866b642963907c4a6eaa0077b 100644 (file)
@@ -30,10 +30,14 @@ IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl)
 wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
    wxWindowDCImpl( owner )
 {
 wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
    wxWindowDCImpl( owner )
 {
+#if wxOSX_USE_COCOA_OR_CARBON
     CGRect cgbounds ;
     cgbounds = CGDisplayBounds(CGMainDisplayID());
     m_width = (wxCoord)cgbounds.size.width;
     m_height = (wxCoord)cgbounds.size.height;
     CGRect cgbounds ;
     cgbounds = CGDisplayBounds(CGMainDisplayID());
     m_width = (wxCoord)cgbounds.size.width;
     m_height = (wxCoord)cgbounds.size.height;
+#else
+       wxDisplaySize( &m_width, &m_height );
+#endif
 #if wxOSX_USE_COCOA_OR_IPHONE
     SetGraphicsContext( wxGraphicsContext::Create() );
 #else
 #if wxOSX_USE_COCOA_OR_IPHONE
     SetGraphicsContext( wxGraphicsContext::Create() );
 #else
index 2b12dac53bcaeb62dd47dae7bd1f53323ecce700..c9dbe0b1aef8f217f5c5562b22b91c5a57f1dbcc 100644 (file)
@@ -141,7 +141,7 @@ protected :
 
 - (void) keyDown:(NSEvent*) event
 {
 
 - (void) keyDown:(NSEvent*) event
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     lastKeyDownEvent = event;
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super keyDown:event];
     lastKeyDownEvent = event;
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super keyDown:event];
@@ -150,14 +150,14 @@ protected :
 
 - (void) keyUp:(NSEvent*) event
 {
 
 - (void) keyUp:(NSEvent*) event
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super keyUp:event];
 }
 
 - (void) flagsChanged:(NSEvent*) event
 {
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super keyUp:event];
 }
 
 - (void) flagsChanged:(NSEvent*) event
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super flagsChanged:event];
 }
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super flagsChanged:event];
 }
@@ -170,7 +170,7 @@ protected :
 
 - (void) insertText:(id) str
 {
 
 - (void) insertText:(id) str
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     if ( impl == NULL || lastKeyDownEvent==nil || !impl->DoHandleCharEvent(lastKeyDownEvent, str) )
     {
         [super insertText:str];
     if ( impl == NULL || lastKeyDownEvent==nil || !impl->DoHandleCharEvent(lastKeyDownEvent, str) )
     {
         [super insertText:str];
index 9512048639492bf5c63271a0d7b521b02c1a248a..154329afb94eeffd22bb37048358a2f15101e9c8 100644 (file)
@@ -519,6 +519,16 @@ void wxWidgetIPhoneImpl::SetBitmap( const wxBitmap& bitmap )
 {
 }
 
 {
 }
 
+wxBitmap wxWidgetIPhoneImpl::GetBitmap() const
+{
+    wxBitmap bmp;
+    return bmp;
+}
+
+void wxWidgetIPhoneImpl::SetBitmapPosition( wxDirection dir )
+{
+}
+
 void wxWidgetIPhoneImpl::SetupTabs( const wxNotebook &notebook )
 {
 }
 void wxWidgetIPhoneImpl::SetupTabs( const wxNotebook &notebook )
 {
 }