GEOS SDK TechDocs
|
|
2.6 Using Monikers
|
2.8 Allowing Children to Wrap
HINT_CUSTOM_CHILD_SPACING, HINT_CUSTOM_CHILD_SPACING_IF_LIMITED_SPACE, HINT_MINIMIZE_CHILD_SPACING
Normally, spacing of children within a composite is left entirely up to the specific UI. You can customize spacing, however, by using the hint
HINT_CUSTOM_CHILD_SPACING
. This hint takes a single argument of type
SpecSizeSpec
, described below.
The
SpecSizeSpec
structure defines both the spacing between children and how the spacing is determined. It exists as a record with two fields: The first field is a constant of type
SpecSizeTypes
, used to interpret the second field. The second field is data based on the type specified in the first field.
The different types allowable in the first field are
xx
, where the
xx
represents any multiple of five between zero and 100 inclusive. You can get better accuracy by using your own value if desired, however.Both fields of the record are defined by using the bitwise-or operator. If you had a composite that wanted to line all its children up exactly next to each other, for example, you would specify the hint as follows:
@object GenInteractionClass @MyComp = {
GI_comp = @child1, @child2, @child3;
HINT_CUSTOM_CHILD_SPACING = SST_PIXELS | 0;
}
HINT_CUSTOM_CHILD_SPACING_IF_LIMITED_SPACE
also takes a
SpecSizeSpec
to suggest a custom amount of spacing, but only implements this custom spacing if the specific UI determines that the children are already too tightly arranged. This hint may or may not be helpful, as the specific UI often allocates a minimum amount of spacing independent of this hint.
HINT_MINIMIZE_CHILD_SPACING ensures that child spacing is kept to an absolute minimum, even if this means that object's edges will touch (in color systems) or even overlap (in black and white systems).
GEOS SDK TechDocs
|
|
2.6 Using Monikers
|
2.8 Allowing Children to Wrap