|
txtattr Specification SheetPortable Object Compiler (c) 1997,98,99. All Rights Reserved.
TextAttributeInherits from: ObjectMaturity Index: Experimental
Class DescriptionAbstract superclass for Text Attributes, as used by the Text and the RunArray classes.Typically, an application will subclass TextAttribute and use its own subclass with the Text instance method addAttribute:.
Method typesText EmphasisAccessingComparisonCoalescingSetting Scanner AttributesPrintingMethodsnormal+normalA Text Attribute instance with emphasiscode set to 0.
new+newA Text Attribute instance with emphasiscode set to 0.
bold+boldCreates a Textattribute with emphasiscode set to 1.
emphasiscode:+emphasiscode:(unsigned)nA Text Attribute instance with emphasiscode set to n. This value may suffice for simple applications, but normally a subclass of TextAttribute would be used to associate more sophisticated values to a Text Attribute (such as URL of a hypertext link, or such as a Color value, or an X-Windows font etc.).
emphasiscode- (unsigned)emphasiscode emphasiscode:-emphasiscode:(unsigned)c isEqual:- (BOOL)isEqual:attribThe equality test for TextAttributes is used by RunArray's coalesce method to merge adjacent TextAttribute instances.
dominates:- (BOOL)dominates:attribShould return YES if the receiver dominates attrib. This implies that, when the receiver is added to a list of Text Attributes, attributes that are dominated by the receiver will be removed. The default returns NO, unless both objects are members of the same class and equal to each other (in which case they don't need to be added more than once to the attribute list).
reset-resetMessage that is sent to the attribute before it is added to a list of attributes. Doesn't do anything by default.
set- (BOOL)setMessage that is sent to the attribute before it is added to a list of attributes. If it returns YES (the default), the attribute will be added. May be overridden to turn off attributes.
emphasizeScanner:-emphasizeScanner:aScannerThe default implementation of this method simply returns self. Normally a scanner class (which renders text in some specific format) would send emphasizeScanner: messages with itself as argument to a list of text attributes. The text attributes can then act upon the scanner and set text color, font and other formatting properties.
printOn:-printOn:(IOD)aFile |