LDialogBox is a PowerPlant class that is used for creating dialog boxes in your program.
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
LDialogBox is a simple extension of the LWindow class, with the addition of button tracking for the default and cancel buttons. The data members that identify the default and cancel buttons are mDefaultButtonID and mCancelButtonID. You can set the buttons in the Constructor resource editor, or you can set them at runtime. You specify the button by its Pane ID number.
To learn more about using this class, refer to The PowerPlant Book.
Source files:
Ancestors:
See Also:
Purpose:
The constructors create objects from the passed-in parameters.
Access:
Prototype:
LDialogBox();
LDialogBox( SWindowInfo &inWindowInfo );
LDialogBox( ResIDT inWINDid,
Uint32 inAttributes,
LCommander *inSuper );
LDialogBox( LStream *inStream );Parameters:
The parameters for this constructor are:
Purpose:
The destructor destroys the object.
Access:
Prototype:
virtual ~LDialogBox();
Purpose:
Finish creation by linking the dialog box as a Listener to its default and cancel buttons. This is an override of FinishCreateSelf() in LPane.
Purpose:
This method handles keyboard equivalents for hitting the default and cancel buttons of the dialog box. The default button is Enter or Return. The cancel button is Escape or Command-Period. This is an override of HandleKeyPress() in LCommander.
Purpose:
This method respond to messages from Broadcasters. The dialog
box responds to the cmd_Close message by deleting itself. This method is an override of ListenToMessage() in LListener.
Remarks:
Negative message numbers are relayed to the ProcessCommand(). This allows subclasses of the dialog box to handle messages as commands. Or, if you don't want to subclass this dialog box, the SuperCommander of the dialog box will receive the messages as commands.
Purpose:
Using this method you specify the Pane ID of the cancel button of the dialog box. The cancel button must be derived from LControl. This object is then added as a Listener.
Access:
Prototype:
virtual void SetCancelButton( PaneIDT inButtonID );Parameters:
The parameter for this method is:
Return:
Remarks:
Certain keyboard equivalents (Escape and Command-Period) simulate a click inside the cancel button.
Purpose:
Using this method you specify the Pane ID of the default button of the dialog box. The default button must be derived from LControl.
Access:
Prototype:
virtual void SetDefaultButton( PaneIDT inButtonID);Parameters:
The parameter for this method is:
Return:
Remarks:
The default button has a default outline around it and certain keyboard equivalents (Return and Enter) simulate a click inside it.
Purpose:
This data member stores the pane ID of the default button.
Access:
Prototype:
PaneIDT mDefaultButtonID;
Purpose:
This data member stores the pane ID of the cancel button.
Access:
Prototype:
PaneIDT mCancelButtonID;
Purpose:
This data mber stores the pointer to a LDefaultOutline.
Access:
Prototype:
LDefaultOutline *mDefaultOutline;