VisClass: 3.5 VisClass Instance Data: VI_geoAttrs

Up: GEOS SDK TechDocs | Up | Prev: 3.4 VI_optFlags | Next: 3.6 VI_specAttrs
VI_geoAttrs, MSG_VIS_SET_GEO_ATTRS, MSG_VIS_GET_GEO_ATTRS

The VI_geoAttrs field is a VisGeoAttrs record of eight flags that determine the state of the object's geometry. They can be set and reset during execution to dynamically change the geometry behavior of the object. None of the flags is set by default. To set the flags, send the object a MSG_VIS_SET_GEO_ATTRS . The flags can be retrieved with a MSG_VIS_GET_GEO_ATTRS . The eight flags in this record are listed below.

VGA_GEOMETRY_CALCULATED
This flag indicates whether the object has ever been calculated. If the flag is clear, the object's geometry is about to be calculated. An object may use this flag if it has a particular desired size. This flag is cleared before a geometry recalculation by MSG_VIS_RESET_TO_INITIAL_SIZE .
VGA_NO_SIZE_HINTS
This flag is used by the Specific UI library to determine whether the object has any sizing hints or not. If the flag is not set, the object has one or more sizing hints (e.g., HINT_INITIAL_SIZE or HINT_FIXED_SIZE ).
VGA_NOTIFY_GEOMETRY_VALID
If this flag is set, the geometry manager will notify the object when its geometry messages have all been handled and the object's geometry is set. Notification will be in the form of MSG_VIS_NOTIFY_GEOMETRY_VALID . This flag may be used by visual objects for calculations or other sizing once geometry is redone but before redrawing occurs.
VGA_DONT_CENTER
This flag, when set, allows the object to individually override its parent's centering behavior. The object will instead appear at either the left edge of a vertical composite or the top edge of a horizontal composite.
VGA_USE_VIS_SET_POSITION
This flag is set to indicate that the object does not use the default handlers for MSG_VIS_SET_POSITION and MSG_VIS_POSITION_BRANCH . This flag provides an optimization that allows static calls to the geometry manager.
VGA_USE_VIS_CENTER
If this flag is set, the geometry manager will use the standard VisClass or VisCompClass center message to calculate the object's center. Unless an object is using some unusual centering behavior, it should have this flag set. This flag allows the geometry manager to speed up calculations for normal center behavior.
VGA_ONLY_RECALC_SIZE_WHEN_INVALID
This flag indicates that the object's size should be recalculated only when its geometry is marked invalid. That is, once the object's geometry is calculated, it will always return the same size until its geometry is once again marked invalid. Because the geometry manager often queries objects for their sizes, most objects should have this flag set. It allows the geometry manager to speed up calculations.
VGA_ALWAYS_RECALC_SIZE
This flag avoids optimizations that do not recalculate the object's size when passed its current size. Though not often used, this flag may be needed in certain situations (e.g., when a composite object must expand to fit and center its children).

MSG_VIS_SET_GEO_ATTRS

void	MSG_VIS_SET_GEO_ATTRS(
        VisGeoAttrs		attrsToSet,
        VisGeoAttrs		attrsToClear,
        VisUpdateMode		updateMode);

This message causes the object to set its VI_geoAttrs field to the values passed. The attrsToSet parameter will be OR-ed with VI_geoAttrs , and the attrsToClear parameter will be logically inverted and then AND-ed with the field. The clear operation will occur after the set, and therefore a flag set in both parameters will end up cleared. Many of the attributes in this record are used only by Specific UI libraries and should not be altered by applications.

Source: Unrestricted.

Destination: Any visible object.

Parameters: attrsToSet A record of VisGeoAttrs indicating which flags are to be set for the object.

attrsToClear
A record of VisGeoAttrs indicating which flags are to be cleared for the object (a flag set in attrsToClear will be cleared in VI_geoAttrs ).
updateMode
A VisUpdateMode indicating when the object should be visually updated on the screen.

Return: Nothing.

Interception: Unlikely.

MSG_VIS_GET_GEO_ATTRS

VisGeoAttrs MSG_VIS_GET_GEO_ATTRS();

This message returns a visible object's current VI_geoAttrs field.

Source: Unrestricted.

Destination: Any visible object.

Parameters: None.

Return: A record of type VisGeoAttrs reflecting the flags currently set in the object's VI_geoAttrs field.

Interception: Unlikely.


Up: GEOS SDK TechDocs | Up | Prev: 3.4 VI_optFlags | Next: 3.6 VI_specAttrs