// Modified by:
// Created: 26.10.99
// RCS-ID: $Id$
-// Copyright: (c) wxWindows team
+// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
{
wxCHECK_RET( submenu, _T("can't add a NULL submenu") );
- if ( m_menuBar )
- {
- submenu->Attach(m_menuBar);
- }
-
submenu->SetParent((wxMenu *)this);
}
// wxMenu attaching/detaching to/from menu bar
// ----------------------------------------------------------------------------
+wxMenuBar* wxMenuBase::GetMenuBar() const
+{
+ if(GetParent())
+ return GetParent()->GetMenuBar();
+ return m_menuBar;
+}
+
void wxMenuBase::Attach(wxMenuBarBase *menubar)
{
// use Detach() instead!