C# Class SphereStudio.DocumentTab

Represents an open document in the IDE.
Inheritance: IDisposable
Afficher le fichier Open project: Radnen/spherestudio Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

Close() public méthode

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

Copy() public méthode

Sends a Copy command to the document view.
public Copy ( ) : void
Résultat void

Cut() public méthode

Sends a Cut command to the document view.
public Cut ( ) : void
Résultat void

Deactivate() public méthode

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

Dispose() public méthode

public Dispose ( ) : void
Résultat void

DocumentTab() public méthode

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.
Résultat System

Paste() public méthode

Sends a Paste command to the document view.
public Paste ( ) : void
Résultat void

PromptSave() public méthode

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

Redo() public méthode

Sends a Redo command to the document view.
public Redo ( ) : void
Résultat void

Restyle() public méthode

Notifies the document that a styling option changed.
public Restyle ( ) : void
Résultat void

Save() public méthode

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.
Résultat bool

SaveAs() public méthode

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.
Résultat bool

SaveIfDirty() public méthode

public SaveIfDirty ( ) : bool
Résultat bool

Undo() public méthode

Sends an Undo command to the document view.
public Undo ( ) : void
Résultat void

ZoomIn() public méthode

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

ZoomOut() public méthode

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