VisClass: 3.3 VisClass Instance Data: VI_attrs

Up: GEOS SDK TechDocs | Up | Prev: 3.2 VI_typeFlags | Next: 3.4 VI_optFlags
VI_attrs, MSG_VIS_GET_ATTRS, MSG_VIS_SET_ATTRS

The VI_attrs field is a record of eight flags ( VisAttrs )that determine the general visible attributes of the object. These attributes may be changed on the fly and often are. Applications that don't involve visible tree operations (adding, removing, or moving branches) probably will not change these attributes dynamically.

To set the flags after the object has been instantiated, send it a MSG_VIS_SET_ATTRS with the appropriate flags to be set. To retrieve the VI_attrs record, send the object a MSG_VIS_GET_ATTRS . The VA_REALIZED flag may not be changed with MSG_VIS_SET_ATTRS .

The eight flags of the VisAttrs record are listed below:

VA_VISIBLE
This flag is effective only for window group objects (those with VTF_IS_WIN_GROUP set in VI_typeFlags ) and is ignored for other objects. If set, it indicates that the visible branch headed by this object can be made visible as soon as it is linked visibly to another visible branch. For example, a window group object may have this bit set and not be on the screen if its parent window group is not set VA_VISIBLE; as soon as the parent window group becomes VA_VISIBLE, though, the entire branch will become visible.
VA_FULLY_ENABLED
This flag is normally set for visible objects. If it is set, the object is fully enabled when visible on the screen. If not set, the object is not fully enabled--the object will typically be drawn in a 50% pattern (grayed out) and will not receive click events. This flag works even for normal visible objects, though this behavior is seen almost exclusively with generic UI objects.
VA_MANAGED
This flag indicates that the object's location is managed by its parent. If the flag is set, space is set aside in the parent composite by the geometry manager. When the window displaying this object changes, the geometry will have to be calculated. If this flag is not set, the object can alter its own location and bounds without affecting the parent's geometry.
VA_DRAWABLE
This flag indicates whether the object is drawn or invisible. If the flag gets set or reset during execution, the rectangle defined by its VI_bounds field will automatically be marked invalid.
VA_DETECTABLE
This flag, when set, indicates that the object might respond to mouse, pointer, keyboard, or other similar events. If the flag is reset (such as with display-only objects), its parent composite object will not bother passing it these events. This flag must be set if the object is a window composite. If the status of this flag is changed during execution, the object's grab state will not change. For example, if the object has the mouse grab when a MSG_VIS_SET_ATTRS resets the flag, the object will retain the mouse grab until it is released or preempted normally.
VA_BRANCH_NOT_MINIMIZABLE
This flag is used only by the visible counterparts of generic UI objects. If set, it indicates that this branch (e.g., a GenInteraction and its children) stays visible and usable even when the parent primary window is minimized.
VA_OLD_BOUNDS_SAVED
This flag, when set, causes the geometry manager to store the object's old bounds when its VI_bounds field changes. The old bounds are stored in a TEMP_VIS_OLD_BOUNDS vardata field.
VA_REALIZED
This flag indicates whether the object is visibly open on the screen--i.e., whether it is positioned on an open window. If the flag is set, the object is visible on the screen. When the object is no longer visible on the screen, this flag is reset. This flag may not be altered by MSG_VIS_SET_ATTRS ; it may only be changed by MSG_VIS_OPEN (which sets the flag) and MSG_VIS_CLOSE (which resets it).

MSG_VIS_SET_ATTRS

void	MSG_VIS_SET_ATTRS(
        VisAttrs		attrsToSet,
        VisAttrs		attrsToClear,
        VisUpdateMode		updateMode);

This message sets the object's VI_attrs field to the values passed. The attrsToSet parameter will be OR-ed with VI_attrs , 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 be cleared. The updateMode parameter indicates when the visual update of the object should occur after the new attributes have been set.

Source: Unrestricted.

Destination: Any visible object.

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

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

Return: Nothing.

Interception: Unlikely.

Warnings: Not all flags in the VI_attrs record may be set with this message.

MSG_VIS_GET_ATTRS

VisAttrs	MSG_VIS_GET_ATTRS();

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

Source: Unrestricted.

Destination: Any visible object.

Parameters: None.

Return: A byte of type VisAttrs representing the current flags set in the object's VI_attrs field.

Interception: Unlikely.


Up: GEOS SDK TechDocs | Up | Prev: 3.2 VI_typeFlags | Next: 3.4 VI_optFlags