WizardKit
0.1
|
A wizard panel class. More...
Public Member Functions | |
(void) | - setStages: |
Sets the stages of the receiver. | |
(void) | - setRunsInModalSession: |
Sets whether the receiver activates itself in a modal session. | |
(void) | - setInitialStage: |
Sets the receiver's initial stage. | |
(void) | - setCentersBeforeActivating: |
Sets whether the receiver centers itself on the screen before activating. | |
(void) | - setCurrentStage: |
Makes the receiver display a specified stage. | |
(void) | - nextStage: |
Makes the receiver display the next stage. | |
(void) | - previousStage: |
Makes the receiver display the previous stage. | |
(int) | - activate: |
Makes the panel activate itself. | |
(void) | - deactivate: |
Makes the receiver deactivate itself. | |
(void) | - deactivateWithCode: |
Deactivates the receiver and closes it. | |
Protected Attributes | |
BOOL | runsInModalSession |
Returns whether the receiver activates itself in a modal session. | |
BOOL | centersBeforeActivating |
Returns whether the receiver centers itself before activating. | |
BOOL | isActive |
Returns whether the receiver is active or not. | |
NSArray * | stages |
Returns a list of stages of the receiver. | |
NSString * | initialStage |
Returns the receiver's initial stage. | |
unsigned int | currentStage |
Returns the current stage which the receiver displays. |
A wizard panel class.
Private methods of WKWizardPanel.
A WKWizardPanel object is an NSPanel object which provides support for wizard-style operation. General wizard support works like this:
Do not invoke these methods directly.
Definition at line 25 of file WKWizardPanel.h.
- (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.
Definition at line 281 of file WKWizardPanel.m.
References centersBeforeActivating, initialStage, isActive, runsInModalSession, setCurrentStage:, and stages.
- (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.
Definition at line 342 of file WKWizardPanel.m.
References isActive, and runsInModalSession.
- (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.
code | The code with which the modal session will exit. |
Definition at line 372 of file WKWizardPanel.m.
References isActive, and runsInModalSession.
- (void) nextStage: | (id) | sender |
Makes the receiver display the next stage.
Definition at line 243 of file WKWizardPanel.m.
References currentStage, setCurrentStage:, and stages.
- (void) previousStage: | (id) | sender |
Makes the receiver display the previous stage.
Definition at line 257 of file WKWizardPanel.m.
References currentStage, setCurrentStage:, and stages.
- (void) setCentersBeforeActivating: | (BOOL) | flag |
Sets whether the receiver centers itself on the screen before activating.
flag | The flag which specifies whether the receiver is to perform center prior to activation. |
Definition at line 177 of file WKWizardPanel.m.
References centersBeforeActivating.
- (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.
aStageName | The stage to set. |
Definition at line 205 of file WKWizardPanel.m.
References currentStage, and stages.
Referenced by activate:, nextStage:, and previousStage:.
- (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.
aStageName | The new initial stage of the receiver. |
Definition at line 146 of file WKWizardPanel.m.
References initialStage, and stages.
- (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.
flag | The 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.
- (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.
someStages | The new stages of the wizard. |
Definition at line 82 of file WKWizardPanel.m.
References initialStage, isActive, and stages.
- (BOOL) centersBeforeActivating [protected] |
Returns whether the receiver centers itself before activating.
Definition at line 30 of file WKWizardPanel.h.
Referenced by activate:, and setCentersBeforeActivating:.
- (NSArray *) currentStage [protected] |
Returns the current stage which the receiver displays.
Definition at line 36 of file WKWizardPanel.h.
Referenced by nextStage:, previousStage:, and setCurrentStage:.
- (NSString *) initialStage [protected] |
Returns the receiver's initial stage.
Definition at line 35 of file WKWizardPanel.h.
Referenced by activate:, setInitialStage:, and setStages:.
- (BOOL) isActive [protected] |
Returns whether the receiver is active or not.
Definition at line 31 of file WKWizardPanel.h.
Referenced by activate:, deactivate:, deactivateWithCode:, setRunsInModalSession:, and setStages:.
- (BOOL) runsInModalSession [protected] |
Returns whether the receiver activates itself in a modal session.
Definition at line 29 of file WKWizardPanel.h.
Referenced by activate:, deactivate:, deactivateWithCode:, and setRunsInModalSession:.
- (NSArray *) stages [protected] |
Returns a list of stages of the receiver.
Definition at line 34 of file WKWizardPanel.h.
Referenced by activate:, nextStage:, previousStage:, setCurrentStage:, setInitialStage:, and setStages:.