GEOS SDK TechDocs
|
|
5.2 GenBooleanGroup Usage
Both the BooleanGroups and the Booleans themselves may be dynamically changed to alter the behavior of the list objects.
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.
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.
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.
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.
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
.
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.
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.
Return: Nothing.
Interception: Generally not intercepted.
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.
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.
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
.
modifiedBooleans
.Return: Nothing.
Interception: Generally not intercepted.
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.
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.
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.
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.
Return: Nothing.
Interception: Generally not intercepted.
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.
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.
Return: Nothing.
Interception: Generally not intercepted.
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.
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.
Return: Nothing.
Interception: Generally not intercepted.
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.
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.
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.
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.
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.
GEOS SDK TechDocs
|
|
5.2 GenBooleanGroup Usage