Add detachmenu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7682a175b6
commit
ea9a4296a2
@ -68,6 +68,7 @@ public:
|
||||
|
||||
bool Show(bool show);
|
||||
|
||||
void DetachMenuBar();
|
||||
// Set menu bar
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar() const;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user