// Created: 01/02/97
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling and Julian Smart
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
{
wxPoint pt = wxTopLevelWindow::GetClientAreaOrigin();
-#if wxUSE_TOOLBAR && !defined(__WXUNIVERSAL__) && \
- (!defined(__WXWINCE__) || (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && !defined(WIN32_PLATFORM_WFSP)))
+#if wxUSE_TOOLBAR && !defined(__WXUNIVERSAL__)
wxToolBar *toolbar = GetToolBar();
if ( toolbar && toolbar->IsShown() )
{
void wxFrameBase::UpdateWindowUI(long flags)
{
wxWindowBase::UpdateWindowUI(flags);
-
+
#if wxUSE_TOOLBAR
if (GetToolBar())
GetToolBar()->UpdateWindowUI(flags);
void wxFrameBase::OnInternalIdle()
{
wxTopLevelWindow::OnInternalIdle();
-
+
#if wxUSE_MENUS && wxUSE_IDLEMENUUPDATES
if (wxUpdateUIEvent::CanUpdate(this))
DoMenuUpdates();
wxCHECK_MSG( !m_frameStatusBar, (wxStatusBar *)NULL,
wxT("recreating status bar in wxFrame") );
- m_frameStatusBar = OnCreateStatusBar( number, style, id, name );
- if ( m_frameStatusBar )
- PositionStatusBar();
+ SetStatusBar(OnCreateStatusBar(number, style, id, name));
return m_frameStatusBar;
}
#endif // wxUSE_MENUS/!wxUSE_MENUS
}
+void wxFrameBase::SetStatusBar(wxStatusBar *statBar)
+{
+ bool hadBar = m_frameStatusBar != NULL;
+ m_frameStatusBar = statBar;
+
+ if ( (m_frameStatusBar != NULL) != hadBar )
+ {
+ PositionStatusBar();
+
+ DoLayout();
+ }
+}
+
#endif // wxUSE_STATUSBAR
void wxFrameBase::DoGiveHelp(const wxString& text, bool show)
}
statbar->SetStatusText(help, m_statusBarPane);
+#else
+ wxUnusedVar(text);
+ wxUnusedVar(show);
#endif // wxUSE_STATUSBAR
}
style = wxBORDER_NONE | wxTB_HORIZONTAL | wxTB_FLAT;
}
- m_frameToolBar = OnCreateToolBar(style, id, name);
+ SetToolBar(OnCreateToolBar(style, id, name));
return m_frameToolBar;
}
style, name);
}
+void wxFrameBase::SetToolBar(wxToolBar *toolbar)
+{
+ bool hadBar = m_frameToolBar != NULL;
+ m_frameToolBar = toolbar;
+
+ if ( (m_frameToolBar != NULL) != hadBar )
+ {
+ PositionToolBar();
+
+ DoLayout();
+ }
+}
+
#endif // wxUSE_TOOLBAR
// ----------------------------------------------------------------------------