If you want to set the Window's title, you would use this
function:
$window->set_title( $title );
Where
$title
is a string containing the title of the window.
Each window can have a Widget that has the current focus. To
set the focus, use:
$window->set_focus( $widget );
Widgets that have the focus can be activated by pressing on the space key.
The default Widget for a window can be set using:
$window->set_default( $widget );
Note that the widget must first call its can_default() function. Default Widgets can be activated by pressing the enter key.
The window policy determines how a window deals with resize
requests. You set the window policy by calling:
$window->set_policy( $allow_shrink, $allow_grow, $auto_shrink );
The
$allow_shrink
argument is a true or false value determining whether the user
can shrink the window below its size request. The
$allow_grow
argument is a true or false value determining whether the user
can make the window grow larger than its size request. The
$auto_shrink
argument is a true or false value specifying whether the window
automatically snaps back to its size request if it's larger.
Realistically, there are only two useful ways of calling this
function, and they are:
# window is user resizable
The default policy for a window is the first one above.
$window->set_policy( $false, $true, $false );
# window's size is program controlled
$window->set_policy( $false, $false, $true );
A modal window puts the focus of the application on itself and
keeps it there so the user cannot use any other window until
that window disappears. The only events that the application
allows to be processed are for the modal window. Modeless
windows do not freeze the rest of the application. Modal
windows are normally used for dialog boxes. To set a windows
modal value use the following function:
$window->set_modal( $modal );
Where
$modal
is a true or false value that specifies whether the window is
modal (true) or modeless (false).
You can set the default size of a window using the following
function:
$window->set_default_size( $width, $height );
You may set the windows position with this function:
$window->set_position( $position );
Where the
$position
argument may be:
'none' -- no influence is made on placement. The systems window manager places the window where it wants. This is the default value.
'center' -- window should be placed in the center of the screen.
'mouse' -- window should be placed at the current mouse position.