Add detachmenu

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Unknown (MT) 1999-09-13 07:16:18 +00:00
parent 7682a175b6
commit ea9a4296a2
2 changed files with 11 additions and 2 deletions

View File

@ -68,6 +68,7 @@ public:
bool Show(bool show);
void DetachMenuBar();
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
virtual wxMenuBar *GetMenuBar() const;

View File

@ -418,12 +418,20 @@ void wxFrame::PositionStatusBar()
}
#endif // wxUSE_STATUSBAR
void wxFrame::DetachMenuBar()
{
if (m_frameMenuBar)
{
m_frameMenuBar->Detach();
m_frameMenuBar = NULL;
}
}
void wxFrame::SetMenuBar(wxMenuBar *menu_bar)
{
if (!menu_bar)
{
delete m_frameMenuBar;
m_frameMenuBar = NULL;
DetachMenuBar();
return;
}