// 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)
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
- const wxPoint& pos, const wxSize& size,
+ 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,
wxWindowID id, const wxString& title,
- const wxPoint& pos, const wxSize& size,
+ 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) )
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 );
};