UF_STYLER_item_value_type_s (view source)
 
Defined in: uf_styler.h
 
Also known as:
 
Overview
The following structure is used for callbacks and Ask/Set methods. Reason,
item_id, subitem_index, and item_attr are used as descriptive fields to
describe the ownership of the attribute. Count, indicator, and value are
used to represent the value of the attribute. Note that not all fields in
this structure are relevant at one time. Depending on the item type and
attribute type, zero or more additional fields may become relevant.


Data Members

reason
int
Used in callback data, this is output from
UF_STYLER functions. This indicates the type of
action, that triggers the callback, e.g.
UF_STYLER_ACTIVATE_CB. Open API callbacks
can rely on this field to determine what user
interaction has occurred. Programs should not
modify this value.

item_id
const char *
This is the most important field in the
structure. It indicates the UIObject identifier
that is associated with any interactions
between the UIStyler and the Open API program.
If the structure is used as callback data, this
field is set by the UIStyler to indicate the
UIObject that triggered the callback. This field
can also be set by the Open API program when
it makes any requests to the UIStyler for any
attribute queries or modifications. The
UIObject identifiers to use for this field
by the Open API program are supplied by the
creator of the dialog when constructing the
dialog. These values are placed in the header
file that is generated by the UIStyler for the
dialog.

subitem_index
int
This field is to be used only by the Open API
program to set attributes of objects that have
subitems or entries. This includes Button
Layout, Option Menu, Radio Box, Tool Palette,
Single-selection LIst, Multiple-selection List,
Selection Box and Navigation Buttons. It will
be a zero based index to indicate which subitem
within this object is to be modified.

count
int
This indicates the number of data values in the
union part of this structure. The count is 1
except when more than one integer, string or real
values are present. The count is set by the
UIStyler in callback data, or on an attribute
query. This must be specified by the Open
API program only when it requests the UIStyler
to replace subitem values for an Option Menu,
Single-selection List, Multiple-selection List
and Selection Box.

item_attr
int
This is the second most important piece of data
in the structure. It indicates the attribute
that is associated with the interaction between
the UIStyler and the Open API program. When
requesting any attribute modifications or
querying on any attribute values, the Open
API program should set this to the desired
attribute. The attribute names are included in
uf_styler.h. This field is set by the UIStyler
only when it dispatches a callback, and the
callback has valid data, in which case it sets
this field to UF_STYLER_VALUE.

indicator
int
Indicates the data type of the value or values
that are associated with the indicated
attribute. The UIStyler sets this field
when dispatching a callback, or when an
attribute query is made from the Open API
program. The Open API program needs this
field to determine the proper data type for the
union in the structure. When setting or
querying attributes, the Open API program
normally doesn't need to set this field, unless
there is an ambiguity. Currently, only the
lists (Single-selection, Multiple-selection, and
Selection Box) require this field to be set to
indicate whether a string or an array of strings
is to be added to the list, or that an array of
names or indices is to be returned from the
query.

value
UF_STYLER_value_t
union of all possible data types that
attributes can have.
See UF_STYLER_value_t