// wxMDIParentFrame
//-----------------------------------------------------------------------------
+static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
+{
+ if ((win->m_x == alloc->x) &&
+ (win->m_y == alloc->y) &&
+ (win->m_width == alloc->width) &&
+ (win->m_height == alloc->height))
+ {
+ return;
+ };
+
+ win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
+};
+
+//-----------------------------------------------------------------------------
+
IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame,wxFrame)
wxMDIParentFrame::wxMDIParentFrame(void)
};
wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent,
- const wxWindowID id, const wxString& title,
+ wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size,
- const long style, const wxString& name )
+ long style, const wxString& name )
{
m_clientWindow = NULL;
m_currentChild = NULL;
};
bool wxMDIParentFrame::Create( wxWindow *parent,
- const wxWindowID id, const wxString& title,
+ wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size,
- const long style, const wxString& name )
+ long style, const wxString& name )
{
wxFrame::Create( parent, id, title, pos, size, style, name );
};
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
- const wxWindowID id, const wxString& title,
- const wxPoint& pos, const wxSize& size,
- const long style, const wxString& name )
+ wxWindowID id, const wxString& title,
+ const wxPoint& WXUNUSED(pos), const wxSize& size,
+ long style, const wxString& name )
{
- Create( parent, id, title, pos, size, style, name );
+ Create( parent, id, title, wxDefaultPosition, size, style, name );
};
wxMDIChildFrame::~wxMDIChildFrame(void)
};
bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,
- const wxWindowID id, const wxString& title,
- const wxPoint& pos, const wxSize& size,
- const long style, const wxString& name )
+ wxWindowID id, const wxString& title,
+ const wxPoint& WXUNUSED(pos), const wxSize& size,
+ long style, const wxString& name )
{
m_title = title;
- return wxPanel::Create( parent->GetClientWindow(), id, pos, size, style, name );
+ return wxPanel::Create( parent->GetClientWindow(), id, wxDefaultPosition, size, style, name );
};
void wxMDIChildFrame::SetMenuBar( wxMenuBar *WXUNUSED(menu_bar) )
{
};
-wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, const long style )
+wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style )
{
CreateClient( parent, style );
};
{
};
-bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, const long style )
+bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
{
m_needParent = TRUE;
GtkWidget *label_widget;
label_widget = gtk_label_new( s );
gtk_misc_set_alignment( GTK_MISC(label_widget), 0.0, 0.5 );
+
+ gtk_signal_connect( GTK_OBJECT(child->m_widget), "size_allocate",
+ GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)child );
gtk_notebook_append_page( GTK_NOTEBOOK(m_widget), child->m_widget, label_widget );
};