The List Objects: 5.3 GenBooleanGroups: Altering Instance Data

Up: GEOS SDK TechDocs | Up | Prev: 5.2 GenBooleanGroup Usage

Both the BooleanGroups and the Booleans themselves may be dynamically changed to alter the behavior of the list objects.

Altering the Identifiers

MSG_GEN_BOOLEAN_GET_IDENTIFIER, MSG_GEN_BOOLEAN_SET_IDENTIFIER

Each GenBoolean object contains an instance field to store the identifier of that object. It is this identifier that the parent GenBooleanGroup object uses when referring to individual GenBoolean items. You may change these identifiers dynamically if you wish.

To get a Boolean's identifier, send it MSG_GEN_BOOLEAN_GET_IDENTIFIER . To change a GenBoolean's identifier, send the object a MSG_GEN_BOOLEAN_SET_IDENTIFIER , passing the new identifier. You can send the GenBoolean object this message at any time, though sending it while the item is still GS_USABLE would be unusual.

MSG_GEN_BOOLEAN_GET_IDENTIFIER

word	MSG_GEN_BOOLEAN_GET_IDENTIFIER();

This message returns the identifier for the GenBoolean item.

Source: Unrestricted.

Destination: Any GenBoolean object.

Parameters: None.

Return: Identifier stored in the object's GBI_identifier instance field.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_SET_IDENTIFIER

void	MSG_GEN_BOOLEAN_SET_IDENTIFIER(
        word	identifier);

This message sets a new identifier for a GenBoolean object. No change is made to the GenBooleanGroup object. You must make sure that you are not referencing the GenBoolean with its old identifier before sending this message.

Source: Unrestricted.

Destination: Any GenBoolean object.

Parameters: identifier A word representing the constant of the new identifier. This should be a mask representing a bit within a 16-bit record.

Return: Nothing.

Interception: Generally not intercepted.

Warnings: The GenBooleanGroup must not be referring to the object when the GenBoolean receives this message. You should also not refer to the GenBoolean by its old identifier from then on.

Altering the Group State

You may alter the state of a GenBooleanGroup's children in two ways: First, you can set the entire group's state by setting the 16-bit records in the GenBooleanGroup's instance data. Second, you may set individual bits representing an item's state individually.

Setting the State Collectively

MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS, MSG_GEN_BOOLEAN_GROUP_SET_GROUP_STATE, MSG_GEN_BOOLEAN_GROUP_GET_INDETERMINATE_BOOLEANS, MSG_GEN_BOOLEAN_GROUP_SET_GROUP_INDETERMINATE_STATE, MSG_GEN_BOOLEAN_GROUP_GET_MODIFIED_BOOLEANS, MSG_GEN_BOOLEAN_GROUP_SET_GROUP_MODIFIED_STATE

To retrieve the contents of the GBGI_ selectedBooleans instance field, send the BooleanGroup a MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS . This message returns a 16-bit record. You can set the selection state of a BooleanGroup's children by sending the group a MSG_GEN_BOOLEAN_GROUP_SET_GROUP_STATE .

To retrieve the contents of the GBGI_ indeterminateBooleans instance field, use MSG_GEN_BOOLEAN_GROUP_GET_INDETERMINATE_BOOLEANS . This message returns a 16-bit record. You can set the indeterminate state with MSG_GEN_BOOLEAN_GROUP_SET_GROUP_INDETERMINATE_STATE .

To retrieve the contents of the GBGI_ modifiedBooleans instance field, use MSG_GEN_BOOLEAN_GROUP_GET_MODIFIED_BOOLEANS . This message returns a16-bit record. You can set the selection state of a BooleanGroup's children by sending the group a MSG_GEN_BOOLEAN_GROUP_SET_GROUP_MODIFIED_STATE .

MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS

word	MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS();

This message returns the current state of all GenBooleans in a GenBooleanGroup (selected or unselected) by returning the contents of the GBGI_ selectedBooleans instance field.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: None.

Return: A record indicating the GenBooleans selected.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_SET_GROUP_STATE

void	MSG_GEN_BOOLEAN_GROUP_SET_GROUP_STATE(
        word	selectedBooleans,
        word	indeterminateBooleans);

This message sets new selections and indeterminate states for a GenBooleanGroup (altering the contents of the GBGI_ selectedBooleans and GBGI_ indeterminateBooleans instance field). You should pass the records indicating the GenBooleans to select and/or mark indeterminate. Any GenBooleans which are not set will be cleared.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: selectedBooleans The GenBooleans which should be selected.

indeterminateBooleans
The GenBooleans which should be marked indeterminate.

Return: Nothing.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_GET_INDETERMINATE_BOOLEANS

word	MSG_GEN_BOOLEAN_GROUP_GET_INDETERMINATE_BOOLEANS();

This message returns the indeterminate items of a GenBooleanGroup by returning the contents of the GBDI_ indeterminateBooleans instance field.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: None.

Return: A record indicating the current indeterminate booleans, represented by the OR-ed sum of their identifiers.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_GET_MODIFIED_BOOLEANS

word	MSG_GEN_BOOLEAN_GROUP_GET_MODIFIED_BOOLEANS();

This message returns selections marked modified within a GenBooleanGroup since the last apply (by returning the contents of the GBGI_ modifiedBooleans instance field).

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: None.

Return: The current modified Booleans.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_SET_GROUP_MODIFIED_STATE

void	MSG_GEN_BOOLEAN_GROUP_SET_GROUP_MODIFIED_STATE(
        word	setBooleans,
        word	clearBooleans);

GenBooleans are normally marked modified any time their state is altered, and they are marked not modified after these changes have been applied. You may also mark GenBooleans modified (or mark them nor modified) with this message. You should pass this message both the GenBooleans to set and the GenBooleans to clear (in the GBGI _modifiedBooleans instance field).

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: setBooleans A record indicating the GenBooleans to be set modified in GBGI_ modifiedBooleans .

clearBooleans
A record (mask) indicating the GenBooleans to be set not modified (cleared) in GBGI_ modifiedBooleans .

Return: Nothing.

Interception: Generally not intercepted.

Setting the Booleans Individually

MSG_GEN_BOOLEAN_GROUP_GET_BOOLEAN_OPTR, MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_SELECTED, MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_STATE, MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_INDETERMINATE, MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_INDETERMINATE_STATE, MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_MODIFIED, MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_MODIFIED_STATE

You can retrieve the optr of a particular GenBoolean object by sending the BooleanGroup MSG_GEN_BOOLEAN_GROUP_GET_ITEM_OPTR , passing it the identifier of the boolean in question. You can then use that optr to directly communicate with the object for purposes such as enabling/disabling, setting not usable, etc.

To check on whether a GenBoolean is currently selected, send the BooleanGroup MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_SELECTED , passing it the identifier to check. To set the selection state of a Boolean, send the BooleanGroup MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_STATE , passing it the identifier and the selection state (on or off).

To check on the indeterminate state of a GenBoolean, send the BooleanGroup MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_INDETERMINATE , passing the identifier to check. To set the indeterminate state of a Boolean, send MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_INDETERMINATE_STATE , passing it the identifier and the indeterminate state to set the Boolean to.

To check on the modified state of a GenBoolean, send the BooleanGroup MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_MODIFIED , passing the identifier to check. To set the modified state of a Boolean, send MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_MODIFIED_STATE , passing it the identifier and the modified state.

MSG_GEN_BOOLEAN_GROUP_GET_BOOLEAN_OPTR

optr	MSG_GEN_BOOLEAN_GROUP_GET_BOOLEAN_OPTR(
        word	identifier);

This message returns the optr of the requested GenBoolean. You may then use this optr to alter that Boolean's state individually. If the GenBoolean with the matching identifier is not found, a null optr will be returned.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: identifier The identifier of the GenBoolean to look for.

Return: The optr of the requested GenBoolean object (or a null optr if none is found).

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_SELECTED

Boolean	MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_SELECTED(
        word	identifier);

This message checks whether the GenBoolean with the passed identifier is selected.

Source: Unrestricted.

Destination: Any GenBooleanGroup object

Parameters: identifier The identifier of the GenBoolean to check.

Return: Will return true if GenBoolean is selected, false if GenBoolean is unselected.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_STATE

void	MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_STATE(
        word		identifier,
        Boolean		state);

This message sets an individual GenBoolean's selection state, leaving other GenBooleans unaffected. You may alter the selection state of individual GenBooleans even if they are not usable, not enabled, or not even within the BooleanGroup. (This is useful for linked BooleanGroups.)

Source: Unrestricted.

Destination: Any GenBooleanGroup.

Parameters: identifier The identifier of the GenBoolean.

state
TRUE to mark selected, FALSE to mark unselected.

Return: Nothing.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_INDETERMINATE

Boolean	MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_INDETERMINATE(
        word	identifier);

This message checks whether the GenBoolean with the passed identifier is indeterminate (by examining the GBDI_ indeterminateBooleans instance field).

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: identifier The identifier of the GenBoolean to check.

Return: Will return true if the GenBoolean is indeterminate, false if is not.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_INDETERMINATE_STATE

void	MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_INDETERMINATE_STATE(
        word		identifier,
        Boolean		indeterminateState);

This message sets the indeterminate state of an individual GenBoolean without affecting any other GenBooleans. You may mark GenBooleans indeterminate even if they are not usable, not enabled, or not even present within the BooleanGroup.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: identifier The identifier of the GenBoolean.

indeterminateState
Pass TRUE to mark the GenBoolean indeterminate, FALSE to mark it not indeterminate.

Return: Nothing.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_MODIFIED

Boolean	MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_MODIFIED(
        word	identifier);

This message checks whether the GenBoolean with the passed identifier has been modified (by examining the GBGI_ modifiedBooleans instance field).

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: identifier The identifier of the GenBoolean to check.

Return: Will return true if boolean has been modified, false if it has not.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_MODIFIED_STATE

void	MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_MODIFIED_STATE(
        word		identifier,
        Boolean		modifiedState);

This message sets the modified state of an individual GenBoolean without affecting any other GenBooleans. You may mark GenBooleans modified even if they are not usable, not enabled, or not even present within the BooleanGroup.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: identifier The identifier of the GenBoolean.

modifiedState
TRUE to mark the GenBoolean modified, FALSE to mark it not modified.

Return: Nothing.

Interception: Generally not intercepted.

Altering the Destination

MSG_GEN_BOOLEAN_GROUP_GET_DESTINATION, MSG_GEN_BOOLEAN_GROUP_SET_DESTINATION, MSG_GEN_BOOLEAN_GROUP_GET_APPLY_MSG, MSG_GEN_BOOLEAN_GROUP_SET_APPLY_MSG

To retrieve the GenBooleanGroup's destination stored in its GBGI_ destination instance field or the message stored in its GBGI_ applyMsg instance field, use MSG_GEN_BOOLEAN_GROUP_GET_DESTINATION or MSG_GEN_BOOLEAN_GROUP_GET_APPLY_MSG .

To set the GenBooleanGroup's destination to an object or process, send the list a MSG_GEN_BOOLEAN_GROUP_SET_DESTINATION , passing it the optr of the new destination. This object will thereafter handle all apply actions sent by the GenBooleanGroup.

To set the GenBooleanGroup's apply action to a new message, send the list a MSG_GEN_BOOLEAN_GROUP_SET_APPLY_MSG , passing it the message to use.

MSG_GEN_BOOLEAN_GROUP_GET_DESTINATION

optr	MSG_GEN_BOOLEAN_GROUP_GET_DESTINATION();

This message returns the current destination object for the BooleanGroup, as specified in the GBGI_ destination instance field.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: None.

Return: The optr of the current destination object.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_SET_DESTINATION

void	MSG_GEN_BOOLEAN_GROUP_SET_DESTINATION(
        optr	dest);

This message sets a new destination object for a BooleanGroup. The apply and status messages of this BooleanGroup will be sent to this new destination.

Source: Unrestricted.

Destination: Any GenBooleanGroup.

Parameters: dest The optr of the new destination object; this will be put into GBGI_ destination .

Return: Nothing.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_GET_APPLY_MSG

Message	MSG_GEN_BOOLEAN_GROUP_GET_APPLY_MSG();

This message returns the current apply action in the GenBooleanGroup's GBGI_ applyMsg instance field.

Source: Unrestricted.

Destination: Any GenBooleanGroup.

Parameters: None.

Return: The current apply message.

Interception: Generally not intercepted.

MSG_GEN_BOOLEAN_GROUP_SET_APPLY_MSG

void	MSG_GEN_BOOLEAN_GROUP_SET_APPLY_MSG(
        Message		message);

This message sets a new apply message in the GenBooleanGroup's GBGI_ applyMsg instance field.

Source: Unrestricted.

Destination: Any GenBooleanGroup object.

Parameters: message The new apply message.

Return: Nothing.

Return: Generally not intercepted.


Up: GEOS SDK TechDocs | Up | Prev: 5.2 GenBooleanGroup Usage