// CodeGear C++Builder
// Copyright (c) 1995, 2021 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ZylVscEditor.pas' rev: 34.00 (Windows)

#ifndef ZylvsceditorHPP
#define ZylvsceditorHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.Classes.hpp>
#include <System.Win.Registry.hpp>
#include <Winapi.Windows.hpp>
#include <System.IniFiles.hpp>
#include <Vcl.Graphics.hpp>
#include <System.Contnrs.hpp>
#include <System.Math.hpp>
#include <System.SyncObjs.hpp>
#include <SHDocVw.hpp>
#include <Winapi.ShellAPI.hpp>
#include <Winapi.ShlObj.hpp>
#include <MSHTML.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.Dialogs.hpp>
#include <Winapi.ActiveX.hpp>
#include <System.DateUtils.hpp>
#include <Vcl.Imaging.jpeg.hpp>
#include <Vcl.Controls.hpp>
#include <System.SysUtils.hpp>
#include <System.IOUtils.hpp>
#include <System.UITypes.hpp>
#include <WebView2.hpp>
#include <Vcl.Edge.hpp>

//-- user supplied -----------------------------------------------------------

namespace Zylvsceditor
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TZylVscEditor;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TEditorMode : unsigned char { emEditor, emCompare };

typedef void __fastcall (__closure *TEditorContentChangeEvent)(System::TObject* Sender, System::UnicodeString content);

typedef void __fastcall (__closure *TEditorLanguageChangeEvent)(System::TObject* Sender, System::UnicodeString oldLanguage);

typedef void __fastcall (__closure *TEditorMouseEvent)(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);

typedef void __fastcall (__closure *TEditorKeyEvent)(System::TObject* Sender, System::Word Key, System::Classes::TShiftState Shift);

class PASCALIMPLEMENTATION TZylVscEditor : public Vcl::Edge::TEdgeBrowser
{
	typedef Vcl::Edge::TEdgeBrowser inherited;
	
private:
	System::UnicodeString fContent;
	System::UnicodeString fSelectedContent;
	System::UnicodeString fOriginalContent;
	System::UnicodeString fFileName;
	System::UnicodeString fOriginalFileName;
	TEditorMode fMode;
	bool fInlineCompare;
	System::UnicodeString fLanguage;
	System::UnicodeString fTheme;
	System::UnicodeString fIndexPathEditor;
	System::AnsiString FLockKey;
	System::AnsiString FUnlockKey;
	double FVersion;
	TEditorContentChangeEvent FOnEditorContentChange;
	TEditorLanguageChangeEvent FOnEditorLanguageChange;
	TEditorMouseEvent FOnEditorMouseUp;
	TEditorMouseEvent FOnEditorMouseDown;
	TEditorMouseEvent FOnEditorMouseMove;
	TEditorKeyEvent FOnEditorKeyUp;
	TEditorKeyEvent FOnEditorKeyDown;
	void __fastcall SetContent(const System::UnicodeString Value);
	void __fastcall SetEditorContent(const System::UnicodeString Value);
	void __fastcall SetCompareEditorContent(const System::UnicodeString Value);
	void __fastcall SetMode(const TEditorMode Value);
	void __fastcall SetEditorMode();
	void __fastcall SetCompareEditorMode();
	void __fastcall SetTheme(const System::UnicodeString value);
	System::UnicodeString __fastcall CutFileName(System::UnicodeString path);
	System::UnicodeString __fastcall JavaScriptStringEncode(System::UnicodeString s);
	System::UnicodeString __fastcall JavaScriptStringDecode(System::UnicodeString s);
	void __fastcall SetInlineCompare(const bool Value);
	void __fastcall SetEditorEvents();
	void __fastcall SetCompareEditorEvents();
	void __fastcall WebMessageReceived(Vcl::Edge::TCustomEdgeBrowser* Sender, Vcl::Edge::TWebMessageReceivedEventArgs* Args);
	void __fastcall EditorExecuteScript(Vcl::Edge::TCustomEdgeBrowser* Sender, HRESULT AResult, const System::UnicodeString AResultObjectAsJson);
	System::UnicodeString __fastcall SafeCopy(const System::UnicodeString strText, int nStart, int nLength, const System::UnicodeString DefaultValue);
	System::UnicodeString __fastcall GetSpecialFolderPath(int CSIDL);
	bool __fastcall RunningInTheIDE();
	int __fastcall GetChecksum(const System::AnsiString str);
	System::AnsiString __fastcall DecryptString(const System::AnsiString str);
	bool __fastcall IsRegistered();
	void __fastcall CheckRegistered();
	
public:
	__property System::UnicodeString Content = {read=fContent, write=SetContent};
	__property System::UnicodeString OriginalContent = {read=fOriginalContent, write=fOriginalContent};
	__property System::UnicodeString ModifiedContent = {read=fContent, write=fContent};
	__property System::UnicodeString SelectedContent = {read=fSelectedContent};
	__property System::AnsiString UnlockKey = {read=FUnlockKey, write=FUnlockKey};
	__property double Version = {read=FVersion};
	__fastcall virtual TZylVscEditor(System::Classes::TComponent* aOwner);
	virtual void __fastcall AfterConstruction();
	__fastcall virtual ~TZylVscEditor();
	bool __fastcall OpenFile(System::UnicodeString strFileName);
	void __fastcall CloseFile();
	void __fastcall NewFile(System::UnicodeString strLanguage = System::UnicodeString());
	bool __fastcall SaveFile(System::UnicodeString strFileName)/* overload */;
	bool __fastcall SaveFile()/* overload */;
	bool __fastcall CompareFile(System::UnicodeString strOriginalFileName);
	void __fastcall SetReadOnly(bool readOnly = true);
	
__published:
	__property System::UnicodeString FileName = {read=fFileName, write=fFileName};
	__property System::UnicodeString OriginalFileName = {read=fOriginalFileName, write=fOriginalFileName};
	__property TEditorMode Mode = {read=fMode, write=SetMode, nodefault};
	__property bool InlineCompare = {read=fInlineCompare, write=SetInlineCompare, default=0};
	__property System::UnicodeString Language = {read=fLanguage, write=fLanguage};
	__property System::UnicodeString Theme = {read=fTheme, write=SetTheme};
	__property TEditorContentChangeEvent OnEditorContentChange = {read=FOnEditorContentChange, write=FOnEditorContentChange};
	__property TEditorLanguageChangeEvent OnEditorLanguageChange = {read=FOnEditorLanguageChange, write=FOnEditorLanguageChange};
	__property TEditorMouseEvent OnEditorMouseUp = {read=FOnEditorMouseUp, write=FOnEditorMouseUp};
	__property TEditorMouseEvent OnEditorMouseMove = {read=FOnEditorMouseMove, write=FOnEditorMouseMove};
	__property TEditorMouseEvent OnEditorMouseDown = {read=FOnEditorMouseDown, write=FOnEditorMouseDown};
	__property TEditorKeyEvent OnEditorKeyUp = {read=FOnEditorKeyUp, write=FOnEditorKeyUp};
	__property TEditorKeyEvent OnEditorKeyDown = {read=FOnEditorKeyDown, write=FOnEditorKeyDown};
public:
	/* TWinControl.CreateParented */ inline __fastcall TZylVscEditor(HWND ParentWindow) : Vcl::Edge::TEdgeBrowser(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE void __fastcall Register();
}	/* namespace Zylvsceditor */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ZYLVSCEDITOR)
using namespace Zylvsceditor;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// ZylvsceditorHPP
