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

// (DO NOT EDIT: machine generated header) 'XSSIELogEditor.pas' rev: 28.00 (Windows)

#ifndef XssielogeditorHPP
#define XssielogeditorHPP

#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>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.Contnrs.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <Vcl.Clipbrd.hpp>	// Pascal unit
#include <Winapi.Windows.hpp>	// Pascal unit
#include <XLSUtils5.hpp>	// Pascal unit
#include <XSSIEDefs.hpp>	// Pascal unit
#include <XSSIEUtils.hpp>	// Pascal unit
#include <XSSIEDocProps.hpp>	// Pascal unit
#include <XSSIECharRun.hpp>	// Pascal unit
#include <XSSIELogParas.hpp>	// Pascal unit
#include <XSSIELogPhyPosition.hpp>	// Pascal unit
#include <XSSIEKeys.hpp>	// Pascal unit

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

namespace Xssielogeditor
{
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TAXWSelectionStatus : unsigned char { assNone, assUpdating };

enum DECLSPEC_DENUM TAXWPhyPosition : unsigned char { apsNone, apsTopRow, apsBottomRow, apsPageUp, apsPageDown };

class DELPHICLASS TAXWLogDocument;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TAXWLogDocument : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	bool __fastcall GetDirty(void);
	
protected:
	Xssielogparas::TAXWLogParas* FLogParas;
	Xssiedocprops::TAXWDOP* FDOP;
	Xssiedocprops::TAXWPAP* FMasterPAP;
	Xssiedocprops::TAXWCHP* FMasterCHP;
	Xssiedocprops::TAXWCHPX* FTempCHPX;
	Xssiedocprops::TAXWPAPX* FTempPAPX;
	virtual void __fastcall Paginate(void) = 0 ;
	virtual void __fastcall PaginateCaretPara(void) = 0 ;
	void __fastcall ClearDirty(void);
	
public:
	__fastcall TAXWLogDocument(void);
	__fastcall virtual ~TAXWLogDocument(void);
	virtual void __fastcall Clear(void);
	void __fastcall AppendTextSimple(const System::UnicodeString AText);
	void __fastcall AppendText(const System::UnicodeString AText)/* overload */;
	void __fastcall AppendText(const System::UnicodeString AText, Xssiedocprops::TAXWCHPX* CHPX)/* overload */;
	Xssielogparas::TAXWLogPara* __fastcall AppendPara(void)/* overload */;
	void __fastcall AppendPara(System::UnicodeString S)/* overload */;
	void __fastcall AppendPara(System::UnicodeString S, Xssiedocprops::TAXWPAPX* PAPX)/* overload */;
	void __fastcall AppendTextFmt(System::UnicodeString S);
	System::UnicodeString __fastcall PlainText(void);
	__property Xssielogparas::TAXWLogParas* Paras = {read=FLogParas};
	__property Xssiedocprops::TAXWDOP* DOP = {read=FDOP};
	__property Xssiedocprops::TAXWCHP* MasterCHP = {read=FMasterCHP};
	__property Xssiedocprops::TAXWPAP* MasterPAP = {read=FMasterPAP};
	__property Xssiedocprops::TAXWCHPX* TempCHPX = {read=FTempCHPX};
	__property Xssiedocprops::TAXWPAPX* TempPAPX = {read=FTempPAPX};
	__property bool Dirty = {read=GetDirty, nodefault};
};

#pragma pack(pop)

enum DECLSPEC_DENUM TAXWUndoRedoOp : unsigned char { uroInsertText, uroInsertPara, uroMove, uroDeleteText };

class DELPHICLASS TAXWUndoItem;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TAXWUndoItem : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	int FValue;
	System::UnicodeString FBuffer;
	TAXWUndoRedoOp FOperation;
	
public:
	__property System::UnicodeString Buffer = {read=FBuffer, write=FBuffer};
	__property TAXWUndoRedoOp Operation = {read=FOperation, write=FOperation, nodefault};
	__property int Value = {read=FValue, write=FValue, nodefault};
public:
	/* TObject.Create */ inline __fastcall TAXWUndoItem(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TAXWUndoItem(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TAXWUndo;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TAXWUndo : public System::Contnrs::TObjectStack
{
	typedef System::Contnrs::TObjectStack inherited;
	
public:
	__fastcall virtual ~TAXWUndo(void);
	void __fastcall AddInsert(System::UnicodeString Text);
	void __fastcall AddDelete(System::UnicodeString Text);
	void __fastcall AddMove(int Distance);
	HIDESBASE TAXWUndoItem* __fastcall Peek(void);
public:
	/* TOrderedList.Create */ inline __fastcall TAXWUndo(void) : System::Contnrs::TObjectStack() { }
	
};

#pragma pack(pop)

class DELPHICLASS TAXWSelections;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TAXWSelections : public Xssielogparas::TAXWLogSelections
{
	typedef Xssielogparas::TAXWLogSelections inherited;
	
private:
	Xssielogparas::TAXWLogPosition* __fastcall GetFirstPos(void);
	Xssielogparas::TAXWLogPosition* __fastcall GetLastPos(void);
	
protected:
	Xssielogparas::TAXWLogPosition* FAnchor;
	Xssielogparas::TAXWLogPosition* FCaretPos;
	Xssielogparas::TAXWLogPosition* FTempPos1;
	Xssielogparas::TAXWLogPosition* FTempPos2;
	TAXWSelectionStatus FStatus;
	int FSavedParaIndex;
	int FSavedCharPos;
	bool FSavedCharPosIsEOP;
	Xssielogparas::TAXWLogPara* FIteratePara;
	Xssiecharrun::TAXWCharRun* FIterateCR;
	Xssiecharrun::TAXWCharRun* FIterateCREnd;
	void __fastcall Normalize(void);
	void __fastcall BeginIterateCR(void);
	bool __fastcall NextCR(void);
	__property Xssiecharrun::TAXWCharRun* IterateCR = {read=FIterateCR, write=FIterateCR};
	
public:
	__fastcall TAXWSelections(Xssielogparas::TAXWLogPosition* Caret);
	__fastcall virtual ~TAXWSelections(void);
	virtual void __fastcall Reset(void);
	bool __fastcall HasSelection(void);
	bool __fastcall IsEntireDoc(void);
	bool __fastcall IsZeroLen(void);
	void __fastcall PushCaretPos(void);
	void __fastcall PushFirstPos(void);
	void __fastcall PopCaretPos(Xssielogparas::TAXWLogParas* Paras);
	void __fastcall DropAnchor(void);
	void __fastcall Update(void);
	void __fastcall SetToCaret(void);
	void __fastcall CopyToTemp(void);
	__property TAXWSelectionStatus Status = {read=FStatus, nodefault};
	__property Xssielogparas::TAXWLogPosition* Anchor = {read=FAnchor};
	__property Xssielogparas::TAXWLogPosition* FirstPos = {read=GetFirstPos};
	__property Xssielogparas::TAXWLogPosition* LastPos = {read=GetLastPos};
	__property Xssielogparas::TAXWLogPosition* TempPos1 = {read=FTempPos1};
	__property Xssielogparas::TAXWLogPosition* TempPos2 = {read=FTempPos2};
};

#pragma pack(pop)

class DELPHICLASS TAXWLogDocEditor;
class PASCALIMPLEMENTATION TAXWLogDocEditor : public TAXWLogDocument
{
	typedef TAXWLogDocument inherited;
	
protected:
	Xssielogphyposition::TAXWEventLogPhyPosition* FCaretPos;
	TAXWSelections* FSelections;
	TAXWUndo* FUndo;
	bool FRepaint;
	System::Classes::TNotifyEvent FCaretPosEvent;
	void __fastcall DoMoveCaret(Xssiekeys::TAXWCommand Cmd)/* overload */;
	void __fastcall ClearSelection(void);
	void __fastcall ClearCHPFormatting(void);
	virtual Xssielogphyposition::TAXWLogPhyPosition* __fastcall GetPhyPosition(const TAXWPhyPosition APosition);
	
public:
	__fastcall TAXWLogDocEditor(void);
	__fastcall virtual ~TAXWLogDocEditor(void);
	void __fastcall ClearData(void);
	void __fastcall SetEmpty(void);
	bool __fastcall IsEmpty(void);
	void __fastcall BeginUpdate(void);
	void __fastcall EndUpdate(void);
	void __fastcall AddPara(void);
	void __fastcall InsertText(System::UnicodeString S, bool InCRLeft = false);
	void __fastcall InsertPara(System::UnicodeString S);
	void __fastcall CmdControl(Xssiekeys::TAXWCommand Cmd);
	void __fastcall CmdMove(Xssiekeys::TAXWCommand Cmd);
	void __fastcall CmdClipboard(Xssiekeys::TAXWCommand Cmd);
	void __fastcall CmdSelect(Xssiekeys::TAXWCommand Cmd);
	void __fastcall CmdDelete(Xssiekeys::TAXWCommand Cmd);
	void __fastcall CmdFormat(Xssiekeys::TAXWCommand Cmd);
	void __fastcall Undo(void);
	void __fastcall ReadTextFile(System::UnicodeString Filename);
	void __fastcall ReadTextStream(System::Classes::TStream* Stream);
	void __fastcall UpdateSelection(Xssiekeys::TAXWCommand Direction);
	void __fastcall FormatRange(Xssiedocprops::TAXWCHPX* List, Xssielogparas::TAXWLogPosition* LPP1, Xssielogparas::TAXWLogPosition* LPP2);
	__property Xssielogphyposition::TAXWEventLogPhyPosition* CaretPos = {read=FCaretPos};
	__property TAXWSelections* Selections = {read=FSelections};
	__property System::Classes::TNotifyEvent OnCaretPos = {read=FCaretPosEvent, write=FCaretPosEvent};
};


//-- var, const, procedure ---------------------------------------------------
}	/* namespace Xssielogeditor */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_XSSIELOGEDITOR)
using namespace Xssielogeditor;
#endif
#pragma pack(pop)
#pragma option pop

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