EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #169 background imageLoading...
Page #169 background image
127
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
12. Basic Text Editing Facility
The basic text editing facility simplifies the entry and editing of text. The text
editor supports cursor blink, text entry, and cut, copy, and paste through the
clipboard.
12.1. How to Edit Text
Begin by creating a text edit record and attaching it to a window. The text edit
record keeps track of the edit buffer contents, cursor location, selected text, and
other details of presenting the text in a window. Routines
TE_open
and
TE_openFixed
initialize a text edit record and attach it to a window.
The edit buffer can be variable- or fixed-length. Use routine
TE_open
to create a
variable-length edit buffer. The text editor maintains a handle to the edit buffer
and expands or contracts the buffer automatically as text is added or deleted.
The edit buffer always contains at least one byte for the null end-of-string
terminator.
Use routine
TE_openFixed
to initialize a text edit record with a fixed-length edit
buffer. Unlike
TE_open
, this routine cannot allocate a buffer if the app does not
provide one.
TE_openFixed
must be given a pointer to a buffer big enough to
contain the longest expected data plus room for one null end-of-string terminator.
The text editor handles keypresses through the
TE_handleEvent
routine. Pass
to
TE_handleEvent
an event received by the app from the OS. The text editor
processes the event and takes care of inserting or deleting text, highlighting
selected text, cut, copy, paste, repainting, and cursor blink messages.
TE_handleEvent
returns TRUE if it handled the event. The application should
pass the event to
EV_defaultHandler
if the text editor returns FALSE.
To do anything useful with the edited text, the application should look at
CM_KEY_PRESS events before calling
TE_handleEvent
. The application
should respond to keys such as
¸
to terminate the edit and act on the
contents of the edit buffer.
Routine
TE_shrinkWrap
releases slack memory in a variable-length edit buffer,
cancels selection highlight, turns off the cursor, and returns a handle to the edit
text. The edit buffer memory is not freed. Use this routine to prepare the edit
buffer for further processing in the app or to be stored as a variable.
Call
TE_reopen
to reopen a text edit record which has been closed by
TE_shrinkWrap
. This routine selects and highlights all the text in the edit buffer.
Call
TE_close
to close out a text edit record and release its memory.

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals