Ets_Edit_Pad_File_Open()

Note: Requires OPNET Development Kit

Abstract

Opens an edit pad dialog box using the specified file and options.

Syntax

Ets_Edit_Pad_File_Open (title, options, bounds_rect_ptr, file_path, line_num, save_proc, cancel_proc, client_state_ptr)
Argument Type Description
title const char * Title for the new edit pad. If NIL, the title will be the name of the file pointed to by file_path.
options int Options for the edit pad (see Details).
bounds_rect_ptr EtsT_Rect * Dialog box size for the edit pad (see Details).
file_path const char * File system path to the file containing the desired edit pad content.
line_num int Line to contain the cursor.
save_proc EtsT_Edit_Pad_Action_Proc Function to be called when the user clicks the edit pad’s Save button.
cancel_proc EtsT_Edit_Pad_Action_Proc Function to be called when the user clicks the edit pad’s Cancel button.
client_state_ptr void * User-defined data that is passed to the save_proc and cancel_proc callbacks each time they are called.

Return Type

EtsT_Dbox *

Pointer to the newly opened edit pad dialog box.

ets_api_edit_pad.h

Details

This function opens a new edit pad. It is identical to Ets_Edit_Pad_Open(), except that the edit pad’s contents are taken from a file instead of a list.

The edit pad is opened in an external editor (if one is specified in the “editor_prog“ preference), unless the ETSC_EDIT_PAD_BUILTIN option is set. For other supported options, see Symbolic Constants.

The bounds_rect_ptr references a structure containing the left, top, right, and bottom coordinates of the dialog box, relative to the upper-left corner of the workspace.

The cursor is placed in the line specified by line_num, where 0 is the first line of the edit pad. If line_num is negative or greater than the number of lines of text, the edit pad is scrolled to the end of the text.

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