MessageBox
Interactive GUI message box generating an event depending on the button clicked.
Library
ActivationOperations
Description
This block opens a message box which generates an event depending on the button clicked. There are three buttons: "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 are 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 >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 | If selected, the output signal is synchronized with the input activation. | Number | 0 |
externalActivation | External activation | This parameter defines if the block receives an external activation or inherits its activation through its regular input ports. It can only be unset if there are at least 2 texts, otherwise there would be no input ports from which inherits activation. When External Activation is used, 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 |