WizardKit  0.1
Instance Methods | Protected Attributes | List of all members
WKWizardPanel Class Reference

A wizard panel class. More...

Inherits NSPanel, and <NSCoding>.

Instance Methods

(void) - setStages:
 Sets the stages of the receiver. More...
 
(void) - setRunsInModalSession:
 Sets whether the receiver activates itself in a modal session. More...
 
(void) - setInitialStage:
 Sets the receiver's initial stage. More...
 
(void) - setCentersBeforeActivating:
 Sets whether the receiver centers itself on the screen before activating. More...
 
(void) - setCurrentStage:
 Makes the receiver display a specified stage. More...
 
(void) - nextStage:
 Makes the receiver display the next stage. More...
 
(void) - previousStage:
 Makes the receiver display the previous stage. More...
 
(int) - activate:
 Makes the panel activate itself. More...
 
(void) - deactivate:
 Makes the receiver deactivate itself. More...
 
(void) - deactivateWithCode:
 Deactivates the receiver and closes it. More...
 

Protected Attributes

BOOL runsInModalSession
 Returns whether the receiver activates itself in a modal session. More...
 
BOOL centersBeforeActivating
 Returns whether the receiver centers itself before activating. More...
 
BOOL isActive
 Returns whether the receiver is active or not. More...
 
NSArray * stages
 Returns a list of stages of the receiver. More...
 
NSString * initialStage
 Returns the receiver's initial stage. More...
 
unsigned int currentStage
 Returns the current stage which the receiver displays. More...
 

Detailed Description

A wizard panel class.

A WKWizardPanel object is an NSPanel object which provides support for wizard-style operation. General wizard support works like this:

Definition at line 25 of file WKWizardPanel.h.

Method Documentation

◆ activate:

- (int) activate: (id)  sender

Makes the panel activate itself.

This means that the panel will become visible and possibly run itself in a modal session (if that was requested). An NSInternalInconsistencyException is raised in case the panel is already active.

Returns
If activation in a modal session has been requested, this method returns the code with which the modal session ended. The code can be controlled by -[WKWizardPanel deactivateWithCode:]. In case the receiver isn't modal, or the modal session has been terminated by -[WKWizardPanel deactivate:], this method always returns NSRunStoppedResponse.
See also
[WKWizardPanel - deactivate:]
[WKWizardPanel - deactivateWithCode:]

Definition at line 281 of file WKWizardPanel.m.

References centersBeforeActivating, initialStage, isActive, runsInModalSession, setCurrentStage:, and stages.

◆ deactivate:

- (void) deactivate: (id)  sender

Makes the receiver deactivate itself.

This means that it will close itself and possibly leave it's modal session (if it was in one). An NSInternalInconsistencyException is raised in case the panel was not active.

In case the panel was run in a modal session, the return code of the modal session will be NSRunStoppedResponse.

See also
[WKWizardPanel activate]

Definition at line 342 of file WKWizardPanel.m.

References isActive, and runsInModalSession.

◆ deactivateWithCode:

- (void) deactivateWithCode: (int)  code

Deactivates the receiver and closes it.

This method is suitable only for use if the receiver was run in a modal session - otherwise use -[WKWizardPanel deactivate:]. It is different from the previous method in that it allows you to specify the return code of the modal session explicitly.

Parameters
codeThe code with which the modal session will exit.

Definition at line 372 of file WKWizardPanel.m.

References isActive, and runsInModalSession.

◆ nextStage:

- (void) nextStage: (id)  sender

Makes the receiver display the next stage.

See also
[WKWizardPanel - previousStage:]
[WKWizardPanel - setCurrentStage:]

Definition at line 243 of file WKWizardPanel.m.

References currentStage, setCurrentStage:, and stages.

◆ previousStage:

- (void) previousStage: (id)  sender

Makes the receiver display the previous stage.

See also
[WKWizardPanel - nextStage:]
[WKWizardPanel - setCurrentStage:]

Definition at line 257 of file WKWizardPanel.m.

References currentStage, setCurrentStage:, and stages.

◆ setCentersBeforeActivating:

- (void) setCentersBeforeActivating: (BOOL)  flag

Sets whether the receiver centers itself on the screen before activating.

Parameters
flagThe flag which specifies whether the receiver is to perform center prior to activation.

Definition at line 177 of file WKWizardPanel.m.

References centersBeforeActivating.

◆ setCurrentStage:

- (void) setCurrentStage: (NSString *)  aStageName

Makes the receiver display a specified stage.

Raises an NSInvalidArgumentException in case the specified stage isn't contained in the stages list of the receiver.

Parameters
aStageNameThe stage to set.
See also
[WKWizardPanel - nextStage:]
[WKWizardPanel - previousStage:]
[WKWizardPanel - setStages:]

Definition at line 205 of file WKWizardPanel.m.

References currentStage, and stages.

Referenced by activate:, nextStage:, and previousStage:.

◆ setInitialStage:

- (void) setInitialStage: (NSString *)  aStageName

Sets the receiver's initial stage.

Raises an NSInvalidArgumentException in case the provided stage name isn't in the receiver's list of stages.

Parameters
aStageNameThe new initial stage of the receiver.

Definition at line 146 of file WKWizardPanel.m.

References initialStage, and stages.

◆ setRunsInModalSession:

- (void) setRunsInModalSession: (BOOL)  flag

Sets whether the receiver activates itself in a modal session.

This method raises an NSInternalInconsistencyException in case it is invoked while the receiver is active.

Parameters
flagThe flag which should be YES if the receiver is to activate itself in a modal session, or NO if it shouldn't.

Definition at line 115 of file WKWizardPanel.m.

References isActive, and runsInModalSession.

◆ setStages:

- (void) setStages: (NSArray *)  someStages

Sets the stages of the receiver.

Please note that invoking this method resets the receiver's initial stage. An NSInternalInconsistencyException is raised in case it is invoked when the receiver is active.

Parameters
someStagesThe new stages of the wizard.

Definition at line 82 of file WKWizardPanel.m.

References initialStage, isActive, and stages.

Member Data Documentation

◆ centersBeforeActivating

- (BOOL) centersBeforeActivating
protected

Returns whether the receiver centers itself before activating.

Returns
YES if the receiver centers itself before activating, NO otherwise.
See also
[WKWizardPanel - setCentersBeforeActivating:]

Definition at line 30 of file WKWizardPanel.h.

Referenced by activate:, and setCentersBeforeActivating:.

◆ currentStage

- (NSArray *) currentStage
protected

Returns the current stage which the receiver displays.

Returns
The name of the current stage of the receiver.
See also
[WKWizardPanel - setCurrentStage:]

Definition at line 36 of file WKWizardPanel.h.

Referenced by nextStage:, previousStage:, and setCurrentStage:.

◆ initialStage

- (NSString *) initialStage
protected

Returns the receiver's initial stage.

Returns
The receiver's initial stage.
See also
[WKWizardPanel - setInitialStage:]

Definition at line 35 of file WKWizardPanel.h.

Referenced by activate:, setInitialStage:, and setStages:.

◆ isActive

- (BOOL) isActive
protected

Returns whether the receiver is active or not.

Returns
YES if the receiver is active, NO otherwise.

Definition at line 31 of file WKWizardPanel.h.

Referenced by activate:, deactivate:, deactivateWithCode:, setRunsInModalSession:, and setStages:.

◆ runsInModalSession

- (BOOL) runsInModalSession
protected

Returns whether the receiver activates itself in a modal session.

Returns
YES if the receiver activates in a modal session, or NO if not.
See also
[WKWizardPanel - setRunsInModalSession:]

Definition at line 29 of file WKWizardPanel.h.

Referenced by activate:, deactivate:, deactivateWithCode:, and setRunsInModalSession:.

◆ stages

- (NSArray *) stages
protected

Returns a list of stages of the receiver.

Returns
The list of stages of the receiver.
See also
[WKWizardPanel - setStages:]

Definition at line 34 of file WKWizardPanel.h.

Referenced by activate:, nextStage:, previousStage:, setCurrentStage:, setInitialStage:, and setStages:.


The documentation for this class was generated from the following files: