Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 11 - Miscellaneous / Reference
Functions and Methods / Text Input and Display


MakeFontMenu

MakeFontMenu(font, families, sizes, styles)

Creates an array of font menu items.

font
Nil or a font specification as either a frame or a packed integer that represents the default font. The returned font menu checks the items that correspond to the selected font family, size and style. Passing nil results in no items being checked.

families
Nil, the symbols 'all or 'none, or an array of font families. This parameter controls which fonts are returned. If this parameter is nil the all user fonts in the system ar returned (recommended). If you pass the symbol 'all every font is returned, including system font. If you pass the symbol 'none family choices are not included in the returned menu. An array specifies the list of font families to return for the menu.

sizes
Nil, the symbol 'none, or an array of numbers. This parameter controls which font sizes are returned. If you pass nil, the font size specified in the font parameter is used. If you pass the symbol 'none font size choices are not included in the menu. An array specifies the list of sizes to return for the menu.

styles
Nil, the symbol 'none, or an integer. This parameter controls which style choices are returned. If you pass nil, the default styles in the system are returned. If you pass the symbol 'none style choices are not included in the menu. An integer specifies a list of style choices to return for the menu as a packed integer; the constants specified in "Font Face Constants" (page 7-3) in Newton Programmer's Reference.To specify more than one font face constant, simply add them together, and pass in the sum.

return value
An array of font menu items, suitable for use wherever a pop up menu array is needed, such as in protoPopupButton, protoPopInPlace, and the PopupMenu view method.

DISCUSSION

Presently, the styles argument ignores the constants kFaceSuperscript and kFaceSubscript.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help