class PWizardFrame: public PInteractorLayout

An interactor layout that is used to manage a series of pages for the gathering of complex information.

Inheritance:


Public

[more] Construction
[more] New functions for class

Protected Fields

[more]PPushButton* back
The Back button
[more]PPushButton* next
The Next button
[more]PPushButton* abort
The Cancel button
[more]PPushButton* finish
The FInish button
[more]PWizardPage* currentPage
The active page
[more]PWizardPageDict pages
All pages added via AddPage()
[more]PWizardPageStack pageStack
The pages that have been passed.
[more]PDim originalSize
Size of layout before AddPage() adjusts it.


Inherited from PInteractorLayout:

Public Methods

ovirtual void SetFocusInteractor( PInteractor * interactor )
ovirtual PInteractor* GetFocusInteractor() const
oPControl* GetControl( PRESOURCE_ID id )
ovoid UpdateControls()

Public

Overrides from class PInteractor

Protected Fields

oPInteractor* focusInteractor

Protected Methods

ovirtual void ConstructEnd( PRESOURCE_ID resID )


Inherited from PInteractor:

Public Classes

oenum PositionOrigin
oenum CoordinateSystem
oenum AutoAdjustType

Public Fields

oPCursor cursor

Public Methods

ovirtual Comparison Compare( const PObject & obj ) const
oPInteractor* GetParent() const
oBOOL IsChild( PInteractor * parent ) const
oPINDEX GetNumChildren()
oPInteractor& operator[]( PINDEX index )
ovirtual void UpdateCommandSources()
ovirtual void SetFont( const PFont & newFont, BOOL toChildren = TRUE )
oconst PRealFont& GetFont()
oPDIMENSION ToPixelsDX( PDIMENSION x ) const
oPDIMENSION ToPixelsDY( PDIMENSION y ) const
oPORDINATE ToPixelsX( PORDINATE x ) const
oPORDINATE ToPixelsY( PORDINATE y ) const
oPDim ToPixels( const PDim & dim ) const
oPPoint ToPixels( const PPoint & pt ) const
oPRect ToPixels( const PRect & r ) const
oPDIMENSION FromPixelsDX( PDIMENSION x ) const
oPDIMENSION FromPixelsDY( PDIMENSION y ) const
oPORDINATE FromPixelsX( PORDINATE x ) const
oPORDINATE FromPixelsY( PORDINATE y ) const
oPDim FromPixels( const PDim & dim ) const
oPPoint FromPixels( const PPoint & pt ) const
oPRect FromPixels( const PRect & r ) const
ovoid SetPosition( PORDINATE x, PORDINATE y, PositionOrigin xOrigin = TopLeftParent, PositionOrigin yOrigin = TopLeftParent )
oPPoint GetPosition( CoordinateSystem coords ) const
oPPoint ToScreen( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const
oPPoint FromScreen( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const
ovoid SetDimensions( PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
oPDim GetDimensions( CoordinateSystem coords ) const
oPRect GetStructureBounds( CoordinateSystem coords ) const
ovirtual PRect GetDrawingBounds( CoordinateSystem coords ) const
ovoid AutoAdjustBounds( PRect & bounds, AutoAdjustType type = AdjustBounds )
oBOOL ContainsPoint( const PPoint & pt, CoordinateSystem coords ) const
oPInteractor* FindInteractor( const PPoint & pt, CoordinateSystem coords ) const
ovirtual void Enable( BOOL enabled = TRUE )
ovoid Disable()
oBOOL IsEnabled() const
ovirtual void ShowAll()
ovirtual void Show( BOOL visible = TRUE )
ovoid Hide()
oBOOL IsVisible() const
ovirtual void BringToTop()
ovirtual BOOL IsOnTop() const
ovoid Invalidate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovoid Validate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovoid Update()
ovoid GrabMouse()
ovoid ReleaseMouse()
oBOOL HasMouse() const
ovoid GrabFocus()
oBOOL HasFocus() const
ovirtual void SetCursor( const PCursor & newCursor )
oPCursor GetCursor() const
ovoid SetCursorToParent( BOOL useParent = TRUE )
ovoid SetAllCursors( const PCursor & newCursor )
ovoid RestoreAllCursors()
ovoid SetWaitCursor()
ovoid SetCursorPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
oPPoint GetCursorPos( CoordinateSystem coords ) const
ovirtual void ShowCursor( BOOL show = TRUE )
ovoid HideCursor()
ovoid SetCaret( const PCaret & newCaret )
oPCaret GetCaret() const
ovoid SetCaretPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
oPPoint GetCaretPos( CoordinateSystem coords ) const
ovirtual void ShowCaret(BOOL show = TRUE)
ovoid HideCaret()
ovirtual void SetForegroundColour( const PColour & newColour )
oconst PColour& GetForegroundColour() const
ovirtual void SetBackgroundColour( const PColour & newColour )
oconst PColour& GetBackgroundColour() const
oPDim GetBorderSize() const
oconst PColour& GetBorderColour() const
oPCanvas* StartMouseTrack( BOOL wantsCanvas = FALSE )
ovirtual void OnMouseMove( PKeyCode button, const PPoint & where )
ovirtual void OnMouseDown( PKeyCode button, const PPoint & where, BOOL doubleClick )
ovirtual void OnMouseUp( PKeyCode button, const PPoint & where )
ovirtual BOOL OnKeyDown( PKeyCode key, unsigned repeat )
ovirtual void OnKeyUp( PKeyCode key )
ovirtual void OnKeyInput( const PString & str )
ovirtual void OnGainFocus()
ovirtual void OnLostFocus()
ovirtual void OnStartInput()
ovirtual BOOL OnEndInput()
ovirtual void OnRedraw( PCanvas & canvas )
ovirtual void OnControlNotify( PControl & control, int option )
ovirtual void OnSelectHelp()
ovirtual PBalloon* OnBalloonHelp()
ovirtual void OnMouseTrack( PCanvas * canvas, const PPoint & where, BOOL lastTrack )
ovirtual void _SetPosition( PORDINATE x, PORDINATE y, PositionOrigin xOrigin, PositionOrigin yOrigin )

Public

Overrides from class PObject

System callback functions.

Protected Fields

oPApplication* owner
oPInteractor* parent
oPInteractorList children
oPRealFont font
oPCursor savedCursor
oPCaret caret
oPPoint caretPosition
oint caretVisible
oPColour foregroundColour
oPColour backgroundColour
oPInteractor* mouseTrackInteractor
oPInteractorCanvas* mouseTrackCanvas

Protected Methods

ovirtual void _SetDimensions( PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovirtual void _Invalidate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovirtual void _Validate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovirtual void _SetCursorPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
ovirtual void _SetCaretPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
ovirtual void UpdateMyCommandSources()

Protected

o Flag to indicate that the parent interactor layouts cursor should be used with this interactor.


Documentation

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.

o Construction

o PWizardFrame( PInteractor * parent )
Create a new empty layout. There are no controls contained within the layout and it is expected that these are to added manually by the application.

Note that the parent must be a descendant of PDialog or PTitledWindow.

Parameters:
parent - Interactor that owns the frame.

o PWizardFrame( PInteractor * parent, PRESOURCE_ID resID )
Create a new layout by loading it from a resource. The resource description determines the position, dimensions of the layout as well as the position, dimensions, title and other options for all of the controls in the layout.

Note that the parent must be a descendant of PDialog or PTitledWindow.

Parameters:
parent - Interactor that owns the page.
resID - Resource identifier for loading controls.

o New functions for class

ovoid AddPage( PWizardPage * page )
Add a new page to the wizard. The wizard is expanded to allow space for the page to fit in the top of the frame.
Parameters:
page - New page to add to the wizard.

oPWizardPage* GetPage( PRESOURCE_ID id ) const
Get a page that was added using the AddPage() function.

Returns:
page with specified ID, or NULL if none present.
Parameters:
id - Identifier of page to obtain.

oPWizardPage* GetCurrentPage()
Get the page that is currently being displayed.

Returns:
pointer to current page.

oBOOL SetCurrentPage(PRESOURCE_ID id)
Move to the page specified by the identifier. If the identifier is zero then the next page as entered by the AddPage() function is displayed.

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.

Returns:
TRUE if a new page was displayed.

ovirtual void OnFinished( BOOL aborted )
This call back function is executed when the wizard has completed.

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.

Parameters:
aborted - Indicates if the wizard was cancelled

oPPushButton* back
The Back button

oPPushButton* next
The Next button

oPPushButton* abort
The Cancel button

oPPushButton* finish
The FInish button

oPWizardPage* currentPage
The active page

oPWizardPageDict pages
All pages added via AddPage()

oPWizardPageStack pageStack
The pages that have been passed.

oPDim originalSize
Size of layout before AddPage() adjusts it.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.