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

// (DO NOT EDIT: machine generated header) 'MSWRI.pas' rev: 37.00 (Windows)

#ifndef MSWRIHPP
#define MSWRIHPP

#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include <MSWBase.hpp>
#include <Winapi.Windows.hpp>
#include <System.Types.hpp>
#include <System.UITypes.hpp>

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

namespace Mswri
{
//-- forward type declarations -----------------------------------------------
struct TWRIHeader;
class DELPHICLASS TWRIFont;
class DELPHICLASS TWRIFontList;
class DELPHICLASS TWRIFile;
//-- type declarations -------------------------------------------------------
#pragma pack(push,1)
struct DECLSPEC_DRECORD TWRIHeader
{
public:
	System::Word wIdent;
	System::Word dty;
	System::Word wTool;
	System::Word Reserved1;
	System::Word Reserved2;
	System::Word Reserved3;
	System::Word Reserved4;
	unsigned fcMac;
	System::Word pnPara;
	System::Word pnFntb;
	System::Word pnSep;
	System::Word pnSetb;
	System::Word pnPgtb;
	System::StaticArray<System::Byte, 64> szSsht;
	System::Word pnMac;
};
#pragma pack(pop)


enum DECLSPEC_DENUM TWRIJustify : unsigned char { wjLeft, wjCenter, wjRight, wjJustify };

#pragma pack(push,4)
class PASCALIMPLEMENTATION TWRIFont : public System::TObject
{
	typedef System::TObject inherited;
	
public:
	System::Byte ID;
	System::AnsiString Name;
public:
	/* TObject.Create */ inline __fastcall TWRIFont() : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TWRIFont() { }
	
};

#pragma pack(pop)

#pragma pack(push,4)
class PASCALIMPLEMENTATION TWRIFontList : public System::Classes::TList
{
	typedef System::Classes::TList inherited;
	
public:
	/* TList.Destroy */ inline __fastcall virtual ~TWRIFontList() { }
	
public:
	/* TObject.Create */ inline __fastcall TWRIFontList() : System::Classes::TList() { }
	
};

#pragma pack(pop)

class PASCALIMPLEMENTATION TWRIFile : public Mswbase::TMSWBaseDocument
{
	typedef Mswbase::TMSWBaseDocument inherited;
	
private:
	TWRIHeader Header;
	TWRIFontList* FontTable;
	System::UnicodeString LastJustify;
	System::WideChar __fastcall ProcessSysCharacter(System::WideChar ch);
	
protected:
	virtual void __fastcall ClearInternalLists();
	void __fastcall ReadFontTable(System::Classes::TStream* Stream);
	void __fastcall ReadCharInfo(System::Classes::TStream* Stream, unsigned fcFirst2, unsigned fcLim2, System::AnsiString &strText, System::UnicodeString &strFormatted);
	void __fastcall ReadPicture(System::Classes::TStream* Stream, int APos, int ASize, System::AnsiString &strText);
	System::UnicodeString __fastcall ReadPAP(System::Classes::TStream* Stream, System::AnsiString &strText);
	
public:
	__fastcall virtual TWRIFile(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TWRIFile();
	virtual void __fastcall LoadFromStream(System::Classes::TStream* Stream);
	virtual void __fastcall LoadFromFile(const System::WideString AFileName);
};


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

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