Ovis_Layer_Create()
Abstract
Creates the Ovis layer.
Syntax
Ovis_Layer_Create (layer_name, comment, parent_layer, show_initially, destroy_callback, user_state)
| Argument | Type | Description |
|---|---|---|
layer_name |
const char * |
Layer name |
comment |
const char * |
Specifies comment |
parent_layer |
OvisT_Layer * |
Parent layer |
show_initially |
OvisT_Boolean |
Specifies whether the layer appears initially |
destroy_callback |
OvisT_Layer_State_Destroy_Proc |
User-defined procedure used to destroy the data associated with the object and deallocate its memory |
user_state |
void * |
User-defined state associated with the layer |
Return Type
OvisT_Layer *
Pointer to the Ovis layer
Header
ovis_layer.h
Details
This function creates the Ovis layer and specifies the attributes of the layer. Information layers provide the ability to show or hide a set of related decorations to avoid having too much graphical decorations in the animation. Layers can include any number of decorations and other layers. There is a root layer that cannot be destroyed. Showing a layer will show its decorations and child layers (recursively showing). Hiding a layer will hide its decorations and child layers (recursively hiding).
Example
OvisT_Layer * root_layer, * pkt_cnt_layer;
/* root layer created elsewhere */
pkt_cnt_layer = Ovis_Layer_Create ("global packet info",
"Hold various 2D decorations representing global packet counts",
root_layer, OvisC_True, OPC_NIL, OPC_NIL);
Errors
- No layer name provided.
Reference
- Use the function
Ovis_Root_Layer_Get()to discover the root layer. - Use the function
Ovis_Layer_Destroy()to destroy a layer.