### 35.3 GUI Utility Functions

These functions do not implement a GUI element but are useful when developing programs that do. Warning: The functions `uiwait`, `uiresume`, and `waitfor` are only available for the FLTK tooolkit.

— Function File: data = guidata (handle)
— Function File: guidata (handle, data)

— Function File: hdata = guihandles (handle)
— Function File: hdata = guihandles

— Function File: uiwait
— Function File: uiwait (h)
— Function File: uiwait (h, timeout)

> Suspend program execution until the figure with handle h is deleted or `uiresume` is called. When no figure handle is specified, this function uses the current figure.

> If the figure handle is invalid or there is no current figure, this functions returns immediately.

> When specified, timeout defines the number of seconds to wait for the figure deletion or the `uiresume` call. The timeout value must be at least 1. If a smaller value is specified, a warning is issued and a timeout value of 1 is used instead. If a non-integer value is specified, it is truncated towards 0. If timeout is not specified, the program execution is suspended indefinitely.

> See also: uiresume, waitfor.

— Function File: uiresume (h)

> Resume program execution suspended with `uiwait`. The handle h must be the same as the on specified in `uiwait`. If the handle is invalid or there is no `uiwait` call pending for the figure with handle h, this function does nothing.

> See also: uiwait.

— Built-in Function: waitfor (h)
— Built-in Function: waitfor (h, prop)
— Built-in Function: waitfor (h, prop, value)
— Built-in Function: waitfor (..., "timeout", timeout)

> Suspend the execution of the current program until a condition is satisfied on the graphics handle h. While the program is suspended graphics events are still being processed normally, allowing callbacks to modify the state of graphics objects. This function is reentrant and can be called from a callback, while another `waitfor` call is pending at top-level.

> In the first form, program execution is suspended until the graphics object h is destroyed. If the graphics handle is invalid, the function returns immediately.

> In the second form, execution is suspended until the graphics object is destroyed or the property named prop is modified. If the graphics handle is invalid or the property does not exist, the function returns immediately.

> In the third form, execution is suspended until the graphics object is destroyed or the property named prop is set to value. The function `isequal` is used to compare property values. If the graphics handle is invalid, the property does not exist or the property is already set to value, the function returns immediately.

> An optional timeout can be specified using the property `timeout`. This timeout value is the number of seconds to wait for the condition to be true. timeout must be at least 1. If a smaller value is specified, a warning is issued and a value of 1 is used instead. If the timeout value is not an integer, it is truncated towards 0.

> To define a condition on a property named `timeout`, use the string `\timeout` instead.

> In all cases, typing CTRL-C stops program execution immediately.

> See also: isequal.