![]() |
ControlFontStyleRec |
Header: Controls.h |
struct ControlFontStyleRec { SInt16 flags; SInt16 font; SInt16 size; SInt16 style; SInt16 mode; SInt16 just; RGBColor foreColor; RGBColor backColor; }; typedef ControlFontStyleRec ControlFontStylePtr;
A value specifying which fields of the structure should be applied to the control; see
If the kControlUseFontMask bit is set, then this field contains a value specifying the ID of the font family to use. If this bit is not set, then the system default font is used. A meta font constant can be specified instead; see
If the kControlUseSizeMask bit is set, then this field contains a value specifying the point size of the text. If the kControlAddSizeMask bit is set, this value will represent the size to add to the current point size of the text. A meta font constant can be specified instead; see
If the kControlUseFaceMask bit is set, then this field contains a value specifying which styles to apply to the text. If all bits are clear, the plain font style is used. The bit numbers and the styles they represent are bold (0), italic (1), underline (2), outline (3), shadow (4), condensed (5), and extended (6).
If the kControlUseModeMask bit is set, then this field contains a value specifying how characters are drawn in the bit image. See Inside Macintosh: Imaging With QuickDraw for a discussion of transfer modes.
If the kControlUseJustMask bit is set, then this field contains a value specifying text justification. Possible values are teFlushDefault (0), teCenter (1), teFlushRight (-1), and teFlushLeft (-2).
If the kControlUseForeColorMask bit is set, then this field contains an RGB color value to use when drawing the text.
If the kControlUseBackColorMask bit is set, then this field contains an RGB color value to use when drawing the background behind the text. In certain text modes, background color is ignored.
You can use the ControlFontStyleRec type to specify a controls font. You pass a pointer to the control font style structure in the inStyle parameter of
Note that if you wish to specify the font for controls in a dialog box, you should use a dialog font table resource, which is automatically read in by the Dialog Manager.
© 2000 Apple Computer, Inc. (Last Updated 5/8/2000)