Functions


Controlling the Frame and Window

TXNGetViewRect Gets the rectangle that describes the current view of the document.
TXNGrowWindow Adjusts the size of a window in response to mouse-down and mouse-moved events in the size region of the window.
TXNResizeFrame Changes the size of the text object’s frame.
TXNSetBackground Set the type of background on which the text object’s data is drawn.
TXNSetFrameBounds Changes the boundaries of a text object’s frame.
TXNZoomWindow Increases the size of the data displayed in a window in response to a mouse-up event in the zoom box.

Displaying Static Text

TXNDrawCFStringTextBox Draws a CFString in the specified rectangle. You do not need to initialize MLTE to use this function.
TXNDrawUnicodeTextBox Draws a Unicode string in the specified rectangle. You do not need to initialize MLTE to use this function.

Editing Data

TXNCanRedo Returns whether the most recently undone action is redoable and provides a value that indicates the type of action that can be redone.
TXNCanUndo Returns whether the most recent action is undoable and provides a value that indicates the type of action than can be undone.
TXNClear Deletes the current selection.
TXNConvertFromPublicScrap Converts the Clipboard content to the private MLTE scrap.
TXNConvertToPublicScrap Converts the private MLTE scrap content to the Clipboard.
TXNCopy Copies the current selection to the private MLTE scrap.
TXNCut Deletes the current selection and adds it to the private MLTE scrap.
TXNGetData Copies a range of data.
TXNGetDataEncoded Copies the text in the a specified range, and if necessary, translates the text to match the application’s preferred encoding.
TXNIsScrapPastable Tests to see if the Clipboard contains data that is supported by MLTE.
TXNPaste Pastes the contents of the private MLTE scrap into the text object.
TXNRedo Redoes the last command.
TXNSetData Replaces a range of data (text, graphics, and so forth) with the data you specify.
TXNSetDataFromFile Replaces a range of data with the contents of the file you specify.
TXNUndo Undoes the last command.

Initializing and Terminating MLTE

TXNInitTextension Initializes MLTE.
TXNTerminateTextension Closes the MLTE library.
TXNVersionInformation Gets the version number of MLTE and the set of features in this version.

Managing Files

TXNGetChangeCount Retrieves the number of times a document has been changed.
TXNRevert Reverts to the last saved version of a document.
TXNSave Saves the contents of the document as the file type you specify.

Managing Fonts and Font Menus

TXNCountRunsInRange Obtains a count of the style runs in a range of elements.
TXNDisposeFontMenuObject Disposes a Font menu object.
TXNDoFontMenuSelection Changes the font of the current selection.
TXNGetContinuousTypeAttributes Checks to see if the attributes of the current selection are continuous.
TXNGetFontDefaults Makes a copy of the font descriptions for a given text object.
TXNGetFontMenuHandle Gets the Font menu handle that belongs to a Font menu object.
TXNGetIndexedRunInfoFromRange Gets information about a run in a range.
TXNNewFontMenuObject Creates a new font menu object.
TXNPrepareFontMenu Prepares a Font menu for display.
TXNSetFontDefaults Specifies the font descriptions for each script used in a text object.
TXNSetTypeAttributes Sets text attributes (such as size and style) for the current selection or the text defined by a range you specify.

Managing Layout and Formatting

TXNGetLineCount Gets the total number of lines in a text object.
TXNGetLineMetrics Gets information about line width and height for a specified line of data in text object.
TXNGetTXNObjectControls Gets the current formatting and privileges attributes (such as, justification, line direction, tab values, and read-only status) for a text object.
TXNSetTXNObjectControls Sets formatting and privileges attributes (such as justification, line direction, tab values, and read-only status) that apply to the entire text object.

Managing Selections

TXNGetSelection Get the absolute offsets of the current selection.
TXNIsSelectionEmpty Checks the current selection to see if it is empty.
TXNSelectAll Selects all data in the frame of a text object.
TXNSetSelection Specifies the selection range or the position of the insertion point.
TXNShowSelection Scrolls the current selection into view.

Printing

TXNPageSetup Displays the Page Setup dialog box for the current default printer and manages changes, such as reformatting the text in response to page layout changes.
TXNPrint Prints the document so it is formatted to fit the page size selected for the printer.

Responding to Events

TXNActivate Makes the text display area (that is, frame) of a text object active.
TXNAdjustCursor Obtains the current cursor position and draws the cursor in a form appropriate to the content over which it is placed.
TXNClick Processes a mouse-down event in a window’s content area.
TXNDraw Redraws the text area, including any scroll bars associated with the text frame.
TXNEchoMode Determines whether a specified character is drawn instead of the glyph associated with the input character.
TXNFocus Makes the scroll bars and insertion point active for a TXNObject.
TXNForceUpdate Forces an update of the view rectangle and the scroll bars.
TXNGetSleepTicks Gets the appropriate amount of time to allot to background processes, depending on state of the window.
TXNIdle Does idle time processing, such as flashing the cursor.
TXNKeyDown Processes a key-down event.
TXNTSMCheck Checks to see if the Type Services Manager (TSM) is active.
TXNUpdate Redraws everything in a frame in response to an update event.

Searching

TXNFind Finds a piece of text or a graphics, sound, or movie object.

Supporting Drag and Drop

TXNDragReceiver Handles receiving dragged data in a text object for which a custom drag handler is already in place.
TXNDragTracker Handles tracking a drag event in a text object for which a custom drag handler is already in place.

Working With MLTE Objects

TXNAttachObjectToWindow Attaches a window to a text object.
TXNDataSize Returns the amount of memory used to hold the text in a given text object.
TXNDeleteObject Deletes a previously allocated text object.
TXNIsObjectAttachedToWindow Checks to see if a text object is attached to a window.
TXNNewObject Creates a new text object of type TXNObject. A text object is an opaque structure that handles text formatting at a document level.

Working With Universal Procedure Pointers for MLTE Callback Functions

DisposeTXNFindUPP Disposes of the universal procedure pointer (UPP) to your find callback function.
InvokeTXNFindUPP Calls your find callback function.
NewTXNFindUPP Creates a new universal procedure pointer (UPP) to a find callback function that uses your criteria for matching.

Miscellaneous

TXNCreatePrintObject
TXNDisposePrintObject
TXNObjectPageSetup
TXNObjectPrint
TXNOffsetToPoint
TXNPointToOffset
TXNSetViewRect

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