X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/21802234dfc226c369e7d48af58e6c1b7f7242a3..76db86e7e18d308dec0b0d6e9ab817775a8ab278:/src/os2/frame.cpp diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index ec935b6d24..80c284ad61 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -51,7 +51,9 @@ bool wxFrame::m_useNativeStatusBar = FALSE; wxFrame::wxFrame() { +#if wxUSE_TOOLBAR m_frameToolBar = NULL ; +#endif m_frameMenuBar = NULL; m_frameStatusBar = NULL; @@ -74,7 +76,9 @@ bool wxFrame::Create( wxWindow *parent SetName(name); m_windowStyle = style; m_frameMenuBar = NULL; +#if wxUSE_TOOLBAR m_frameToolBar = NULL ; +#endif m_frameStatusBar = NULL; SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); @@ -339,7 +343,7 @@ wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id, { // VZ: calling CreateStatusBar twice is an error - why anyone would do it? wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, - T("recreating status bar in wxFrame") ); + wxT("recreating status bar in wxFrame") ); m_frameStatusBar = OnCreateStatusBar(number, style, id, name); @@ -354,14 +358,14 @@ wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id, void wxFrame::SetStatusText(const wxString& text, int number) { - wxCHECK_RET( m_frameStatusBar != NULL, T("no statusbar to set text for") ); + wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") ); m_frameStatusBar->SetStatusText(text, number); } void wxFrame::SetStatusWidths(int n, const int widths_field[]) { - wxCHECK_RET( m_frameStatusBar != NULL, T("no statusbar to set widths for") ); + wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set widths for") ); m_frameStatusBar->SetStatusWidths(n, widths_field); PositionStatusBar(); @@ -401,7 +405,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menu_bar) return; } -// Fix this in wxMenuBar wxCHECK_RET( !menu_bar->GetFrame(), T("this menubar is already attached") ); +// Fix this in wxMenuBar wxCHECK_RET( !menu_bar->GetFrame(), wxT("this menubar is already attached") ); if (m_frameMenuBar) delete m_frameMenuBar; @@ -666,6 +670,7 @@ bool wxFrame::ProcessCommand(int id) wxPoint wxFrame::GetClientAreaOrigin() const { wxPoint pt(0, 0); +#if wxUSE_TOOLBAR if (GetToolBar()) { int w, h; @@ -680,10 +685,11 @@ wxPoint wxFrame::GetClientAreaOrigin() const pt.y += h; } } +#endif return pt; } -void wxFrame::ScreenToClient(int *x, int *y) const +void wxFrame::DoScreenToClient(int *x, int *y) const { wxWindow::ScreenToClient(x, y); @@ -695,7 +701,7 @@ void wxFrame::ScreenToClient(int *x, int *y) const *y -= pt.y; } -void wxFrame::ClientToScreen(int *x, int *y) const +void wxFrame::DoClientToScreen(int *x, int *y) const { // We may be faking the client origin. // So a window that's really at (0, 30) may appear @@ -704,14 +710,14 @@ void wxFrame::ClientToScreen(int *x, int *y) const *x += pt1.x; *y += pt1.y; - wxWindow::ClientToScreen(x, y); + wxWindow::DoClientToScreen(x, y); } #if wxUSE_TOOLBAR wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) { wxCHECK_MSG( m_frameToolBar == NULL, FALSE, - T("recreating toolbar in wxFrame") ); + wxT("recreating toolbar in wxFrame") ); wxToolBar* toolBar = OnCreateToolBar(style, id, name); if (toolBar) @@ -905,7 +911,9 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id) if ( !m_iconized ) { PositionStatusBar(); +#if wxUSE_TOOLBAR PositionToolBar(); +#endif wxSizeEvent event(wxSize(x, y), m_windowId); event.SetEventObject( this );