Instruction set reference
HIPE_OP_DIALOG
This instruction is used to request a dialog box prompt to be displayed for collecting user input. If the frame that sends the instruction is a child of another frame (such as a framing manager), the parent frame receives the instruction to act upon. If the frame that requests the dialog is a top-level frame, Hipe itself produces the dialog box.
The dialog box should be implemented modally, which means the user should not be able to continue interacting with the application until the dialog has either been answered or dismissed (cancelled).
- location: Sending a request: A value of 0 (corresponding to the body element of
the client frame) means the message should be sent to the direct parent of this client. If the client is at the top level, the request will be handled by the Hipe server directly, otherwise the functionality should be integrated into the framing manager.
Receiving a request: A location value corresponding to a child frame means the message came from that client. - arg[0]: Dialog title caption
- arg[1]: Dialog prompt text
- arg[2]: Dialog answer choices, separated by newlines. (e.g. "Yes\nNo\nOther") A separator may be specified by leaving a line blank.
- arg[3]: Character symbols (UTF8) for each option, separated by newlines. If no symbol is required or a separator occupies a 'slot', the corresponding line should be left blank. An additional symbol at the end of the list specifies a symbol for the dialog itself.
Notes
Framing managers without dialog support: As there is no mechanism in Hipe that may be used to determine whether a framing manager implements dialogs or not, a framing manager that does not implement dialog functionality must respond to a HIPE_OP_DIALOG or HIPE_OP_DIALOG_INPUT instruction with a HIPE_OP_DIALOG_RETURN instruction and arguments {"","0"} to indicate that the dialog has been cancelled. Otherwise, client applications that request dialogs may be left in an undefined or suspended state.
The framing manager should send a HIPE_OP_DIALOG_RETURN instruction back to the client once the dialog has been answered by the user.
Modality: The framing manager should display the dialog in a modal way, preventing interaction with the client frame until the dialog is answered. There are at least two ways to implement this: (a) prevent the user interacting with the client until the dialog is dismissed, or (b) that the dialog is dismissed automatically if the user removes focus from the dialog, and a 'cancel' is inferred.