Ets_Model_Draw_Lock()
Abstract
Locks the drawing of the visual representation of the network. Rendering operations are postponed until the network model is unlocked.
Syntax
Ets_Model_Draw_Lock (mdl_hndl)
| Argument | Type | Description |
|---|---|---|
mdl_hndl |
EtsT_Model_Handle |
Handle of the model to be locked. |
Return Type
void
no return value
Header
ets_api_model.h
Details
This function prevents changes to the network model from modifying the visual representation of the network until Ets_Model_Draw_Unlock() is called. Only network models are supported.
Use this function to save time when you are making many attribute changes. For example, suppose you are doing a batch operation, such as
- looping over all nodes and changing their location or icon
- looping over all links and changing their thickness, draw style, or color
- generally adding or deleting nodes or links from a model
- changing link connectivity
Usually, each modification to an object in the workspace results in a separate GUI update being processed by the low-level GUI library. With this function, you can prevent incremental graphics updates from occurring. The workflow is:
- Lock the UI.
- Make all of your update calls.
- Unlock the UI.
After the preceding steps, all GUI changes will be processed in one batch and you will save drawing time.