ZylVscEditor

Class TZylVscEditor

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type TZylVscEditor = class(TEdgeBrowser)

Description

TZylVscEditor is a component to integrate Visual Studio Code IDE in your application.

Hierarchy

Overview

Methods

Public constructor Create(aOwner: TComponent); override;
Public procedure AfterConstruction(); override;
Public destructor Destroy(); override;
Public function OpenFile(strFileName: string): boolean;
Public procedure CloseFile();
Public procedure NewFile(strLanguage: string = '');
Public function SaveFile(strFileName: string): boolean; overload;
Public function SaveFile(): boolean; overload;
Public function CompareFile(strOriginalFileName: string): boolean;
Public procedure SetReadOnly(readOnly: Boolean = true);

Properties

Public property Content: string read fContent write SetContent;
Public property OriginalContent: string read fOriginalContent write fOriginalContent;
Public property ModifiedContent: string read fContent write fContent;
Public property SelectedContent: string read fSelectedContent;
Public property UnlockKey: AnsiString read FUnlockKey write FUnlockKey;
Public property Version: Double read FVersion;
Published property FileName: string read fFileName write fFileName;
Published property OriginalFileName: string read fOriginalFileName write fOriginalFileName;
Published property Mode: TEditorMode read fMode write SetMode;
Published property InlineCompare: boolean read fInlineCompare write SetInlineCompare default false;
Published property Language: string read fLanguage write fLanguage;
Published property Theme: string read fTheme write SetTheme;
Published property OnEditorContentChange: TEditorContentChangeEvent read FOnEditorContentChange write FOnEditorContentChange;
Published property OnEditorLanguageChange: TEditorLanguageChangeEvent read FOnEditorLanguageChange write FOnEditorLanguageChange;
Published property OnEditorMouseUp: TEditorMouseEvent read FOnEditorMouseUp write FOnEditorMouseUp;
Published property OnEditorMouseMove: TEditorMouseEvent read FOnEditorMouseMove write FOnEditorMouseMove;
Published property OnEditorMouseDown: TEditorMouseEvent read FOnEditorMouseDown write FOnEditorMouseDown;
Published property OnEditorKeyUp: TEditorKeyEvent read FOnEditorKeyUp write FOnEditorKeyUp;
Published property OnEditorKeyDown: TEditorKeyEvent read FOnEditorKeyDown write FOnEditorKeyDown;

Description

Methods

Public constructor Create(aOwner: TComponent); override;

Constructor.

Public procedure AfterConstruction(); override;

After construction event.

Public destructor Destroy(); override;

Destructor.

Public function OpenFile(strFileName: string): boolean;

Open file in the editor.

Parameters
strFileName
Name of the file.
Returns

true, if succeeded.

Public procedure CloseFile();

Close the file from the editor.

Public procedure NewFile(strLanguage: string = '');

Close the file from the editor to edit a new one.

Parameters
strLanguage
Programming language of the new file.
Public function SaveFile(strFileName: string): boolean; overload;

Save the file.

Parameters
strFileName
Name of the file.
Returns

true, if succeeded.

Public function SaveFile(): boolean; overload;

Save the file from the editor.

Returns

true, if succeeded.

Public function CompareFile(strOriginalFileName: string): boolean;

Compare the current file with another file.

Parameters
strOriginalFileName
Another file path.
Returns

true, if succeeded.

Public procedure SetReadOnly(readOnly: Boolean = true);

Set editor read-only.

Parameters
readOnly
Read-only if true.

Properties

Public property Content: string read fContent write SetContent;

Content of the editor.

Public property OriginalContent: string read fOriginalContent write fOriginalContent;

Original content of compare editor.

Public property ModifiedContent: string read fContent write fContent;

Modified content of compare editor. Same as Content.

Public property SelectedContent: string read fSelectedContent;

Selected content.

Public property UnlockKey: AnsiString read FUnlockKey write FUnlockKey;

Unlock key.

Public property Version: Double read FVersion;

Component version.

Published property FileName: string read fFileName write fFileName;

Path of the file to edit.

Published property OriginalFileName: string read fOriginalFileName write fOriginalFileName;

Path of the original file to compare with.

Published property Mode: TEditorMode read fMode write SetMode;

Editor mode. It can be simple editor or compare editor.

Published property InlineCompare: boolean read fInlineCompare write SetInlineCompare default false;

Inline compare.

Published property Language: string read fLanguage write fLanguage;

Programming language name.

Published property Theme: string read fTheme write SetTheme;

Name of the theme.

<example>vs-dark</example>

Published property OnEditorContentChange: TEditorContentChangeEvent read FOnEditorContentChange write FOnEditorContentChange;

Content change event.

Published property OnEditorLanguageChange: TEditorLanguageChangeEvent read FOnEditorLanguageChange write FOnEditorLanguageChange;

Language change event.

Published property OnEditorMouseUp: TEditorMouseEvent read FOnEditorMouseUp write FOnEditorMouseUp;

Mouse up event.

Published property OnEditorMouseMove: TEditorMouseEvent read FOnEditorMouseMove write FOnEditorMouseMove;

Mouse move event.

Published property OnEditorMouseDown: TEditorMouseEvent read FOnEditorMouseDown write FOnEditorMouseDown;

Mouse down event.

Published property OnEditorKeyUp: TEditorKeyEvent read FOnEditorKeyUp write FOnEditorKeyUp;

Key up event.

Published property OnEditorKeyDown: TEditorKeyEvent read FOnEditorKeyDown write FOnEditorKeyDown;

Key down event.

Copyright by Zyl Soft 2024
Generated by PasDoc 0.16.0.