Ets_Tree_Element_Status_Get()
Note: Requires OPNET Development Kit
Abstract
Provides the status of an element
Syntax
Ets_Tree_Element_Status_Get (element_ptr)
| Argument | Type | Description |
|---|---|---|
element_ptr |
EtsT_Tree_Element * |
Pointer to an element. |
Return Type
int
Element status (see Details).
Header
ets_api_gui.h
Details
Returns an integer with encoded information regarding the status of the element in question. Status information includes whether the element is currently selected, whether it is “open”, and so on. The result will have the following combination of flags OR’ed in:
ETSC_TREE_ELEMENT_OPT_NONE—None of the option statuses is set.ETSC_TREE_ELEMENT_OPT_SELECTED—The element is selected.ETSC_TREE_ELEMENT_OPT_COMPUTE_CHILDREN—The element has a compute child handler.ETSC_TREE_ELEMENT_OPT_OPEN—The child elements are visible.
To determine whether the return value has OPT_SELECTED set, you would AND the returned value with OPT_SELECTED and if the resulting value is not zero, the flag is set. If it is zero, it is not set. For example:
if (return_value & ETSC_TREE_ELEMENT_OPT_SELECTED != 0)… /* flag is set */
To set the status, use Ets_Tree_Element_Status_Set().