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

// (DO NOT EDIT: machine generated header) 'FMX.TMSRTFEngine.pas' rev: 27.00 (Windows)

#ifndef Fmx_TmsrtfengineHPP
#define Fmx_TmsrtfengineHPP

#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 <Winapi.Windows.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.Character.hpp>	// Pascal unit
#include <System.UITypes.hpp>	// Pascal unit
#include <FMX.Objects.hpp>	// Pascal unit
#include <FMX.Types.hpp>	// Pascal unit
#include <System.Types.hpp>	// Pascal unit
#include <System.UIConsts.hpp>	// Pascal unit
#include <FMX.Styles.hpp>	// Pascal unit
#include <FMX.TMSBaseControl.hpp>	// Pascal unit
#include <FMX.Graphics.hpp>	// Pascal unit

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

namespace Fmx
{
namespace Tmsrtfengine
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TFontItem;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TFontItem : public System::Classes::TCollectionItem
{
	typedef System::Classes::TCollectionItem inherited;
	
private:
	System::UnicodeString FFaceName;
	void __fastcall SetFaceName(const System::UnicodeString Value);
	System::UnicodeString __fastcall GetCode(void);
	
public:
	__fastcall virtual TFontItem(System::Classes::TCollection* Collection);
	__fastcall virtual ~TFontItem(void);
	System::UnicodeString __fastcall GetText(void);
	
__published:
	__property System::UnicodeString FaceName = {read=FFaceName, write=SetFaceName};
	__property System::UnicodeString Code = {read=GetCode};
};

#pragma pack(pop)

class DELPHICLASS TFontCollection;
class PASCALIMPLEMENTATION TFontCollection : public Fmx::Tmsbasecontrol::TTMSFMXBaseCollection
{
	typedef Fmx::Tmsbasecontrol::TTMSFMXBaseCollection inherited;
	
public:
	TFontItem* operator[](int Index) { return Items[Index]; }
	
private:
	System::Classes::TNotifyEvent FOnChange;
	HIDESBASE TFontItem* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TFontItem* const Value);
	
public:
	__fastcall TFontCollection(System::Classes::TComponent* AOwner);
	__property TFontItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
	HIDESBASE TFontItem* __fastcall Add(void);
	HIDESBASE TFontItem* __fastcall Insert(int Index);
	int __fastcall IndexOf(System::UnicodeString FaceName);
	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
public:
	/* TCollection.Destroy */ inline __fastcall virtual ~TFontCollection(void) { }
	
};


class DELPHICLASS TFontTable;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TFontTable : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	TFontCollection* FFonts;
	
public:
	__fastcall TFontTable(void);
	__fastcall virtual ~TFontTable(void);
	System::UnicodeString __fastcall AddFont(Fmx::Graphics::TFont* AFont)/* overload */;
	System::UnicodeString __fastcall AddFont(System::Uitypes::TFontName AFaceName)/* overload */;
	System::UnicodeString __fastcall GetText(void);
	int __fastcall IndexOf(System::UnicodeString FaceName);
	void __fastcall LoadFonts(System::UnicodeString RTFString);
	__property TFontCollection* Fonts = {read=FFonts};
};

#pragma pack(pop)

class DELPHICLASS TColorTable;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TColorTable : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::Classes::TStringList* FColorList;
	
public:
	__fastcall TColorTable(void);
	__fastcall virtual ~TColorTable(void);
	int __fastcall AddColor(System::Uitypes::TAlphaColor Clr);
	System::UnicodeString __fastcall GetText(void);
	void __fastcall LoadColors(System::UnicodeString RTFString);
	__property System::Classes::TStringList* Colors = {read=FColorList};
};

#pragma pack(pop)

class DELPHICLASS TRTFHeader;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRTFHeader : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	TFontTable* FFontTable;
	TColorTable* FColorTable;
	int FViewKind;
	
public:
	__fastcall TRTFHeader(void);
	__fastcall virtual ~TRTFHeader(void);
	System::UnicodeString __fastcall GetText(void);
	__property TFontTable* FontTable = {read=FFontTable};
	__property TColorTable* ColorTable = {read=FColorTable};
};

#pragma pack(pop)

class DELPHICLASS TCustomImageList;
class PASCALIMPLEMENTATION TCustomImageList : public Fmx::Types::TFmxObject
{
	typedef Fmx::Types::TFmxObject inherited;
	
public:
	/* TFmxObject.Create */ inline __fastcall virtual TCustomImageList(System::Classes::TComponent* AOwner) : Fmx::Types::TFmxObject(AOwner) { }
	/* TFmxObject.Destroy */ inline __fastcall virtual ~TCustomImageList(void) { }
	
};


class DELPHICLASS TRTFEngine;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TRTFEngine : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	TRTFHeader* FRTFHeader;
	bool FNewLine;
	bool FIsPreviouseKW;
	Fmx::Graphics::TFont* FFont;
	System::UnicodeString FText;
	bool FStartTable;
	int FTableWidth;
	bool FStartRow;
	bool FBold;
	bool FItalic;
	bool FUnderLine;
	Fmx::Types::TTextAlign FHAlignment;
	int FFontSize;
	System::Uitypes::TAlphaColor FForeColor;
	bool FStrikeOut;
	bool FStartBullet;
	int FBulletChar;
	System::UnicodeString FBulletFont;
	System::Classes::TAlignment FTableAlignment;
	int FCurrentCol;
	int FTotalCol;
	System::Classes::TStringList* FColColorList;
	System::Uitypes::TAlphaColor FHighLightColor;
	bool FWithBorders;
	System::UnicodeString __fastcall ReplaceCR(System::UnicodeString s, bool dobreak);
	
protected:
	bool __fastcall RefreshPara(System::UnicodeString S, int KWCode);
	void __fastcall AddInternal(System::UnicodeString S, int KWCode = 0x0);
	
public:
	__fastcall TRTFEngine(void);
	__fastcall virtual ~TRTFEngine(void);
	void __fastcall AddFont(Fmx::Graphics::TFont* AFont);
	void __fastcall AddFontName(System::Uitypes::TFontName FontName);
	void __fastcall AddBold(bool Value);
	void __fastcall AddItalic(bool Value);
	void __fastcall AddUnderLine(bool Value);
	void __fastcall AddStrikeOut(bool Value);
	void __fastcall AddFontSize(int Value);
	void __fastcall AddText(System::UnicodeString T);
	void __fastcall AddNewLine(void);
	void __fastcall AddTab(void);
	void __fastcall AddParagraph(int LeftInd = 0x2d0, int RightInd = 0x0);
	void __fastcall AddForeColor(System::Uitypes::TAlphaColor Clr);
	void __fastcall AddHighLightColor(System::Uitypes::TAlphaColor Clr);
	void __fastcall AddBackGroundColor(System::Uitypes::TAlphaColor Clr);
	void __fastcall AddHAlignment(Fmx::Types::TTextAlign Align);
	void __fastcall AddPageBreak(void);
	void __fastcall AddHTML(System::UnicodeString S);
	void __fastcall AddRTF(System::UnicodeString S);
	void __fastcall AddHyperLink(System::UnicodeString Link, System::UnicodeString Text, Fmx::Graphics::TFont* AFont);
	System::UnicodeString __fastcall AddBitmap(Fmx::Graphics::TBitmap* ABmp, System::Uitypes::TAlphaColor Bkg = (System::Uitypes::TAlphaColor)(0xffffffff));
	void __fastcall AddSuperScript(void);
	void __fastcall AddSubScript(void);
	void __fastcall AddNormalScript(void);
	void __fastcall StartTable(System::Classes::TAlignment Align, bool WithBorders = true);
	void __fastcall EndTable(void);
	void __fastcall AddColumn(int ColWidth);
	void __fastcall StartRow(void);
	void __fastcall EndRow(void);
	void __fastcall AddRow(void);
	void __fastcall NextCell(void);
	void __fastcall ReDefColWidth(void);
	void __fastcall AddCellColor(System::Uitypes::TAlphaColor Clr);
	void __fastcall StartBullet(System::Uitypes::TFontName FontName = L"Symbol", int CharNo = 0x7);
	void __fastcall NextBullet(void);
	void __fastcall EndBullet(void);
	void __fastcall SaveToFile(System::UnicodeString FileName);
	System::UnicodeString __fastcall GetText(void);
	void __fastcall GetBuffer(System::UnicodeString &Buffer, System::UnicodeString &FontTable, System::UnicodeString &ColorTable);
	void __fastcall SaveToStream(System::Classes::TStream* st);
	__property bool Bold = {read=FBold, nodefault};
	__property bool Italic = {read=FItalic, nodefault};
	__property bool UnderLine = {read=FUnderLine, nodefault};
	__property bool StrikeOut = {read=FStrikeOut, nodefault};
	__property int FontSize = {read=FFontSize, nodefault};
	__property Fmx::Types::TTextAlign HAlignment = {read=FHAlignment, nodefault};
	__property System::Uitypes::TAlphaColor ForeColor = {read=FForeColor, nodefault};
	__property System::Uitypes::TAlphaColor HighLightColor = {read=FHighLightColor, nodefault};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE void __fastcall HTMLToRTF(System::UnicodeString s, Fmx::Graphics::TFont* DefFont, TRTFEngine* RTFEngine);
extern DELPHI_PACKAGE System::UnicodeString __fastcall ColorToString(System::Uitypes::TAlphaColor Color);
extern DELPHI_PACKAGE System::UnicodeString __fastcall RTFHeader(void);
}	/* namespace Tmsrtfengine */
}	/* namespace Fmx */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX_TMSRTFENGINE)
using namespace Fmx::Tmsrtfengine;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMX)
using namespace Fmx;
#endif
#pragma pack(pop)
#pragma option pop

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