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

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

#ifndef Xlsmask5HPP
#define Xlsmask5HPP

#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.SysUtils.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.Contnrs.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <Vcl.Graphics.hpp>	// Pascal unit
#include <XLSUtils5.hpp>	// Pascal unit
#include <System.UITypes.hpp>	// Pascal unit

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

namespace Xlsmask5
{
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TMaskEntity : unsigned char { meNone, meLitteral, meString, mePlace, meSpace, meZero, meYear2, meYear4, meMonthDig1, meMonthDig2, meMonthShort, meMonthName, meMonthChar, meDayDig1, meDayDig2, meDayShort, meDayName, meHourDig1, meHourDig2, meHourDig1AmPm, meHourDig2AmPm, meHourElapsed, meMinuteDig1, meMinuteDig2, meMinuteElapsed, meSecondDig1, meSecondDig2, meSecondElapsed, meStrAmPmUpp, meStrAmPmLow, meStrap, meDecimalPos, mePercentPos, meFirstDigitPlace, meRightIndent };

enum DECLSPEC_DENUM TMaskFlag : unsigned char { mfGeneral, mfThousand, mfDecimals, mfPercent, mfScientific, mfIsDateTime, mfZero };

typedef System::Set<TMaskFlag, TMaskFlag::mfGeneral, TMaskFlag::mfZero> TMaskFlags;

class DELPHICLASS TMaskData;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TMaskData : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	TMaskEntity FEntity;
	System::UnicodeString FValue;
	System::WideChar FC;
	System::UnicodeString FS;
	
public:
	__property TMaskEntity Entity = {read=FEntity, write=FEntity, nodefault};
	__property System::UnicodeString Value = {read=FValue, write=FValue};
	__property System::WideChar C = {read=FC, write=FC, nodefault};
	__property System::UnicodeString S = {read=FS, write=FS};
public:
	/* TObject.Create */ inline __fastcall TMaskData(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TMaskData(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TMaskDataList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TMaskDataList : public System::Contnrs::TObjectList
{
	typedef System::Contnrs::TObjectList inherited;
	
public:
	TMaskData* operator[](int Index) { return Items[Index]; }
	
private:
	TMaskData* __fastcall GetItems(int Index);
	
public:
	HIDESBASE TMaskData* __fastcall Add(void);
	HIDESBASE TMaskData* __fastcall Insert(int AIndex);
	__property TMaskData* Items[int Index] = {read=GetItems/*, default*/};
public:
	/* TObjectList.Create */ inline __fastcall TMaskDataList(void)/* overload */ : System::Contnrs::TObjectList() { }
	/* TObjectList.Create */ inline __fastcall TMaskDataList(bool AOwnsObjects)/* overload */ : System::Contnrs::TObjectList(AOwnsObjects) { }
	
public:
	/* TList.Destroy */ inline __fastcall virtual ~TMaskDataList(void) { }
	
};

#pragma pack(pop)

struct DECLSPEC_DRECORD TFormatData
{
public:
	TMaskDataList* Data;
	System::Uitypes::TColor Color;
	TMaskFlags Flags;
	int DataDecimalPos;
	int DecimalCount;
	int Div1000Cnt;
};


class DELPHICLASS TExcelMask;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TExcelMask : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::UnicodeString FMask;
	int FIndex;
	System::StaticArray<TFormatData, 4> Formats;
	System::Uitypes::TColor FColor;
	void __fastcall SetMask(System::UnicodeString Value);
	void __fastcall AddMask(int Index, const System::UnicodeString Value);
	void __fastcall ClearData(void);
	TMaskData* __fastcall AddEntity(int Index, TMaskEntity E);
	
protected:
	System::UnicodeString __fastcall FormatNumberDateTime(const TFormatData &FD, double Value);
	System::UnicodeString __fastcall FormatNumberNumber(const TFormatData &FD, double Value);
	
public:
	__fastcall virtual ~TExcelMask(void);
	System::UnicodeString __fastcall FormatNumber(double Value);
	System::Uitypes::TColor __fastcall ValueColor(double Value);
	bool __fastcall IsDateTime(void);
	__property System::UnicodeString Mask = {read=FMask, write=SetMask};
	__property int Index = {read=FIndex, write=FIndex, nodefault};
	__property System::Uitypes::TColor Color = {read=FColor, nodefault};
public:
	/* TObject.Create */ inline __fastcall TExcelMask(void) : System::TObject() { }
	
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE System::UnicodeString __fastcall XLSGetCurrencyFormat(System::UnicodeString DecStr, System::UnicodeString ThStr);
}	/* namespace Xlsmask5 */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_XLSMASK5)
using namespace Xlsmask5;
#endif
#pragma pack(pop)
#pragma option pop

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