Ets_Icon_From_Text_Create()

Note: Requires OPNET Development Kit

Abstract

Creates an icon representing a specified text string.

Syntax

Ets_Icon_From_Text_Create (icon_name, text_value, fg_color, bg_color, options)
Argument Type Description
icon_name const char * Name for the icon.
text_value const char * Text string to represent in the icon (see Details).
fg_color EtsT_Color Foreground color for the text in the icon.
bg_color EtsT_Color Background color for the text in the icon.
options int Unused; set to ETSC_ICON_CREATE_OPT_NONE.

Return Type

EtsT_Icon *

Pointer to the new icon; PRGC_NIL if unsuccessful (for example, if an icon already exists with the given name).

ets_api_icon.h

Details

This function dynamically creates an icon representing the string text_value. The string format can be either a simple string or text in ChartDirector Mark Up Language. The markup language allows you to specify formatting and embedded images. For example, the string

Test<*img=foo.gif*>

will produce an icon comprising the string “Test” followed by the specified image. The image file must be in the sys/images directory.

The newly created icon is placed in the default dynamic icon database. It will be destroyed when Ets_Icon_Unreference() is called and its reference count is 0. The icon is created with an initial reference count of 0. If the client is holding a reference to the icon, it should call Ets_Icon_Reference() to increase the reference count to 1.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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