C# Class AppKit.TextKit.Formatter.LanguageDescriptor

Inheritance: NSObject
Afficher le fichier Open project: xamarin/mac-samples Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
ClearFormats ( ) : void

Resets all of the AppKit.TextKit.Formatter.FormatDescriptor for this language to their default states of unmacthed and inactive.

This should only be called ba a AppKit.TextKit.Formatter.LanguageFormatter.

Define ( ) : void

Define this instance.

FormatForPreview ( string text ) : string

Formats the passed in string of text for previewing.

LanguageDescriptor ( ) : System

Initializes a new instance of the AppKit.TextKit.Formatter.LanguageDescriptor class.

LoadColor ( string key, NSColor defaultValue ) : NSColor

Loads the requested color from system-wide user defaults.

NSColorFromHexString ( string hexValue ) : NSColor

Converts a web formatted hex string in the form #RRGGBB or #RRGGBBAA into a color.

NSColorToHexString ( NSColor color, bool withAlpha ) : string

Converts the given color into a web style hex string in the form #RRBBGG or optionally #RRBBGGAA.

SaveColor ( string key, NSColor color, bool sync ) : void

Saves the given color to the systwm-wide user defaults with the give keyword.

Method Details

ClearFormats() public méthode

Resets all of the AppKit.TextKit.Formatter.FormatDescriptor for this language to their default states of unmacthed and inactive.
This should only be called ba a AppKit.TextKit.Formatter.LanguageFormatter.
public ClearFormats ( ) : void
Résultat void

Define() public méthode

Define this instance.
public Define ( ) : void
Résultat void

FormatForPreview() public méthode

Formats the passed in string of text for previewing.
public FormatForPreview ( string text ) : string
text string Text.
Résultat string

LanguageDescriptor() public méthode

Initializes a new instance of the AppKit.TextKit.Formatter.LanguageDescriptor class.
public LanguageDescriptor ( ) : System
Résultat System

LoadColor() public méthode

Loads the requested color from system-wide user defaults.
public LoadColor ( string key, NSColor defaultValue ) : NSColor
key string The user default key for the color.
defaultValue NSColor The default NSColor value.
Résultat NSColor

NSColorFromHexString() public méthode

Converts a web formatted hex string in the form #RRGGBB or #RRGGBBAA into a color.
public NSColorFromHexString ( string hexValue ) : NSColor
hexValue string The web formatted hex string in the form #RRGGBB or #RRGGBBAA.
Résultat NSColor

NSColorToHexString() public méthode

Converts the given color into a web style hex string in the form #RRBBGG or optionally #RRBBGGAA.
public NSColorToHexString ( NSColor color, bool withAlpha ) : string
color NSColor The NSColor to convert.
withAlpha bool If set to true with the alpha (transparency) of the color will be /// included.
Résultat string

SaveColor() public méthode

Saves the given color to the systwm-wide user defaults with the give keyword.
public SaveColor ( string key, NSColor color, bool sync ) : void
key string The user default key to assign the color to.
color NSColor The NSColor to save to the user defaults.
sync bool If set to true sync changes to preferences.
Résultat void