A dialog_group object is a compound dialog item, a number of dialog_item objects displayed on a specialised device object.
Class dialog_group
specialises class device
to ensure proper handling of the layout of the controls displayed inside
it as well as the placement of the group in the dialog. The class is
also responsible for proper handling of keyboard input, including the dialog_group<-default_button.
A dialog_group is built exactly the same as a dialog object. Here is a small example:
..., new(DG, dialog_group(location)), send(DG, append, text_item(address)), send(DG, append, text_item(city)), send(DG, append, text_item(country)), ...
<-alignment.<-auto_align’.<-gap
between items. See also
dialog_group->kind.->layout_dialog
for a description of the layout algorithm|image]*->name
and dialog_group<-label_font.<-label.->append.->restore
all items to their dialog_group<-default.->apply, dialog->modified_item
and dialog->restore.->advance,
and otherwise simply invokes device->event
to dispatch the event over the items.->size
is invoked. The group is moved.<-name
slot and handed to dialog_group->name
to compute the default dialog_group<-label
from it. Using the standard configuration, the
graphical<-name
is capitalised to produce the dialog_group<-label.
The dialog_group->kind
determines the appearance of the group.
See also class label_box.
->kind
is box. Its values:
<-border
to @default, dialog_group<-label
to the dialog_group<-label_name
calculated from the graphical<-name
and graphical<-pen
to 1. This results in a (3d-) box with a label containing the items,
which is normally used to visually group items for the user.
<-border
to size(0,0), dialog_group<-label
to” and graphical<-pen
to 0. This mode is normally used to group dialog items for technical
reasons. One such reason is the definition of a single dialog item for a
special type that requires multiple sub-items as a subclass of class dialog_group.
The other is to subdivide the items in a dialog window in multiple
groups to define layouts that do not fit in the standard matrix layout
provided by dialog windows.
->layout_dialog
using the dialog_group<-gap
and dialog_group<-size
attributes.<-name
and determines the displayed
dialog_group<-label.
The label is computed using the dialog_group<-label_name
method.->reference
with the one of
graphical->reference
as changing the origin of a dialog group does not have any practical
meaning.<-device
links are followed, searching for default buttons on containers.<-label_name’.
The latter by default capitalises the name, replacing underscores by
spaces. It may be redefined to map labels to a different language.