replace m_insertCallback with a virtual function, contrary to the old comments a virtual works just fine

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2008-08-29 15:46:48 +00:00
parent 52ddeedbde
commit 48200154f4
16 changed files with 40 additions and 99 deletions

View File

@@ -148,15 +148,14 @@ gtk_collapsiblepane_expanded_callback(GObject * WXUNUSED(object),
}
}
static void
gtk_collapsiblepane_insert_callback(wxWindowGTK* parent, wxWindowGTK* child)
void wxCollapsiblePane::AddChildGTK(wxWindowGTK* child)
{
// this callback should be used only once to insert the "pane" into the
// should be used only once to insert the "pane" into the
// GtkExpander widget. wxGenericCollapsiblePane::DoAddChild() will check if
// it has been called only once (and in any case we would get a warning
// from the following call as GtkExpander is a GtkBin and can contain only
// a single child!).
gtk_container_add (GTK_CONTAINER (parent->m_widget), child->m_widget);
gtk_container_add(GTK_CONTAINER(m_widget), child->m_widget);
}
//-----------------------------------------------------------------------------
@@ -197,10 +196,6 @@ bool wxCollapsiblePane::Create(wxWindow *parent,
g_signal_connect(m_widget, "notify::expanded",
G_CALLBACK(gtk_collapsiblepane_expanded_callback), this);
// before creating m_pPane, we need to makesure our own insert callback
// will be used
m_insertCallback = gtk_collapsiblepane_insert_callback;
// this the real "pane"
m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTAB_TRAVERSAL|wxNO_BORDER);