Add detachmenu
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,6 +68,7 @@ public:
|
|||||||
|
|
||||||
bool Show(bool show);
|
bool Show(bool show);
|
||||||
|
|
||||||
|
void DetachMenuBar();
|
||||||
// Set menu bar
|
// Set menu bar
|
||||||
void SetMenuBar(wxMenuBar *menu_bar);
|
void SetMenuBar(wxMenuBar *menu_bar);
|
||||||
virtual wxMenuBar *GetMenuBar() const;
|
virtual wxMenuBar *GetMenuBar() const;
|
||||||
|
@@ -418,12 +418,20 @@ void wxFrame::PositionStatusBar()
|
|||||||
}
|
}
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
|
void wxFrame::DetachMenuBar()
|
||||||
|
{
|
||||||
|
if (m_frameMenuBar)
|
||||||
|
{
|
||||||
|
m_frameMenuBar->Detach();
|
||||||
|
m_frameMenuBar = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxFrame::SetMenuBar(wxMenuBar *menu_bar)
|
void wxFrame::SetMenuBar(wxMenuBar *menu_bar)
|
||||||
{
|
{
|
||||||
if (!menu_bar)
|
if (!menu_bar)
|
||||||
{
|
{
|
||||||
delete m_frameMenuBar;
|
DetachMenuBar();
|
||||||
m_frameMenuBar = NULL;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user