These functions do not implement a GUI element but are useful when developing
programs that do. The functions
waitfor are only available with the
Query or set user-custom GUI data.
The GUI data is stored in the figure handle h. If h is not a figure handle then it’s parent figure will be used for storage.
data must be a single object which means it is usually preferable for it to be a data container such as a cell array or struct so that additional data items can be added easily.
Return a structure of object handles for the figure associated with handle h.
If no handle is specified the current figure returned by
gcf is used.
The fieldname for each entry of hdata is taken from the
property of the graphic object. If the tag is empty then the handle is not
returned. If there are multiple graphic objects with the same tag then
the entry in hdata will be a vector of handles.
includes all possible handles, including those for
Return true if a window system is available (X11, Windows, or Apple OS X) and false otherwise.
See also: isguirunning.
Return true if Octave is running in GUI mode and false otherwise.
See also: have_window_system.
Return the position of a user interface component in pixel units.
The first argument h must be a handle to a valid graphics object of type uibuttongroup, uicontrol, uipanel, uitable, axes, or figure. For other object types, the function returns zeros.
By default, the position is returned relative to the object’s parent. If the second argument rel_to_fig is logically true, the position is computed relative to the enclosing figure object.
The return value pos is a 4-element vector with values
[ lower_left_X, lower_left_Y, width, height ].
See also: get.
List system fonts.
If a handle to a graphics object h is provided, also include the
font from the object’s
"FontName" property in the list.
Programming Note: On systems that don’t use FontConfig natively (all but
Linux), the font cache is built when Octave is installed. You will need to
system ("fc-cache -fv") manually after installing new fonts.
Move a figure specified by figure handle h to a position on the screen defined by pos.
h is a figure handle, or a handle to a graphics object. In the latter
case, its parent figure will be used. If unspecified, h will be
set to the handle of the relevant figure if a callback is being executed
gcbf), otherwise it will be set to the handle of the current figure
pos is either a two-value numeric vector or a string. If pos is
numeric then it must be of the form
[h, v] specifying the horizontal
and vertical offsets of the figure with respect to the screen. A positive
value indicates the offset between the left (or bottom for the vertical
component) of the screen, and the left (or bottom) of the figure. A
negative value indicates the offset between the right (or top) of the screen
and the right (or top) of the figure.
Possible values for pos as a string are
Top center of the screen.
Bottom center of the screen.
Right center of the screen.
Left center of the screen.
Top right of the screen.
Top left of the screen.
Bottom right of the screen.
Bottom left of the screen.
Center of the screen.
The figure will be minimally moved to be entirely visible on the screen, with a 30 pixel extra padding from the sides of the screen. This is the default value if none is provided.
event contains event data that will be ignored. This construct facilitates a call to movegui from a callback.
Open the variable name in the graphical Variable Editor.
Suspend program execution until the figure with handle h is deleted
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.
Resume program execution suspended with
The handle h must be the same as the on specified in
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.
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 processed normally,
allowing callbacks to modify the state of graphics objects. This function
is reentrant and can be called from a callback, while another
call is pending at the top-level.
In the first form, program execution is suspended until the graphics object h is destroyed. If the graphics handle is invalid or if h is the root graphics handle and no property prop was provided, 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
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
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
In all cases, typing CTRL-C stops program execution immediately.