An interactor layout that is used to manage a series of pages for the gathering of complex information.
![]() | Construction |
![]() | New functions for class |
![]() | back The Back button |
![]() | next The Next button |
![]() | abort The Cancel button |
![]() | finish The FInish button |
![]() | currentPage The active page |
![]() | pages All pages added via AddPage() |
![]() | pageStack The pages that have been passed. |
![]() | originalSize Size of layout before AddPage() adjusts it. |
Overrides from class PInteractor
Overrides from class PObject
System callback functions.
An interactor layout that is used to manage a series of pages for the gathering of complex information. A single instance of a descendant of this class is used to frame a series of PWizardPage descendant layouts.It is expected that this layout would be contained within a dialog or main window of an application. A resource may be used to define the basics of the wizard frame and then the final sizes are adhusted by the AddPage() and ConstructEnd() functions to deliver a final layout.
A typical resource would look like:
Layout { Class MainWizard : PWizardFrame;
PushButton { Pos 10, 10; Dim 45, 15; Title "< &Back"; Field PWizardFrame::back; Notify PWizardFrame::Back; } PushButton { Pos 55, 10; Dim 45, 15; Title "&Next >"; Field PWizardFrame::next; Notify PWizardFrame::Next; Options default; } PushButton { Pos 55, 10; Dim 45, 15; Title "&Finish"; Field PWizardFrame::finish; Notify PWizardFrame::Finish; } PushButton { Pos 110, 10; Dim 45, 15; Title "Cancel"; Field PWizardFrame::abort; Notify PWizardFrame::Abort; }
void ConstructEnd(PRESOURCE_ID);
}
It is usual for the ConstructEnd() function to be overidden and the AddPage() function called for each PWizardPage needed. The ancestor ConstructEnd() function MUST be called after all of the AddPage() calls.
Note that the parent must be a descendant of PDialog or PTitledWindow.
Note that the parent must be a descendant of PDialog or PTitledWindow.
PWizardFrame( PInteractor * parent, PRESOURCE_ID resID )
resID - Resource identifier for loading controls.
As the current pages OnLeavingPage() function is called, it is possible
that the specified page is not set, due to validation requirements by
the current page. In this case FALSE is returned.
The default behaviour is, if not aborted, to call the OnCompletedPages()
function on each page and then close the parent window. If the wizard had
been cancelled then it simply closes the parent window. Note that this closes the parent window, not the frame itself. Of course,
when the parent closes it will in turn close the layout.
PWizardPage* GetPage( PRESOURCE_ID id ) const
PWizardPage* GetCurrentPage()
BOOL SetCurrentPage(PRESOURCE_ID id)
virtual void OnFinished( BOOL aborted )
PPushButton* next
PPushButton* abort
PPushButton* finish
PWizardPage* currentPage
PWizardPageDict pages
PWizardPageStack pageStack
PDim originalSize
Alphabetic index HTML hierarchy of classes or Java