]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/frame.cpp
fix compilation error after r50329: wxMenu doesn't have HandleWindowEvent() as it...
[wxWidgets.git] / src / mac / carbon / frame.cpp
index 47d8fd32cb8c3b3695dc0c345e1ed4e8c0554f12..b4da3e565f4811e0a434d6d681b06343f37d4486 100644 (file)
@@ -117,6 +117,7 @@ bool wxFrame::Enable(bool enable)
     return true;
 }
 
+#if wxUSE_STATUSBAR
 wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id,
     const wxString& name)
 {
@@ -141,6 +142,7 @@ void wxFrame::PositionStatusBar()
         m_frameStatusBar->SetSize(0, h, w, WX_MAC_STATUSBAR_HEIGHT);
     }
 }
+#endif // wxUSE_STATUSBAR
 
 // Responds to colour changes, and passes event on to children.
 void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
@@ -148,6 +150,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
     Refresh();
 
+#if wxUSE_STATUSBAR
     if ( m_frameStatusBar )
     {
         wxSysColourChangedEvent event2;
@@ -155,6 +158,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
         event2.SetEventObject( m_frameStatusBar );
         m_frameStatusBar->ProcessEvent(event2);
     }
+#endif // wxUSE_STATUSBAR
 
     // Propagate the event to the non-top-level children
     wxWindow::OnSysColourChanged(event);
@@ -344,14 +348,17 @@ void wxFrame::PositionToolBar()
     int cw, ch;
 
     GetSize( &cw , &ch ) ;
-
-    int statusX, statusY;
-    GetStatusBar()->GetClientSize(&statusX, &statusY);
             
+    int statusX = 0 ;
+    int statusY = 0 ;
+
+#if wxUSE_STATUSBAR
     if (GetStatusBar() && GetStatusBar()->IsShown())
     {
+        GetStatusBar()->GetClientSize(&statusX, &statusY);
         ch -= statusY;
     }
+#endif
 
     if (GetToolBar())
     {
@@ -384,6 +391,7 @@ void wxFrame::PositionToolBar()
         }
     }
 }
+#endif // wxUSE_TOOLBAR
 
 void wxFrame::PositionBars()
 {
@@ -395,4 +403,4 @@ void wxFrame::PositionBars()
 #endif
 }
 
-#endif
+