Added chainable wxWizardPageSimple::Chain() overload.

Add the simplest and most fool proof of chaining the pages in static wizards:
just chain several calls to the new, non-static, wxWizardPageSimple::Chain()
overload.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-04-10 12:12:57 +00:00
parent 4381c90d1f
commit 2d3636405a
4 changed files with 36 additions and 3 deletions

View File

@@ -147,7 +147,15 @@ public:
void SetPrev(wxWizardPage *prev) { m_prev = prev; }
void SetNext(wxWizardPage *next) { m_next = next; }
// a convenience function to make the pages follow each other
// Convenience functions to make the pages follow each other without having
// to call their SetPrev() or SetNext() explicitly.
wxWizardPageSimple& Chain(wxWizardPageSimple* next)
{
SetNext(next);
next->SetPrev(this);
return *next;
}
static void Chain(wxWizardPageSimple *first, wxWizardPageSimple *second)
{
wxCHECK_RET( first && second,