]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/frame.cpp
corrected path splitting for mac relative paths
[wxWidgets.git] / src / os2 / frame.cpp
index 978eb7c13d33dd8841363e1614b269abc936f070..a273ada371dc545c07354bd9eaca5f13dbedb7ef 100644 (file)
@@ -30,6 +30,7 @@
     #include "wx/dialog.h"
     #include "wx/settings.h"
     #include "wx/dcclient.h"
     #include "wx/dialog.h"
     #include "wx/settings.h"
     #include "wx/dcclient.h"
+    #include "wx/mdi.h"
 #endif // WX_PRECOMP
 
 #include "wx/os2/private.h"
 #endif // WX_PRECOMP
 
 #include "wx/os2/private.h"
@@ -143,7 +144,6 @@ bool wxFrame::Create(
                                   ,rsName
                                  ))
         return FALSE;
                                   ,rsName
                                  ))
         return FALSE;
-    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
     wxModelessWindows.Append(this);
     return TRUE;
 } // end of wxFrame::Create
     wxModelessWindows.Append(this);
     return TRUE;
 } // end of wxFrame::Create
@@ -210,21 +210,6 @@ void wxFrame::Raise()
                      );
 }
 
                      );
 }
 
-// generate an artificial resize event
-void wxFrame::SendSizeEvent()
-{
-    if (!m_bIconized)
-    {
-        RECTL                       vRect = wxGetWindowRect(GetHwnd());
-
-        (void)::WinPostMsg( m_hFrame
-                           ,WM_SIZE
-                           ,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
-                           ,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
-                          );
-    }
-}
-
 #if wxUSE_STATUSBAR
 wxStatusBar* wxFrame::OnCreateStatusBar(
   int                               nNumber
 #if wxUSE_STATUSBAR
 wxStatusBar* wxFrame::OnCreateStatusBar(
   int                               nNumber
@@ -247,6 +232,26 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
     if( !pStatusBar )
         return NULL;
 
     if( !pStatusBar )
         return NULL;
 
+    wxClientDC                      vDC(pStatusBar);
+    int                             nY;
+
+    //
+    // Set the height according to the font and the border size
+    //
+    vDC.SetFont(pStatusBar->GetFont()); // Screws up the menues for some reason
+    vDC.GetTextExtent( "X"
+                      ,NULL
+                      ,&nY
+                     );
+
+    int                             nHeight = ((11 * nY) / 10 + 2 * pStatusBar->GetBorderY());
+
+    pStatusBar->SetSize( -1
+                        ,-1
+                        ,-1
+                        ,nHeight
+                       );
+
     ::WinSetParent( pStatusBar->GetHWND()
                    ,m_hFrame
                    ,FALSE
     ::WinSetParent( pStatusBar->GetHWND()
                    ,m_hFrame
                    ,FALSE