Ets_Edit_Pad_Open()
Note: Requires OPNET Development Kit
Abstract
Opens an edit pad dialog box using the specified text and options.
Syntax
Ets_Edit_Pad_Open (title, options, bounds_rect_ptr, text_lptr, line_num, save_proc, cancel_proc, client_state_ptr)
| Argument | Type | Description |
|---|---|---|
title |
const char * |
Title for the new edit pad. |
options |
int |
Options for the edit pad (see Details). |
bounds_rect_ptr |
EtsT_Rect * |
Dialog box size for the edit pad (see Details). |
text_lptr |
PrgT_List * |
List of lines of text to be assigned to the edit pad. |
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.
Header
ets_api_edit_pad.h
Details
This function opens a new edit pad. You can specify the title, size, and initial contents for the edit pad.
The edit pad is opened in an external editor (if one is specified by 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.