#endif
#include "wx/mdi.h"
+#include "wx/dialog.h"
+#include "wx/menu.h"
#include "wx/gtk/win_gtk.h"
//-----------------------------------------------------------------------------
// wxMDIChildFrame
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame,wxPanel)
+IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame,wxFrame)
-BEGIN_EVENT_TABLE(wxMDIChildFrame, wxPanel)
- EVT_CLOSE(wxMDIChildFrame::OnCloseWindow)
+BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame)
+ EVT_ACTIVATE(wxMDIChildFrame::OnActivate)
END_EVENT_TABLE()
wxMDIChildFrame::wxMDIChildFrame(void)
long style, const wxString& name )
{
m_title = title;
- return wxPanel::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name );
+ return wxWindow::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name );
};
-void wxMDIChildFrame::OnCloseWindow( wxCloseEvent &event )
+void wxMDIChildFrame::GetClientSize( int *width, int *height ) const
{
- if ( GetEventHandler()->OnClose() || event.GetForce())
- {
- this->Destroy();
- }
-};
+ wxWindow::GetClientSize( width, height );
+}
-bool wxMDIChildFrame::Destroy(void)
+void wxMDIChildFrame::AddChild( wxWindow *child )
{
- if (!wxPendingDelete.Member(this))
- wxPendingDelete.Append(this);
-
- return TRUE;
+ wxWindow::AddChild( child );
}
-
+
static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
{
menu->SetInvokingWindow( win );
}
};
+wxMenuBar *wxMDIChildFrame::GetMenuBar()
+{
+ return m_menuBar;
+};
+
void wxMDIChildFrame::Activate(void)
{
};
+void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) )
+{
+};
+
//-----------------------------------------------------------------------------
// wxMDIClientWindow
//-----------------------------------------------------------------------------
mdi_child->m_page = (GtkNotebookPage*) (g_list_last(GTK_NOTEBOOK(m_widget)->children)->data);
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 );
+
+ gtk_page_change_callback( NULL, mdi_child->m_page, 0, this );
};