⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flexprops.hpp

📁 FlexGraphics是一套创建矢量图形的VCL组件
💻 HPP
📖 第 1 页 / 共 3 页
字号:
// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

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

#ifndef FlexPropsHPP
#define FlexPropsHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <FlexHistory.hpp>	// Pascal unit
#include <FlexAlpha.hpp>	// Pascal unit
#include <FlexUtils.hpp>	// Pascal unit
#include <jpeg.hpp>	// Pascal unit
#include <TypInfo.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Flexprops
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TPropType { ptSimple, ptComplex, ptStrList, ptHexData };
#pragma option pop

#pragma option push -b-
enum TPropStyleItem { psReadOnly, psVisible, psDontStore, psNonVisual, psDisplayEdit, psEditForm, psScalable, 
	psRef };
#pragma option pop

typedef Set<TPropStyleItem, psReadOnly, psRef>  TPropStyle;

typedef TMetaClass*TEditFormClass;

typedef TMetaClass*TCustomPropClass;

class DELPHICLASS TCustomProp;
typedef void __fastcall (__closure *TPropChangedEvent)(System::TObject* Sender, TCustomProp* Prop);

typedef void __fastcall (__closure *TPropStoredEvent)(System::TObject* Sender, TCustomProp* Prop, bool 
	&IsStored, const AnsiString PropName);

typedef void __fastcall (__closure *TPropReadOnlyEvent)(System::TObject* Sender, TCustomProp* Prop, 
	bool &IsReadOnly);

typedef void __fastcall (__closure *TPropHistoryActionEvent)(System::TObject* Sender, TCustomProp* Prop
	, TMetaClass* &ActionClass);

typedef void __fastcall (*TPictureLinkResolve)(System::TObject* Sender, const AnsiString LinkName, Graphics::TPicture* 
	APicture);

typedef void __fastcall (*TBitmapLinkResolve)(System::TObject* Sender, const AnsiString LinkName, Graphics::TBitmap* 
	ABitmap);

class DELPHICLASS TPropList;
class DELPHICLASS TPropRefList;
struct TPropRefItem;
typedef TPropRefItem *PPropRefItem;

class PASCALIMPLEMENTATION TPropRefList : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	Classes::TList* FList;
	Flexutils::TIdPool* FIdExist;
	Classes::TList* FIdRecode;
	int __fastcall GetCount(void);
	PPropRefItem __fastcall GetPropRefItem(int Index);
	int __fastcall IndexOfRecode(int OldID);
	
public:
	__fastcall TPropRefList(void);
	__fastcall virtual ~TPropRefList(void);
	int __fastcall AddRef(TCustomProp* AProp, const System::ShortString &APropName, System::PVariant AData
		);
	bool __fastcall AddIDAlias(int OldID, int NewID);
	int __fastcall GetIDAlias(int OldID);
	void __fastcall DeleteRef(int Index);
	void __fastcall ResolveRef(int Index);
	void __fastcall ResolveAllRefs(void);
	void __fastcall Clear(void);
	__property int Count = {read=GetCount, nodefault};
	__property PPropRefItem Refs[int Index] = {read=GetPropRefItem};
};


#pragma option push -b-
enum TPropListDataMode { plmNone, plmLoading, plmSaving };
#pragma option pop

class PASCALIMPLEMENTATION TPropList : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	System::TObject* FOwner;
	TPropRefList* FRefList;
	Classes::TStringList* FPropList;
	Flexutils::TNotifyLink* FNotifyLink;
	Flexhistory::THistory* FHistory;
	bool FHistoryIgnoreReadOnly;
	Flexhistory::THistoryState FHistoryStateForList;
	bool FPropValueLoading;
	TPropChangedEvent FOnPropChanged;
	TPropChangedEvent FOnPropBeforeChanged;
	TPropStoredEvent FOnPropStored;
	TPropReadOnlyEvent FOnPropReadOnly;
	TPropHistoryActionEvent FOnPropHistoryAction;
	TCustomProp* __fastcall GetPropByIndex(int Index);
	int __fastcall GetPropsCount(void);
	TCustomProp* __fastcall GetPropByName(const AnsiString Name);
	AnsiString __fastcall GetPropName(int Index);
	int __fastcall GetVisibleCount(void);
	TCustomProp* __fastcall GetVisibleProp(int Index);
	AnsiString __fastcall GetVisiblePropName(int Index);
	bool __fastcall GetResolving(void);
	Flexutils::TNotifyLink* __fastcall GetNotifyLink(void);
	
protected:
	int FResolveCount;
	TPropListDataMode FDataMode;
	int FDataModeCount;
	void __fastcall DoBeforeChanged(TCustomProp* Prop);
	void __fastcall DoChanged(TCustomProp* Prop);
	bool __fastcall DoPropIsStored(TCustomProp* Prop, const AnsiString PropName);
	bool __fastcall IsNameValid(const AnsiString AName);
	TCustomProp* __fastcall GetComplexPropInstance(TCustomProp* Prop, const AnsiString PropName);
	void __fastcall SavePropValue(Flexutils::TFlexFiler* Filer, const AnsiString Indent, TCustomProp* Prop
		, const AnsiString PropName, bool IsComplex);
	void __fastcall SaveComplexProp(Flexutils::TFlexFiler* Filer, TCustomProp* Prop, const AnsiString PropName
		, const AnsiString Indent, bool ForceSave);
	TCustomProp* __fastcall LoadPropValue(Flexutils::TFlexFiler* Filer, TCustomProp* ComplexProp, const 
		AnsiString First);
	bool __fastcall LoadComplexProp(Flexutils::TFlexFiler* Filer, const AnsiString First, TCustomProp* 
		Prop);
	__property bool PropValueLoading = {read=FPropValueLoading, nodefault};
	
public:
	__fastcall TPropList(System::TObject* AOwner);
	__fastcall virtual ~TPropList(void);
	bool __fastcall Assign(TPropList* PropList);
	void __fastcall BeginResolve(TPropRefList* ARefList);
	void __fastcall EndResolve(void);
	void __fastcall Clear(void);
	void __fastcall BeginLoading(void);
	void __fastcall BeginSaving(void);
	void __fastcall EndLoadSave(void);
	int __fastcall Add(TCustomProp* Prop, const AnsiString AName);
	bool __fastcall AddLoadedIDAlias(int LoadedID, int NewID);
	int __fastcall IndexOf(TCustomProp* Prop);
	bool __fastcall IsReadOnly(TCustomProp* Prop);
	int __fastcall VisibleIndexOf(TCustomProp* Prop);
	int __fastcall GetRealIndex(int VisibleIndex);
	int __fastcall GetVisibleIndex(int RealIndex);
	void __fastcall Delete(int Index);
	bool __fastcall SaveProperty(Flexutils::TFlexFiler* Filer, TCustomProp* Prop, const AnsiString Indent
		, AnsiString PropName, bool ForceSave);
	TCustomProp* __fastcall LoadProperty(Flexutils::TFlexFiler* Filer, const AnsiString First, bool WithoutBeginLoading
		);
	bool __fastcall SaveToFiler(Flexutils::TFlexFiler* Filer, const AnsiString Indent, bool ForceSave);
		
	void __fastcall LoadFromFiler(Flexutils::TFlexFiler* Filer, const AnsiString First, TPropRefList* RefList
		);
	__property System::TObject* Owner = {read=FOwner};
	__property TPropListDataMode DataMode = {read=FDataMode, nodefault};
	__property int Count = {read=GetPropsCount, nodefault};
	__property TCustomProp* Props[AnsiString Name] = {read=GetPropByName/*, default*/};
	__property AnsiString PropNames[int Index] = {read=GetPropName};
	__property TCustomProp* ByIndex[int Index] = {read=GetPropByIndex};
	__property int VisibleCount = {read=GetVisibleCount, nodefault};
	__property TCustomProp* VisibleProps[int Index] = {read=GetVisibleProp};
	__property AnsiString VisiblePropNames[int Index] = {read=GetVisiblePropName};
	__property bool Resolving = {read=GetResolving, nodefault};
	__property TPropRefList* RefList = {read=FRefList, write=FRefList};
	__property Flexutils::TNotifyLink* NotifyLink = {read=GetNotifyLink, write=FNotifyLink};
	__property Flexhistory::THistory* History = {read=FHistory, write=FHistory};
	__property bool HistoryIgnoreReadOnly = {read=FHistoryIgnoreReadOnly, write=FHistoryIgnoreReadOnly, 
		nodefault};
	__property Flexhistory::THistoryState HistoryStateForList = {read=FHistoryStateForList, write=FHistoryStateForList
		, nodefault};
	__property TPropChangedEvent OnPropChanged = {read=FOnPropChanged, write=FOnPropChanged};
	__property TPropChangedEvent OnPropBeforeChanged = {read=FOnPropBeforeChanged, write=FOnPropBeforeChanged
		};
	__property TPropStoredEvent OnPropStored = {read=FOnPropStored, write=FOnPropStored};
	__property TPropReadOnlyEvent OnPropReadOnly = {read=FOnPropReadOnly, write=FOnPropReadOnly};
	__property TPropHistoryActionEvent OnPropHistoryAction = {read=FOnPropHistoryAction, write=FOnPropHistoryAction
		};
};


class PASCALIMPLEMENTATION TCustomProp : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TPropList* FOwner;
	TCustomProp* FParent;
	TPropStyle FStyle;
	TMetaClass*FEditFormClass;
	AnsiString __fastcall GetName();
	void __fastcall SetStyle(const TPropStyle Value);
	Flexutils::TNotifyLink* __fastcall GetNotifyLink(void);
	
protected:
	TPropType FPropType;
	bool FIsEnum;
	Flexutils::TNotifyLink* FNotifyLink;
	bool FSkipHistoryAction;
	virtual AnsiString __fastcall GetDisplayValue();
	virtual void __fastcall SetDisplayValue(const AnsiString Value);
	virtual void __fastcall DoBeforeChanged(void);
	virtual void __fastcall DoChanged(void);
	virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
	virtual Variant __fastcall GetPropValue(const AnsiString PropName);
	virtual TPropType __fastcall GetPropType(const AnsiString PropName);
	
public:
	__fastcall TCustomProp(TPropList* AOwner, const AnsiString AName);
	__fastcall virtual ~TCustomProp(void);
	bool __fastcall Assign(TCustomProp* Prop);
	virtual void __fastcall Setup(Graphics::TCanvas* Canvas, int Scale);
	virtual bool __fastcall Edit(void);
	virtual void __fastcall GetEnumList(Classes::TStrings* List);
	virtual bool __fastcall IsComplexStored(const AnsiString PropName);
	void __fastcall InitPublished(TPropList* AOwner, TCustomProp* PublishedProp);
	TCustomProp* __fastcall GetPublishedComplexProp(const AnsiString PropName);
	void __fastcall GetPropNames(Classes::TStrings* StrList);
	bool __fastcall IsParentOf(TCustomProp* Prop);
	__property TPropList* Owner = {read=FOwner, write=FOwner};
	__property AnsiString Name = {read=GetName};
	__property TCustomProp* Parent = {read=FParent};
	__property TPropStyle Style = {read=FStyle, write=SetStyle, nodefault};
	__property TPropType PropType = {read=FPropType, nodefault};
	__property AnsiString DisplayValue = {read=GetDisplayValue, write=SetDisplayValue};
	__property bool IsEnum = {read=FIsEnum, nodefault};
	__property TMetaClass* EditFormClass = {read=FEditFormClass, write=FEditFormClass};
	__property Flexutils::TNotifyLink* NotifyLink = {read=GetNotifyLink, write=FNotifyLink};
	__property Variant PropData[AnsiString PropName] = {read=GetPropValue, write=SetPropValue};
	__property TPropType PublishedPropType[AnsiString PropName] = {read=GetPropType};
};


class DELPHICLASS TIdHistoryAction;
class PASCALIMPLEMENTATION TIdHistoryAction : public Flexhistory::THistoryStreamAction 
{
	typedef Flexhistory::THistoryStreamAction inherited;
	
protected:
	unsigned FSourceId;
	AnsiString FSourcePropName;
	virtual void __fastcall DoBeginAction(System::TObject* Source);
	
public:
	__property unsigned SourceId = {read=FSourceId, write=FSourceId, nodefault};
	__property AnsiString SourcePropName = {read=FSourcePropName, write=FSourcePropName};
public:
	#pragma option push -w-inl
	/* THistoryStreamAction.Destroy */ inline __fastcall virtual ~TIdHistoryAction(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* THistoryAction.Create */ inline __fastcall virtual TIdHistoryAction(Flexhistory::THistory* AOwner
		, Flexhistory::THistoryGroup* AParent) : Flexhistory::THistoryStreamAction(AOwner, AParent) { }
	#pragma option pop
	
};


class DELPHICLASS TPropHistoryAction;
class PASCALIMPLEMENTATION TPropHistoryAction : public TIdHistoryAction 
{
	typedef TIdHistoryAction inherited;
	
protected:
	virtual bool __fastcall ProcessSource(Classes::TStream* Stream, System::TObject* Source, bool DoLoad
		);
public:
	#pragma option push -w-inl
	/* THistoryStreamAction.Destroy */ inline __fastcall virtual ~TPropHistoryAction(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* THistoryAction.Create */ inline __fastcall virtual TPropHistoryAction(Flexhistory::THistory* AOwner
		, Flexhistory::THistoryGroup* AParent) : TIdHistoryAction(AOwner, AParent) { }
	#pragma option pop
	
};


class DELPHICLASS TPropHistoryGroup;
class PASCALIMPLEMENTATION TPropHistoryGroup : public Flexhistory::THistoryGroup 
{
	typedef Flexhistory::THistoryGroup inherited;
	
public:
	__fastcall virtual TPropHistoryGroup(Flexhistory::THistory* AOwner, Flexhistory::THistoryGroup* AParent
		);
public:
	#pragma option push -w-inl
	/* THistoryGroup.Destroy */ inline __fastcall virtual ~TPropHistoryGroup(void) { }
	#pragma option pop
	
};


class DELPHICLASS TEnumProp;
class PASCALIMPLEMENTATION TEnumProp : public TCustomProp 
{
	typedef TCustomProp inherited;
	
private:
	int FEnumIndex;
	Classes::TStrings* FEnumList;
	int __fastcall GetEnumCount(void);
	
protected:
	virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
	virtual Variant __fastcall GetPropValue(const AnsiString PropName);
	virtual AnsiString __fastcall GetDisplayValue();
	virtual void __fastcall SetEnumIndex(int Value);
	__property Classes::TStrings* EnumList = {read=FEnumList, write=FEnumList};
	
public:
	__fastcall TEnumProp(TPropList* AOwner, const AnsiString AName);
	__fastcall virtual ~TEnumProp(void);
	int __fastcall AddItem(const AnsiString s);
	void __fastcall SetItem(int EnumIndex, const AnsiString s);
	bool __fastcall SetEnumType(Typinfo::PTypeInfo TypeInfo);
	virtual void __fastcall GetEnumList(Classes::TStrings* List);
	__property int EnumIndex = {read=FEnumIndex, write=SetEnumIndex, nodefault};

⌨️ 快捷键说明

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