flexutils.hpp

来自「FlexGraphics是一套创建矢量图形的VCL组件」· HPP 代码 · 共 611 行 · 第 1/2 页

HPP
611
字号
// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'FlexUtils.pas' rev: 5.00

#ifndef FlexUtilsHPP
#define FlexUtilsHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Consts.hpp>	// Pascal unit
#include <Clipbrd.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <TypInfo.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Flexutils
{
//-- type declarations -------------------------------------------------------
typedef AnsiString FlexUtils__1[7];

typedef AnsiString FlexUtils__2[2];

#pragma option push -b-
enum TFlexNotify { fnName, fnID, fnRect, fnAnchorPoints, fnEditPoints, fnLinkPoints, fnOrder, fnParent, 
	fnLoaded, fnLayers, fnSchemes, fnCreated, fnDestroyed, fnSelect, fnSelectPoint, fnScale, fnPan, fnChange 
	};
#pragma option pop

struct TTranslateInfo;
typedef TTranslateInfo *PTranslateInfo;

struct TTranslateInfo
{
	Windows::TPoint Center;
	int Rotate;
	bool Mirror;
} ;

#pragma option push -b-
enum TBitmapDisplay { bdCenter, bdTile, bdStretch };
#pragma option pop

struct TTiledBitmapCache;
typedef TTiledBitmapCache *PTiledBitmapCache;

struct TTiledBitmapCache
{
	HBITMAP Handle;
	int Width;
	int Height;
} ;

typedef DynamicArray<bool >  TBooleanArray;

#pragma option push -b-
enum TGradientStyle { gsHorizontal, gsVertical, gsSquare, gsElliptic, gsTopLeft, gsTopRight, gsBottomLeft, 
	gsBottomRight };
#pragma option pop

#pragma option push -b-
enum TFlexFilerProcess { ppUnknown, ppLoad, ppSave, ppCopy };
#pragma option pop

struct TFlexBinHeader;
typedef TFlexBinHeader *PFlexBinHeader;

#pragma pack(push, 1)
struct TFlexBinHeader
{
	Word Command;
	Word KeyCount;
	int Size;
} ;
#pragma pack(pop)

struct TFlexBinPropertyData;
typedef TFlexBinPropertyData *PFlexBinPropertyData;

#pragma pack(push, 1)
struct FlexUtils__4
{
	
} ;
#pragma pack(pop)

struct FlexUtils__3
{
	int StrCount;
	FlexUtils__4 StrData;
} ;

#pragma pack(push, 1)
struct FlexUtils__5
{
	
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TFlexBinPropertyData
{
	
	unsigned PropType;
	union
	{
		struct 
		{
			FlexUtils__5 VHexData;
			
		};
		struct 
		{
			FlexUtils__3 VStrings;
			
		};
		struct 
		{
			int VString;
			
		};
		struct 
		{
			__int64 VInt64;
			
		};
		struct 
		{
			unsigned VLongWord;
			
		};
		struct 
		{
			Word VWord;
			
		};
		struct 
		{
			Byte VByte;
			
		};
		struct 
		{
			Shortint VShortInt;
			
		};
		struct 
		{
			int VBoolean;
			
		};
		struct 
		{
			double VDate;
			
		};
		struct 
		{
			System::CurrencyBase VCurrency;
			
		};
		struct 
		{
			double VDouble;
			
		};
		struct 
		{
			float VSingle;
			
		};
		struct 
		{
			int VInteger;
			
		};
		struct 
		{
			short VSmallInt;
			
		};
		
	};
} ;
#pragma pack(pop)

struct TFlexBinReduceDicData;
typedef TFlexBinReduceDicData *PFlexBinReduceDicData;

#pragma pack(push, 1)
struct TFlexBinReduceDicData
{
	int DeleteCount;
} ;
#pragma pack(pop)

#pragma option push -b-
enum TFlexBinKeyStore { fbsObjectName, fbsClassName, fbsPropertyName, fbsPropertyValue };
#pragma option pop

typedef Set<TFlexBinKeyStore, fbsObjectName, fbsPropertyValue>  TFlexBinKeyStoreSet;

class DELPHICLASS TFlexBinaryData;
class DELPHICLASS TFlexFiler;
typedef void __fastcall (__closure *TFlexProgressEvent)(System::TObject* Sender, int Progress, TFlexFilerProcess 
	Process);

class PASCALIMPLEMENTATION TFlexFiler : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	Classes::TStream* FStream;
	void *FBuffer;
	int FBufSize;
	int FBufPos;
	int FBufEnd;
	int FTotal;
	int FSaved;
	int FLoaded;
	int FProgress;
	TFlexFilerProcess FLastProcess;
	bool FBinary;
	bool FCompleteBinary;
	TFlexBinaryData* FBinaryData;
	TFlexProgressEvent FOnProgress;
	void __fastcall SetSaved(const int Value);
	void __fastcall SetTotal(const int Value);
	void __fastcall SetBinary(const bool Value);
	
protected:
	void __fastcall ReadBuffer(void);
	void __fastcall DoProgress(TFlexFilerProcess Process);
	int __fastcall GetStreamSize(void);
	bool __fastcall ReadBufCheck(void * Buf, int BufSize);
	void __fastcall ReadBuf(void *Buf, int BufSize);
	bool __fastcall ReadSkipBuf(int BufSize);
	void __fastcall WriteBuf(const void *Buf, int BufSize);
	virtual void __fastcall ReadError(const AnsiString Msg);
	virtual void __fastcall WriteError(const AnsiString Msg);
	__property Classes::TStream* Stream = {read=FStream};
	
public:
	__fastcall TFlexFiler(Classes::TStream* AStream, bool ACompleteBinary);
	__fastcall virtual ~TFlexFiler(void);
	void __fastcall SaveStr(const AnsiString s);
	void __fastcall SaveBuf(void * Buf, int BufSize);
	AnsiString __fastcall LoadStr();
	bool __fastcall LoadStrCheck(/* out */ AnsiString &s);
	void __fastcall LoadSkipToEnd(void);
	bool __fastcall CheckLoadSkipToEnd(const AnsiString First);
	bool __fastcall IsEndOfStream(void);
	void __fastcall Rewind(void);
	__property bool Binary = {read=FBinary, write=SetBinary, nodefault};
	__property bool CompleteBinary = {read=FCompleteBinary, nodefault};
	__property TFlexBinaryData* BinaryData = {read=FBinaryData};
	__property int Total = {read=FTotal, write=SetTotal, nodefault};
	__property int Saved = {read=FSaved, write=SetSaved, nodefault};
	__property int Loaded = {read=FLoaded, nodefault};
	__property int StreamSize = {read=GetStreamSize, nodefault};
	__property int Progress = {read=FProgress, nodefault};
	__property TFlexProgressEvent OnProgress = {read=FOnProgress, write=FOnProgress};
};


class PASCALIMPLEMENTATION TFlexBinaryData : public System::TObject 
{
	typedef System::TObject inherited;
	
protected:
	TFlexFiler* FOwner;
	TFlexFilerProcess FProcess;
	bool FFinished;
	Classes::TStringList* FDictionary;
	int FDicCapacity;
	int FDicDeleteCount;
	TFlexBinKeyStoreSet FKeyDontStore;
	Classes::TStringList* FCmdKeys;
	int FCmdKeyCount;
	int FCmdKeysSize;
	#pragma pack(push, 1)
	TFlexBinHeader FCmdReadHeader;
	#pragma pack(pop)
	
	int FCmdReadDataSize;
	void *FCmdReadUserData;
	int FCmdReadUserDataSize;
	bool FCmdReadDataAhead;
	Classes::TStringList* FReadPropLines;
	int FReadPropLine;
	int FWritePropType;
	AnsiString FWritePropName;
	void *FWritePropData;
	int FWritePropDataPos;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?