#include "wx/artprov.h"
#include "wx/imaglist.h"
#include "wx/bookctrl.h"
-#include "wx/toolbook.h"
-#include "wx/toolbar.h"
#include "bookctrlbasetest.h"
#include "testableframe.h"
base->AssignImageList(m_list);
- //We need to realize the toolbar if we ware running the wxToolbook tests
- wxToolbook *book = wxDynamicCast(base, wxToolbook);
-
- if(book)
- book->GetToolBar()->Realize();
+ Realize();
m_panel1 = new wxPanel(base);
m_panel2 = new wxPanel(base);
base->InsertPage(0, new wxPanel(base), "New Panel", true, 0);
- //We need to realize the toolbar if we ware running the wxToolbook tests
- wxToolbook *book = wxDynamicCast(base, wxToolbook);
-
- if(book)
- book->GetToolBar()->Realize();
+ Realize();
CPPUNIT_ASSERT_EQUAL(0, base->GetSelection());
CPPUNIT_ASSERT_EQUAL(4, base->GetPageCount());
virtual wxEventType GetChangingEvent() const
{ return wxEVT_TOOLBOOK_PAGE_CHANGING; }
+ virtual void Realize() { m_toolbook->GetToolBar()->Realize(); }
+
CPPUNIT_TEST_SUITE( ToolbookTestCase );
wxBOOK_CTRL_BASE_TESTS();
CPPUNIT_TEST( ToolBar );