C# Class SourceWriter.ViewController

Defines the View Controller for a syntax highlighting text editor view.
Inheritance: NSViewController
显示文件 Open project: xamarin/mac-samples Class Usage Examples

Private Properties

Property Type Description
AssembleMenu void
ReleaseDesignerOutlets void

Public Methods

Method 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

Method Description
AssembleMenu ( NSMenu menu, List commands ) : void

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

ReleaseDesignerOutlets ( ) : void

Method Details

ConfigureEditor() public method

Configures the editor with the current user preferences.
public ConfigureEditor ( ) : void
return void

PopulateFormattingMenu() public method

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

PreviewContents() public method

Previews the current contents of the editor.
public PreviewContents ( ) : void
return void

PrintDocument() public method

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.
return void

ReformatText() public method

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.
return void

SetLanguageFromPath() public method

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

SetLanguageToCSharp() public method

Sets the language to C sharp.
public SetLanguageToCSharp ( ) : void
return void

SetLanguageToHTML() public method

Sets the language to HTML.
public SetLanguageToHTML ( ) : void
return void

SetLanguageToMarkDown() public method

Sets the language to MarkDown.
public SetLanguageToMarkDown ( ) : void
return void

SetLanguageToXML() public method

Sets the language to XML.
public SetLanguageToXML ( ) : void
return void

UnpopulateFormattingMenu() public method

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

ViewController() public method

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

ViewDidAppear() public method

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

ViewDidLoad() public method

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

ViewWillAppear() public method

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
return void

ViewWillDisappear() public method

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
return void