Class dialog_item
describes the communication between a
dialogue window (class dialog).
and an item in such a window. Besides the normal communication between
graphicals and windows, this entails:
->layout).
->modified_item).
->apply).
Dialog Item's are normally appended to a dialog using
dialog->append.
In some cases there spatial relationship is specified using graphical->above, graphical->below, graphical->left
or graphical->right.
Fine tuning of layout is achieved using dialog_item->auto_align,
dialog_item->alignment, dialog_item->auto_label_align, dialog_item->auto_value_align
and
dialog_item->reference.
Dialog items may also be displayed on normal graphical device
objects (including window
objects). With automatic layout, this is achieved using device->append_dialog_item
and device ->layout_dialog'. Without automatic layout using device
dialog_item->display’.
<-ensure_suffix, char_array<-label_name
and dialog_item->initialise.
Defaults: @nil (no item is above me)
anding it with a grey
pattern.
Defaults: @on (active).
->layout.
The values are:
flush-left).
For example, button
objects in OpenWindow dialog windows should be centered. Setting button.alignment
to center will properly align buttons for OpenWindow look-and-feel.
Defaults: @on (align labels in the same row).
Defaults: @on (do align values)
|image*label_font and indicates the function of the item.
Defaults: The provided name (first initialisation argument) is capitalised to provide the initial label.
->layout. dialog->layout
first determines the widest label, after which it requests all dialog
items to make their label equally wide. This parameter determines how a
small label is aligned in a wider box.
See also dialog_item.label_suffix.
->layout.
<->look.
XPCE is shipped with Defaults both to generate OpenLook style (Unix/X11) or Windows-95 style (Win32).
->layout
aligns the
graphical<-x or graphical<-y
component of their reference points.
The get-method returns the value of the variable when filled and
fails otherwise. This method is redefined by most dialog-item subclasses
(button<-reference, text_item<-reference,
etc.).
Invoking dialog_item->reference: @default
will make the item return its class-defined default. Invoking this
method with an instance of class point
will explicitly set the reference-point.
<->message
is currently executing
Defaults: inactive
->status:
inactive.->restore’d.<-above,
etc. relations are destroyed first.<-popup
when defined.
First invoke graphical->event.
If this fails and dialog_item<-popup
is not
@nil, open
this popup menu. This method is redefined by most subclasses.
<-label
is filled with
char_array<-label_name
and the label is guaranteed to end with pce.DialogItem.label_suffix.->modified_item: @receiver, @on
on its graphical<-device
(normally dialog->modified_item).
When @off is
method just succeeds.
This method is redefined by subclasses of dialog_item that allow the user to modify the selection.
See also graphical->restore, dialog_item<-default
and dialog->modified_item.
?- send(text_item(name), open).
Suffices to create a default text_item object in a window on the display.
<-status
to inactive. This will reset dialog items if the execution is aborted
from the activated code.<-show
<-value_width
<-default
of a dialog_item defines the value to which the
dialog_item<-selection will be reset by graphical->restore.
The dialog_item<->default
mechanism is defined for all sub-classes of class dialog_item
that may be modified by the user.->apply
and
dialog->modified_item.<->displayed.
Retained for backward compatibility.