C# Class SourceWriter.ViewController

Defines the View Controller for a syntax highlighting text editor view.
Inheritance: NSViewController
Afficher le fichier Open project: xamarin/mac-samples Class Usage Examples

Private Properties

Свойство Type Description
AssembleMenu void
ReleaseDesignerOutlets void

Méthodes publiques

Méthode Description
ConfigureEditor ( ) : void

Configures the editor with the current user preferences.

PopulateFormattingMenu ( ) : void

Populates the formatting menu with any additional commands defined in the language.

PreviewContents ( ) : void

Previews the current contents of the editor.

PrintDocument ( NSPrintInfo info ) : void

Prints the document that is currently being edited.

ReformatText ( bool updateLanguage ) : void

Re-run syntax highlighting for the entire text of the document.

SetLanguageFromPath ( string path ) : void

Attempts to set the syntax highlighting language based on the extension of the file being opened.

SetLanguageToCSharp ( ) : void

Sets the language to C sharp.

SetLanguageToHTML ( ) : void

Sets the language to HTML.

SetLanguageToMarkDown ( ) : void

Sets the language to MarkDown.

SetLanguageToXML ( ) : void

Sets the language to XML.

UnpopulateFormattingMenu ( ) : void

Unpopulates the formatting menu with the previous languages extra formatting commands.

ViewController ( IntPtr handle ) : System

Initializes a new instance of the SourceWriter.ViewController class.

ViewDidAppear ( ) : void

This method is called after the View being handled by this View Controller has been displayed on screen.

ViewDidLoad ( ) : void

This method is called once the view controller has been inflated from the Storyboard file.

ViewWillAppear ( ) : void

This method is called just before the View being handled by this View Controller will be displayed so you can do any preperation first.

ViewWillDisappear ( ) : void

This method is called before the view being handled by this View Controller is removed from the screen to allow you to do any last minute clean-up.

Private Methods

Méthode Description
AssembleMenu ( NSMenu menu, List commands ) : void

Recursively build a menu from the set of Language Format Commands.

ReleaseDesignerOutlets ( ) : void

Method Details

ConfigureEditor() public méthode

Configures the editor with the current user preferences.
public ConfigureEditor ( ) : void
Résultat void

PopulateFormattingMenu() public méthode

Populates the formatting menu with any additional commands defined in the language.
public PopulateFormattingMenu ( ) : void
Résultat void

PreviewContents() public méthode

Previews the current contents of the editor.
public PreviewContents ( ) : void
Résultat void

PrintDocument() public méthode

Prints the document that is currently being edited.
public PrintDocument ( NSPrintInfo info ) : void
info NSPrintInfo A NSPrintInfo object defining the page layout to use /// while printing.
Résultat void

ReformatText() public méthode

Re-run syntax highlighting for the entire text of the document.
public ReformatText ( bool updateLanguage ) : void
updateLanguage bool If set to true, the language descriptor will be reloaded as well.
Résultat void

SetLanguageFromPath() public méthode

Attempts to set the syntax highlighting language based on the extension of the file being opened.
public SetLanguageFromPath ( string path ) : void
path string Path.
Résultat void

SetLanguageToCSharp() public méthode

Sets the language to C sharp.
public SetLanguageToCSharp ( ) : void
Résultat void

SetLanguageToHTML() public méthode

Sets the language to HTML.
public SetLanguageToHTML ( ) : void
Résultat void

SetLanguageToMarkDown() public méthode

Sets the language to MarkDown.
public SetLanguageToMarkDown ( ) : void
Résultat void

SetLanguageToXML() public méthode

Sets the language to XML.
public SetLanguageToXML ( ) : void
Résultat void

UnpopulateFormattingMenu() public méthode

Unpopulates the formatting menu with the previous languages extra formatting commands.
public UnpopulateFormattingMenu ( ) : void
Résultat void

ViewController() public méthode

Initializes a new instance of the SourceWriter.ViewController class.
public ViewController ( IntPtr handle ) : System
handle System.IntPtr Handle.
Résultat System

ViewDidAppear() public méthode

This method is called after the View being handled by this View Controller has been displayed on screen.
public ViewDidAppear ( ) : void
Résultat void

ViewDidLoad() public méthode

This method is called once the view controller has been inflated from the Storyboard file.
public ViewDidLoad ( ) : void
Résultat void

ViewWillAppear() public méthode

This method is called just before the View being handled by this View Controller will be displayed so you can do any preperation first.
public ViewWillAppear ( ) : void
Résultat void

ViewWillDisappear() public méthode

This method is called before the view being handled by this View Controller is removed from the screen to allow you to do any last minute clean-up.
public ViewWillDisappear ( ) : void
Résultat void