![]() |
TXNAttachObjectToWindow |
||||
Header: | MacTextEditor.h | Carbon status: | Supported | |
Attaches a window to a text object.
OSStatus TXNAttachObjectToWindow ( TXNObject iTXNObject, GWorldPtr iWindow, Boolean iIsActualWindow );
A variable of type TXNObject. Pass the text object with which you want to associate the window.
A pointer to the graphics port to which the object should be attached. The graphics port may be a window or a generic graphics port. If it is a window, note that you must typecast the window pointer to a GWorldPtr data type.
A variable of type Boolean. Pass true if the iWindow parameter you passed refers to a Window Manager window, not a generic graphics port. Pass false if the iWindow parameter you passed does not refer to a window. If you pass false, MLTE never calls window-specific functions such as InvalRect or BeginUpdate for this text object, and it is your programs responsibility to handle any window-related functionality.
A result code. TXNAttachObjectToWindow returns kObjectAlreadyAttachedToWindowErr if there is already a window associated with the text object or paramErr if the text object that you pass is invalid.
You may create a text object without an associated window pointer by passing NULL in the iWindow parameter of the TXNNewObject function. However, if you do so, you must call the TXNAttachObjectToWindow function to associate a window with that object before you call any other MLTE function.
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)