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

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:

  1. Lock the UI.
  2. Make all of your update calls.
  3. Unlock the UI.

After the preceding steps, all GUI changes will be processed in one batch and you will save drawing time.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com