ChangeRangeRuns
protoTXView:ChangeRangeRuns(range, fontSpec, toggleFace, undoable)
Changes the font attributes for a range of text in a word-processing view.
- range
- A range frame defining the text range that you want to change. See "The Range Frame".
- fontSpec
- A font specification frame that can contain
nil
slots. Any non-nil
slots in this frame indicate new text attributes for the range. Usenil
slots to indicate that the corresponding attribute is not to change. For a description of the font specification frame, see the section "Font Frame" (8-18) in Newton Programmer's Guide.
- toggleFace
- A Boolean value that specifies the font face attribute to use for all text in the range.
- If toggleFace is
nil
, the font face is changed to the value of theface
slot in fontSpec. If that value isnil
, the font face is not change.
- If toggleFace is non-
nil
, the font face is toggled: if one of the font face values specified in theface
slot in fontSpec is used across the entire range, *ChangeRangeRuns
turns off that attribute. Otherwise, that attribute is applied to all of the text in range.
- undoable
- If the value of this slot is non-
nil
, the operation can be undone. If the value of this slot isnil
, the operation cannot be undone.
- return value
- An error code, or
nil
if the operation worked.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help