MakeFontMenu
MakeFontMenu(font, families, sizes, styles)
Creates an array of font menu items.
DISCUSSION
- 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. Passingnil
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 isnil
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 passnil
, 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 passnil
, 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 thePopupMenu
view method.
Presently, the styles argument ignores the constants
kFaceSuperscript
andkFaceSubscript
.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help