+
+void wxFrameBase::DetachMenuBar()
+{
+ if ( m_frameMenuBar )
+ {
+ m_frameMenuBar->Detach();
+ m_frameMenuBar = NULL;
+ }
+}
+
+void wxFrameBase::AttachMenuBar(wxMenuBar *menubar)
+{
+ if ( menubar )
+ {
+ m_frameMenuBar = menubar;
+ menubar->Attach((wxFrame *)this);
+ }
+}
+
+void wxFrameBase::SetMenuBar(wxMenuBar *menubar)
+{
+ if ( menubar == GetMenuBar() )
+ {
+ // nothing to do
+ return;
+ }
+
+ DetachMenuBar();
+
+ AttachMenuBar(menubar);
+}
+
+#endif // wxUSE_MENUS