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

📄 flexbase.hpp

📁 FlexGraphics是一套创建矢量图形的VCL组件
💻 HPP
📖 第 1 页 / 共 5 页
字号:
{
	typedef TFlexServiceControl inherited;
	
private:
	bool FSnap;
	TFlexSnaps FSnapTo;
	bool FShowPixGrid;
	TFlexGridStyle FStyle;
	Graphics::TColor FColor;
	Graphics::TColor FPixColor;
	int FHSize;
	int FVSize;
	int FHOffset;
	int FVOffset;
	void __fastcall GetOwnerWidth(System::TObject* Sender, /* out */ int &Value);
	void __fastcall GetOwnerHeight(System::TObject* Sender, /* out */ int &Value);
	void __fastcall SetColor(const Graphics::TColor Value);
	void __fastcall SetShowPixGrid(const bool Value);
	void __fastcall SetStyle(const TFlexGridStyle Value);
	void __fastcall SetPixColor(const Graphics::TColor Value);
	void __fastcall SetHSize(const int Value);
	void __fastcall SetVSize(const int Value);
	void __fastcall SetHOffset(const int Value);
	void __fastcall SetVOffset(const int Value);
	
protected:
	virtual void __fastcall CreateProperties(void);
	virtual void __fastcall ControlCreate(void);
	virtual void __fastcall Paint(Graphics::TCanvas* Canvas, Windows::TRect &PaintRect);
	
public:
	void __fastcall DoSnap(const Windows::TRect &SnapRect, Windows::TPoint &Delta, TResizeCursor ResizeCursor
		);
	virtual void __fastcall DoCustomSnap(const Windows::TRect &SnapRect, Windows::TPoint &Delta, int HStep
		, int VStep, int HOffset, int VOffset, TResizeCursor ResizeCursor, TFlexSnaps SnapTo);
	__property bool Snap = {read=FSnap, write=FSnap, nodefault};
	__property TFlexSnaps SnapTo = {read=FSnapTo, write=FSnapTo, nodefault};
	__property bool ShowPixGrid = {read=FShowPixGrid, write=SetShowPixGrid, nodefault};
	__property TFlexGridStyle Style = {read=FStyle, write=SetStyle, nodefault};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
	__property Graphics::TColor PixColor = {read=FPixColor, write=SetPixColor, nodefault};
	__property int HSize = {read=FHSize, write=SetHSize, nodefault};
	__property int VSize = {read=FVSize, write=SetVSize, nodefault};
	__property int HOffset = {read=FHOffset, write=SetHOffset, nodefault};
	__property int VOffset = {read=FVOffset, write=SetVOffset, nodefault};
public:
	#pragma option push -w-inl
	/* TFlexControl.Create */ inline __fastcall virtual TFlexGrid(TFlexPanel* AOwner, TFlexControl* AParent
		, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexGrid(void) { }
	#pragma option pop
	
};


class DELPHICLASS TFlexLayers;
class PASCALIMPLEMENTATION TFlexLayers : public TFlexServiceControl 
{
	typedef TFlexServiceControl inherited;
	
private:
	TFlexLayer* __fastcall GetLayer(int Index);
	HIDESBASE TFlexLayer* __fastcall GetByName(const AnsiString Name);
	
protected:
	virtual void __fastcall ControlCreate(void);
	
public:
	TFlexLayer* __fastcall New(void);
	virtual int __fastcall Add(TFlexControl* AControl);
	virtual void __fastcall Delete(int Index);
	virtual void __fastcall ChangeOrder(int CurIndex, int NewIndex);
	__property TFlexLayer* Controls[int Index] = {read=GetLayer/*, default*/};
	__property TFlexLayer* ByName[AnsiString Name] = {read=GetByName};
public:
	#pragma option push -w-inl
	/* TFlexControl.Create */ inline __fastcall virtual TFlexLayers(TFlexPanel* AOwner, TFlexControl* AParent
		, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexLayers(void) { }
	#pragma option pop
	
};


class DELPHICLASS TFlexSchemes;
class PASCALIMPLEMENTATION TFlexSchemes : public TFlexServiceControl 
{
	typedef TFlexServiceControl inherited;
	
private:
	Flexprops::TIntProp* FVersionProp;
	Flexprops::TIntProp* FConnectorsMinGapProp;
	Flexprops::TBoolProp* FConnectorsKeepLinkProp;
	TFlexCustomScheme* __fastcall GetScheme(int Index);
	HIDESBASE TFlexCustomScheme* __fastcall GetByName(const AnsiString Name);
	
protected:
	virtual void __fastcall ControlCreate(void);
	virtual void __fastcall CreateProperties(void);
	virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
	virtual void __fastcall PropStored(System::TObject* Sender, Flexprops::TCustomProp* Prop, bool &IsStored
		, const AnsiString PropName);
	
public:
	virtual int __fastcall Add(TFlexControl* AControl);
	virtual void __fastcall Delete(int Index);
	virtual void __fastcall ChangeOrder(int CurIndex, int NewIndex);
	__property TFlexCustomScheme* Controls[int Index] = {read=GetScheme/*, default*/};
	__property TFlexCustomScheme* ByName[AnsiString Name] = {read=GetByName};
	__property Flexprops::TIntProp* VersionProp = {read=FVersionProp};
	__property Flexprops::TIntProp* ConnectorsMinGapProp = {read=FConnectorsMinGapProp};
	__property Flexprops::TBoolProp* ConnectorsKeepLinkProp = {read=FConnectorsKeepLinkProp};
public:
	#pragma option push -w-inl
	/* TFlexControl.Create */ inline __fastcall virtual TFlexSchemes(TFlexPanel* AOwner, TFlexControl* 
		AParent, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexSchemes(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TFlexUpdateCursorEvent)(System::TObject* Sender, Controls::TCursor 
	&ACursor);

typedef void __fastcall (__closure *TFlexPaintEvent)(Graphics::TCanvas* ACanvas, TFlexControl* AControl
	, bool ChildrenOnly, bool SelectedOnly);

typedef void __fastcall (__closure *TFlexNeedHintEvent)(System::TObject* Sender, bool &IsNeedHint);

typedef void __fastcall (__closure *TFlexShowHintEvent)(System::TObject* Sender, TFlexControl* HintControl
	, Forms::THintInfo &HintInfo, bool &IsShowHint);

class DELPHICLASS TFlexPanelHistory;
class PASCALIMPLEMENTATION TFlexPanelHistory : public Flexhistory::THistory 
{
	typedef Flexhistory::THistory inherited;
	
private:
	TFlexPanel* FPanel;
	
protected:
	virtual void __fastcall DoChange(void);
	virtual System::TObject* __fastcall DoGetActionSource(Flexhistory::THistoryAction* Action, bool &Enabled
		);
	virtual void __fastcall DoSetActionSource(Flexhistory::THistoryAction* Action, const System::TObject* 
		Source);
	virtual AnsiString __fastcall DoGetActionCaption(Flexhistory::THistoryAction* Action, const System::TObject* 
		Source);
	virtual bool __fastcall DoIsRecordable(TMetaClass* &ActionClass, System::TObject* &Source, Flexhistory::THistoryGroup* 
		Parent);
	virtual bool __fastcall DoIsSame(Flexhistory::THistoryAction* ExistedAction, TMetaClass* NewActionClass
		, System::TObject* NewSource);
	
public:
	__fastcall TFlexPanelHistory(TFlexPanel* AOwner);
	virtual bool __fastcall Undo(void);
	virtual bool __fastcall Redo(void);
	TFlexControl* __fastcall SourceControl(System::TObject* Source);
	void __fastcall SourceInfo(System::TObject* Source, /* out */ unsigned &Id, /* out */ AnsiString &PropName
		);
	Flexhistory::THistoryGroup* __fastcall BeginPanelGroup(TMetaClass* GroupClass);
	bool __fastcall EndPanelGroup(TMetaClass* GroupClass);
	bool __fastcall RecordSelectedAsNew(void);
	__property TFlexPanel* Owner = {read=FPanel};
public:
	#pragma option push -w-inl
	/* THistory.Destroy */ inline __fastcall virtual ~TFlexPanelHistory(void) { }
	#pragma option pop
	
};


struct TFlexPaintCache
{
	HDC DC;
	HBITMAP Bitmap;
	int BitsPixel;
	int Width;
	int Height;
	Windows::TRect rcPaint;
} ;

class DELPHICLASS TFlexDragObject;
class DELPHICLASS TFlexGroup;
class PASCALIMPLEMENTATION TFlexGroup : public TFlexControl 
{
	typedef TFlexControl inherited;
	
private:
	bool FGroupResize;
	bool FGroupMove;
	bool FBoundsChanging;
	Windows::TRect FOldDocRect;
	bool FNeedRefreshBounds;
	
protected:
	virtual void __fastcall ControlCreate(void);
	virtual void __fastcall ControlTranslate(const Flexutils::TTranslateInfo &TranslateInfo);
	virtual Windows::TRect __fastcall GetRefreshRect(int RefreshX, int RefreshY);
	virtual void __fastcall PropBeforeChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
	virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
	void __fastcall RefreshBounds(void);
	virtual bool __fastcall GetIsUngroupable(void);
	
public:
	virtual bool __fastcall EndGroupUngroup(void);
	virtual bool __fastcall IsPointInside(int PaintX, int PaintY);
	virtual void __fastcall Translate(const Flexutils::TTranslateInfo &TranslateInfo);
public:
	#pragma option push -w-inl
	/* TFlexControl.Create */ inline __fastcall virtual TFlexGroup(TFlexPanel* AOwner, TFlexControl* AParent
		, TFlexLayer* ALayer) : TFlexControl(AOwner, AParent, ALayer) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexGroup(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TFlexDragObject : public Controls::TDragObject 
{
	typedef Controls::TDragObject inherited;
	
private:
	TFlexGroup* FDragGroup;
	Windows::TPoint FMouseDragDelta;
	TFlexPanel* FDefaultFlex;
	
protected:
	virtual void __fastcall Finished(System::TObject* Target, int X, int Y, bool Accepted);
	
public:
	__fastcall virtual ~TFlexDragObject(void);
	virtual void __fastcall UpdateLink(TFlexPanel* Flex, int MouseX, int MouseY);
	virtual void __fastcall Unlink(void);
	__property TFlexGroup* DragGroup = {read=FDragGroup, write=FDragGroup};
	__property Windows::TPoint MouseDragDelta = {read=FMouseDragDelta, write=FMouseDragDelta};
	__property TFlexPanel* DefaultFlex = {read=FDefaultFlex, write=FDefaultFlex};
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TFlexDragObject(void) : Controls::TDragObject() { }
	#pragma option pop
	
};


class DELPHICLASS TFlexPaintList;
struct TFlexPaintStruct;
typedef TFlexPaintStruct *PFlexPaintStruct;

class PASCALIMPLEMENTATION TFlexPaintList : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TFlexPanel* FOwner;
	Classes::TList* FList;
	bool FFirstInUse;
	
protected:
	void __fastcall Clear(void);
	void __fastcall StoreParams(PFlexPaintStruct PaintStruct, Graphics::TCanvas* ACanvas);
	void __fastcall RestoreParams(PFlexPaintStruct PaintStruct);
	
public:
	__fastcall TFlexPaintList(TFlexPanel* AOwner);
	__fastcall virtual ~TFlexPaintList(void);
	PFlexPaintStruct __fastcall BeginPaint(Graphics::TCanvas* ACanvas);
	void __fastcall EndPaint(PFlexPaintStruct PaintStruct);
	__property TFlexPanel* Owner = {read=FOwner};
};


class DELPHICLASS TFlexClone;
typedef TMetaClass*TFlexCloneClass;

typedef TMetaClass*TFlexGroupClass;

class PASCALIMPLEMENTATION TFlexPanel : public Forms::TScrollingWinControl 
{
	typedef Forms::TScrollingWinControl inherited;
	
private:
	Forms::TFormBorderStyle FBorderStyle;

⌨️ 快捷键说明

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