C# Class SphereStudio.DocumentTab

Represents an open document in the IDE.
Inheritance: IDisposable
Exibir arquivo Open project: Radnen/spherestudio Class Usage Examples

Public Methods

Method Description
Activate ( ) : void

Makes the tab active and notifies the underlying document that it has received focus.

Close ( bool forceClose = false ) : bool

Closes the tab.

Copy ( ) : void

Sends a Copy command to the document view.

Cut ( ) : void

Sends a Cut command to the document view.

Deactivate ( ) : void

Notifies the underlying document that it has lost focus.

Dispose ( ) : void
DocumentTab ( MainWindow ide, DocumentView view, string fileName = null, bool restoreView = false ) : System

Creates a new Sphere Studio document tab.

Paste ( ) : void

Sends a Paste command to the document view.

PromptSave ( ) : bool

Prompts the user to save a modified document. The document will remain open afterwards.

Redo ( ) : void

Sends a Redo command to the document view.

Restyle ( ) : void

Notifies the document that a styling option changed.

Save ( string path = null ) : bool

Saves the document in this tab. If the document hasn't been saved yet, the user will be asked to provide a filename.

SaveAs ( string path = null ) : bool

Saves the document in this tab with a filename provided by the user.

SaveIfDirty ( ) : bool
Undo ( ) : void

Sends an Undo command to the document view.

ZoomIn ( ) : void

Sends a Zoom In command to the document view.

ZoomOut ( ) : void

Sends a Zoom Out command to the document view.

Private Methods

Method Description
SaveViewState ( ) : void
UpdateTabText ( ) : void
on_BreakpointSet ( object sender, BreakpointChangedEventArgs e ) : void
on_DirtyChanged ( object sender, EventArgs e ) : void
on_FormClosed ( object sender, System.Windows.Forms.FormClosedEventArgs e ) : void
on_FormClosing ( object sender, FormClosingEventArgs e ) : void

Method Details

Activate() public method

Makes the tab active and notifies the underlying document that it has received focus.
public Activate ( ) : void
return void

Close() public method

Closes the tab.
public Close ( bool forceClose = false ) : bool
forceClose bool 'true' to bypass the Unsaved Changes prompt.
return bool

Copy() public method

Sends a Copy command to the document view.
public Copy ( ) : void
return void

Cut() public method

Sends a Cut command to the document view.
public Cut ( ) : void
return void

Deactivate() public method

Notifies the underlying document that it has lost focus.
public Deactivate ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

DocumentTab() public method

Creates a new Sphere Studio document tab.
public DocumentTab ( MainWindow ide, DocumentView view, string fileName = null, bool restoreView = false ) : System
ide MainWindow The IDE form that the tab will be created in.
view Sphere.Plugins.Views.DocumentView The IDocumentView the tab is hosting.
fileName string The fully-qualified filename of the document, or null if untitled.
restoreView bool 'true' to restore the last saved view state. Has no effect on untitled tabs.
return System

Paste() public method

Sends a Paste command to the document view.
public Paste ( ) : void
return void

PromptSave() public method

Prompts the user to save a modified document. The document will remain open afterwards.
public PromptSave ( ) : bool
return bool

Redo() public method

Sends a Redo command to the document view.
public Redo ( ) : void
return void

Restyle() public method

Notifies the document that a styling option changed.
public Restyle ( ) : void
return void

Save() public method

Saves the document in this tab. If the document hasn't been saved yet, the user will be asked to provide a filename.
public Save ( string path = null ) : bool
path string The default directory for the Save As dialog.
return bool

SaveAs() public method

Saves the document in this tab with a filename provided by the user.
public SaveAs ( string path = null ) : bool
path string The default directory for the Save As dialog.
return bool

SaveIfDirty() public method

public SaveIfDirty ( ) : bool
return bool

Undo() public method

Sends an Undo command to the document view.
public Undo ( ) : void
return void

ZoomIn() public method

Sends a Zoom In command to the document view.
public ZoomIn ( ) : void
return void

ZoomOut() public method

Sends a Zoom Out command to the document view.
public ZoomOut ( ) : void
return void