Object types – Crunch CRiSP File Editor 6 User Manual
Page 56

Page 56
....
object-2
attributes for object-2
....
....
object-n
attributes for object-n
....
You will notice in the supplied macros that indentation is used to show this implied nesting structure.
There are various attributes used which affect the dialog box itself, including a title to appear at the top of the
dialog box (DBOX_TITLE), a single callback routine which is used to handle all events on the objects within
the dialog box (DBOX_CALLBACK), and other attributes, such as allowing the dialog box to be resized or
not.
All attributes start with the prefix DBOX_. All these attributes are listed in the
supplied in the CRiSP source directory. Some of these attribute definitions are there purely for historical
reasons: either they do not work, or are incomplete in various platforms. The ones you can rely on are
properly documented, so you should be wary about trying to deduce the functionality of an attribute based
on what you see in the include file.
As mentioned, all attributes start with the DBOX_ prefix. All user interface objects also start with the DBOX_
attribute as well. (This is not a good thing as it can be difficult to determine whether an element of the list
starts a new object definition or is an attribute definition for the preceding object, however for historical
reasons the naming convention remains).
Within the
remnants of history and are not actually implemented.
Object Types
The following table lists the objects which are defined.
Mnemonic
Description
DBOX_BUTTON
This implements a push button, e.g. typically used
for OK or CANCEL buttons.
DBOX_CHILD
This object type is never explicitly created but is
used internally for object grouping. You should
never refer to this object type as attempting to do
so is undefined.
DBOX_COLOR_SELECTOR
The color selector object type implements an object
which is used within the Color Setup dialog box to
support the R-G-B slider controls. This object type
is very high level and very specific to the job of
implementing that particular dialog box. It is
implemented as an internal composite object to
relieve the color setup macro from having to
implement numerous semantic actions for the
various sub-components.
DBOX_COMBO_FIELD
A DBOX_COMBO_FIELD is very similar to a
DBOX_FIELD, in that it displays a label and an
input field to the right of the label. In addition, a
drop-down list of available options is available.
DBOX_CONTAINER
A container object is similar to the
DBOX_GROUP_START and DBOX_GROUP_END
object types and is used to create a sub-dialog box.
DBOX_CORE
This object type is never created or referred to
explicitly. It is used as part of the internal object