Carbon


MeasureWindowTitleRec

Header: MacWindows.h

struct MeasureWindowTitleRec {
    SInt16 fullTitleWidth; 
    SInt16 titleTextWidth; 
    Boolean isUnicodeTitle; 
    Boolean unused;
};
typedef MeasureWindowTitleRec MeasureWindowTitleRecPtr;

Field descriptions

fullTitleWidth

Your window definition function sets this field to a value specifying the total width in pixels of the window title text and any proxy icon that may be present, ignoring any compression or truncation that might be required when the title is actually drawn. That is, the specified width should be the ideal width that would be used if the window were sufficiently wide to draw the entire title along with a proxy icon. You should measure the title width using the current system font. If no proxy icon is present, this field should have the same value as the titleTextWidth field.

titleTextWidth

Your window definition function sets this field to a value specifying the width in pixels of the window title text, ignoring any compression or truncation that might be required when the title is actually drawn. That is, the specified width should be the ideal width that would be used if the window were sufficiently wide to draw the entire title. You should measure the title width using the current system font.

isUnicodeTitle

Your window definition function may ignore this field; it is reserved for future use.

unused

Your window definition function may ignore this field; it is reserved for future use.

If you implement a custom window definition function, when the Window Manager passes the message kWindowMsgMeasureTitle in your window definition function’s message parameter it also passes a pointer to a structure of type MeasureWindowTitleRec in the param parameter. Your window definition function is responsible for setting the contents of the MeasureWindowTitleRec structure to contain data describing the ideal title width.

See “Window Definition Message Constants” and “Window Definition Feature Constants” for more details on the kWindowMsgMeasureTitle message and the corresponding kWindowCanMeasureTitle feature flag.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)