- wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
-
-#if wxUSE_MENUS_NATIVE
- // menu bar
- if (m_frameMenuBar && !(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOMENUBAR) != 0))
- {
- if (!m_menuBarDetached)
- height += m_menuBarHeight;
- else
- height += wxPLACE_HOLDER;
- }
-#endif // wxUSE_MENUS_NATIVE
-
-#if wxUSE_STATUSBAR
- // status bar
- if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
- !(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0))
- height += wxSTATUS_HEIGHT;
-#endif
-
-#if wxUSE_TOOLBAR
- // tool bar
- if (m_frameToolBar && m_frameToolBar->IsShown())
+ if (!wxFrameBase::ShowFullScreen(show, style))
+ return false;
+
+ wxWindow* const bar[] = {
+ m_frameMenuBar, m_frameToolBar, m_frameStatusBar
+ };
+ const long fsNoBar[] = {
+ wxFULLSCREEN_NOMENUBAR, wxFULLSCREEN_NOTOOLBAR, wxFULLSCREEN_NOSTATUSBAR
+ };
+ for (int i = 0; i < 3; i++)
+ {
+ if (show)