MessageBox
Displays an interactive GUI message box that generates an event based on the button that is selected.
Library
Activate/ActivationOperations
Description
This block opens an interactive message box that generates based on the button that is selected: "yes", "no", and "cancel". Clicking on "cancel" button or pressing escape key ends the current simulation.
In case of synchronized output events, the output activation is synchronous with the input activation, otherwise, a zero delay is inserted. External activation can only be unset if there are at least 2 texts, otherwise there would be no input ports from which inherits activation.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
caption | Caption | The title of the message box. | String | |
ntxt | Number of texts | The number of different texts that can be displayed inside the message box. When the value is >1 an input port is displayed on the block. The value is the index of the used text. | Number | |
texts | Texts | The list of texts | Structure | |
texts/text | Text | Cell of strings | ||
sync | Synchronized output events | Select to synchronize the output signal with the input activation. | Number | 0 |
externalActivation | External activation | Specifies if the block receives an external activation or inherits its activation through its regular input ports. You can clear the external activation option only if 2 texts are present, otherwise no input ports are present to inherit activation. When External Activation is applied, an activation port is added to the block. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | ntxt>1 | |
Port 2 | activation | input | externalActivation||ntxt<=1 | |
yes | activation | output | 1 | |
no | activation | output | 2 |