DekGenius.com
[ Team LiB ] Previous Section Next Section

NSFontManager Mac OS X 10.0

This class defines the interface to the system Cocoa uses to coordinate the usage of fonts in an application. Part of NSFontManager's duty is to keep track of the currently selected font, and manage the interaction between the Font Panel, Font menu, and text-bearing objects. To obtain an application's Font Manager, use the class method sharedFontManager.

figs/cocn_1533.gif

@interface NSFontManager : NSObject
 // Accessor Methods
   - (void)setEnabled:(BOOL)flag;
   - (void)setSelectedFont:(NSFont *)fontObj isMultiple:(BOOL)flag;
   - (NSFont *)selectedFont;
   - (void)setDelegate:(id)anObject;
   - (id)delegate;
   - (void)setAction:(SEL)aSelector;
   - (SEL)action;
   - (void)setFontMenu:(NSMenu *)newMenu;
 // Class Methods
   + (void)setFontManagerFactory:(Class)factoryId;
   + (void)setFontPanelFactory:(Class)factoryId;
   + (NSFontManager *)sharedFontManager;
 // Instance Methods
   - (NSString *)localizedNameForFamily:(NSString *)family face:(NSString *)faceKey;
   - (void)addFontTrait:(id)sender;
   - (NSArray *)availableFontFamilies;
   - (NSArray *)availableFontNamesWithTraits:(NSFontTraitMask)someTraits;
   - (NSArray *)availableFonts;
   - (NSArray *)availableMembersOfFontFamily:(NSString *)fam;
   - (NSFont *)convertFont:(NSFont *)fontObj;
   - (NSFont *)convertFont:(NSFont *)fontObj toFace:(NSString *)typeface;
   - (NSFont *)convertFont:(NSFont *)fontObj toFamily:(NSString *)family;
   - (NSFont *)convertFont:(NSFont *)fontObj toHaveTrait:(NSFontTraitMask)trait;
   - (NSFont *)convertFont:(NSFont *)fontObj toNotHaveTrait:(NSFontTraitMask)trait;
   - (NSFont *)convertFont:(NSFont *)fontObj toSize:(float)size;
   - (NSFont *)convertWeight:(BOOL)upFlag ofFont:(NSFont *)fontObj;
   - (NSMenu *)fontMenu:(BOOL)create;
   - (BOOL)fontNamed:(NSString *)fName hasTraits:(NSFontTraitMask)someTraits;
   - (NSFontPanel *)fontPanel:(BOOL)create;
   - (NSFont *)fontWithFamily:(NSString *)family traits:(NSFontTraitMask)traits 
        weight:(int)weight size:(float)size;
   - (BOOL)isEnabled;
   - (BOOL)isMultiple;
   - (void)modifyFont:(id)sender;
   - (void)modifyFontViaPanel:(id)sender;
   - (void)orderFrontFontPanel:(id)sender;
   - (void)removeFontTrait:(id)sender;
   - (BOOL)sendAction;
   - (NSFontTraitMask)traitsOfFont:(NSFont *)fontObj;
   - (int)weightOfFont:(NSFont *)fontObj;
// Methods Implemented by the Delegate
   - (void)changeFont:(id)sender;
   - (BOOL)fontManager:(id)sender willIncludeFont:(NSString *)fontName;

    [ Team LiB ] Previous Section Next Section