Instruction set reference
HIPE_OP_DIALOG_INPUT
This instruction provides an alternative form of HIPE_OP_DIALOG that allows freeform text input by the user, rather than a set of fixed choices. Otherwise, this dialog functions similarly to HIPE_OP_DIALOG and the user's response is received back via a HIPE_OP_DIALOG_RETURN instruction.
- 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]: Title text for the dialog
- arg[1]: Dialog prompt text. Multiple lines are allowed; in which case the implementor of the framing manager responsible for displaying the dialog might choose to position the last line alongside the input prompt itself, with preceding lines being explanatory text.
- arg[2]: Suggested inputs, separated by newlines. The first line is the suggested default input. If the first line is blank, the input box presented to the user should initially be empty. If the whole argument is blank, no suggestions are provided.
- arg[3]: A unicode character symbol (UTF8) to be displayed alongside the question prompt.
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.
For providing suggested inputs to the user in arg[2], a possible use case might be to provide the user with the 5 most recently used commands, based on the user's previous inputs.