NSFontPanelValidation Protocol Reference
(informal protocol)
| Framework | /System/Library/Frameworks/AppKit.framework |
| Companion guide | |
| Declared in | NSFontPanel.h |
Overview
Informal protocol. The Font Panel can be explicitly ordered to display some or all of its elements by responding to the validModesForFontPanel: instance method.
Instance Methods
validModesForFontPanel:
Returns the mode mask corresponding to the expected font panel mode.
Discussion
The mode masks are defined in Mode Masks.
The Font Panel has the ability to hide elements that are not applicable for a given context by having the target respond to validModesForFontPanel:. If the target desires a font panel mode other than the standard mode mask, it must respond to this method.
This message is sent up the responder chain to the first responder implementing the method. Ideally that object should be the first responder found that also implements changeFont:.
Availability
- Available in OS X v10.3 and later.
Declared In
NSFontPanel.hConstants
Mode Masks
The following constants correspond to the available font panel mode masks returned by validModesForFontPanel:.
enum {
NSFontPanelFaceModeMask = 1 << 0,
NSFontPanelSizeModeMask = 1 << 1,
NSFontPanelCollectionModeMask = 1 << 2,
NSFontPanelUnderlineEffectModeMask = 1<<8,
NSFontPanelStrikethroughEffectModeMask = 1<<9,
NSFontPanelTextColorEffectModeMask = 1<< 10,
NSFontPanelDocumentColorEffectModeMask = 1<<11,
NSFontPanelShadowEffectModeMask = 1<<12,
NSFontPanelAllEffectsModeMask = 0XFFF00,
NSFontPanelStandardModesMask = 0xFFFF,
NSFontPanelAllModesMask = 0xFFFFFFFF
};
Constants
NSFontPanelFaceModeMaskDisplay the typeface column.
Available in OS X v10.3 and later.
Declared in
NSFontPanel.h.NSFontPanelSizeModeMaskDisplay the font size column.
Available in OS X v10.3 and later.
Declared in
NSFontPanel.h.NSFontPanelCollectionModeMaskDisplay the font collections column.
Available in OS X v10.3 and later.
Declared in
NSFontPanel.h.NSFontPanelUnderlineEffectModeMaskDisplay the underline popup menu.
Available in OS X v10.4 and later.
Declared in
NSFontPanel.h.NSFontPanelStrikethroughEffectModeMaskDisplay the strike-through popup menu.
Available in OS X v10.4 and later.
Declared in
NSFontPanel.h.NSFontPanelTextColorEffectModeMaskDisplay the text color button.
Available in OS X v10.4 and later.
Declared in
NSFontPanel.h.NSFontPanelDocumentColorEffectModeMaskDisplay the document color button.
Available in OS X v10.4 and later.
Declared in
NSFontPanel.h.NSFontPanelShadowEffectModeMaskDisplay the shadow effects button.
Available in OS X v10.4 and later.
Declared in
NSFontPanel.h.NSFontPanelAllEffectsModeMaskDisplay all the effects user interface items.
Available in OS X v10.4 and later.
Declared in
NSFontPanel.h.NSFontPanelStandardModesMaskDisplay the standard default font panel—that is, including the collections, typeface, and size columns.
Available in OS X v10.3 and later.
Declared in
NSFontPanel.h.NSFontPanelAllModesMaskDisplay all the available adornments.
Available in OS X v10.3 and later.
Declared in
NSFontPanel.h.
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-11-13)