]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/iphone/toolbar.mm
wxDataViewCtrl: Fully prepare renderer for Activate() call.
[wxWidgets.git] / src / osx / iphone / toolbar.mm
index 7ec0bac59ccbf59278cca6f62386e26dab4e6ce7..c65ee34d6664cb2a45f1fcc2887990b665c24da9 100644 (file)
@@ -121,7 +121,12 @@ wxToolBarToolBase(
     UIBarButtonItemStyle style = UIBarButtonItemStylePlain;
     wxUIToolbar* toolbar = (wxUIToolbar*) tbar->GetHandle();
     
-    if ( bmpNormal.Ok() )
+    if ( id == wxID_SEPARATOR )
+    {
+        [bui initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
+        bui.width = 25.0f;
+    }
+    else if ( bmpNormal.Ok() )
     {
         [bui initWithImage:bmpNormal.GetUIImage() style:UIBarButtonItemStylePlain target:toolbar
                       action:@selector(clickedAction:)];
@@ -227,6 +232,7 @@ bool wxToolBar::Create(
     
     switch ( [[UIApplication sharedApplication] statusBarStyle] ) 
     {
+#ifdef __IPHONE_3_0
         case UIStatusBarStyleBlackOpaque:
             toolbar.barStyle = UIBarStyleBlack;
             break;
@@ -234,6 +240,7 @@ bool wxToolBar::Create(
             toolbar.barStyle = UIBarStyleBlack;
             toolbar.translucent = YES;
             break;
+#endif
         default:
             toolbar.barStyle = UIBarStyleDefault;
             break;
@@ -242,7 +249,6 @@ bool wxToolBar::Create(
 
     m_peer = new wxWidgetIPhoneImpl( this, toolbar );    
     MacPostControlCreate(pos, size) ;
-    NSLog(@"toolbar was created %@",toolbar);
 }
 
 wxToolBar::~wxToolBar()
@@ -259,6 +265,18 @@ bool wxToolBar::Realize()
     return true;
 }
 
+void wxToolBar::DoLayout()
+{
+    // TODO port back osx_cocoa layout solution
+}
+
+void wxToolBar::DoSetSize(int x, int y, int width, int height, int sizeFlags)
+{
+    wxToolBarBase::DoSetSize(x, y, width, height, sizeFlags);
+    
+    DoLayout();
+} 
+
 void wxToolBar::SetToolBitmapSize(const wxSize& size)
 {
     m_defaultWidth = size.x;