Carbon


TXNDraw

Header: MacTextEditor.h Carbon status: Supported

Redraws the text area, including any scroll bars associated with the text frame.

void TXNDraw (
    TXNObject iTXNObject, 
    GWorldPtr iDrawPort
);
Parameter descriptions
iTXNObject

A variable of type TXNObject. Pass the text object to be redrawn.

iDrawPort

A variable of type GWorldPtr. Pass a valid pointer or NULL. If you pass NULL, TXNDraw redraws the text area into the port that is currently associated with the text object. If you pass a valid pointer instead of NULL, TXNDraw redraws the text area into the specified port, and does not update the selection. You should pass NULL if you want to draw on the screen and a valid pointer if you want to take a snapshot of what’s on the screen to save or print.

DISCUSSION

You can call the TXNDraw function in response to an update event for a window that contains multiple text objects or other graphic elements. If necessary, your application is also responsible for calling the functions BeginUpdate and EndUpdate in response to the update event.

If the window contains only a single text object, you can call the function TXNUpdate instead, which handles an update event by drawing everything in the frame, and you do not have to call the Window Manager functions BeginUpdate and EndUpdate yourself.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)