O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSFontPanel — Mac OS X 10.0

Synopsis

This class provides an implementation for the font-panel that users interact with to select fonts in an application. The panel provides a list of all available fonts from which the user can select a font, style, size, and preview the font as well. NSFontPanel communicates with NSFontManager to obtain the set of available fonts, as well as to effect any changes that may need to be done in the selected text.

image with no caption

@interface NSFontPanel : NSPanel
                                  // Accessor Methods
   - (void)setEnabled:(BOOL)flag;
   - (void)setAccessoryView:(NSView *)aView;
   - (NSView *)accessoryView;
   - (void)setPanelFont:(NSFont *)fontObj 
                                 isMultiple:(BOOL)flag;
                                  // Class Methods
   + (NSFontPanel *)sharedFontPanel;
   + (BOOL)sharedFontPanelExists;
                                  // Instance Methods
   - (void)reloadDefaultFontFamilies;
   - (BOOL)isEnabled;
   - (NSFont *)panelConvertFont:(NSFont *)fontObj;
   - (BOOL)worksWhenModal;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required