// InsertChild callback for wxNotebook
//-----------------------------------------------------------------------------
// InsertChild callback for wxNotebook
//-----------------------------------------------------------------------------
{
// Hack Alert! (Part I): This sets the notebook as the parent of the child
// widget, and takes care of some details such as updating the state and
{
// Hack Alert! (Part I): This sets the notebook as the parent of the child
// widget, and takes care of some details such as updating the state and
// incorrect sizes since the widget's style context is not fully known.
// See bug #901694 for details
// (http://sourceforge.net/tracker/?func=detail&aid=901694&group_id=9863&atid=109863)
// incorrect sizes since the widget's style context is not fully known.
// See bug #901694 for details
// (http://sourceforge.net/tracker/?func=detail&aid=901694&group_id=9863&atid=109863)
// NOTE: This should be considered a temporary workaround until we can
// work out the details and implement delaying the setting of the initial
// NOTE: This should be considered a temporary workaround until we can
// work out the details and implement delaying the setting of the initial
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
wxCHECK_MSG( position <= GetPageCount(), false,
_T("invalid page index in wxNotebookPage::InsertPage()") );
wxCHECK_MSG( position <= GetPageCount(), false,
_T("invalid page index in wxNotebookPage::InsertPage()") );