flexbase.hpp

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

HPP
1,378
字号
	__property Flexprops::TPictureProp* PictureProp = {read=FPictureProp};
	__property Flexprops::TBoolProp* DefaultProp = {read=FDefaultProp};
	__property Flexprops::TBackgroundOptionsProp* BackgroundProp = {read=FBackgroundProp};
	__property Default;
public:
	/* TFlexControl.Create */ inline __fastcall virtual TFlexScheme(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexCustomScheme(AOwner, AParent, ALayer) { }
	/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexScheme(void) { }
	
};


class DELPHICLASS TFlexSchemes;
class PASCALIMPLEMENTATION TFlexSchemes : public TFlexServiceControl
{
	typedef TFlexServiceControl inherited;
	
public:
	TFlexCustomScheme* operator[](int Index) { return Controls[Index]; }
	
private:
	Flexprops::TIntProp* FVersionProp;
	Flexprops::TIntProp* FConnectorsMinGapProp;
	Flexprops::TBoolProp* FConnectorsKeepLinkProp;
	TFlexCustomScheme* __fastcall GetScheme(int Index);
	HIDESBASE TFlexCustomScheme* __fastcall GetByName(const System::UnicodeString 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 System::UnicodeString PropName = L"");
	
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[const System::UnicodeString Name] = {read=GetByName};
	__property Flexprops::TIntProp* VersionProp = {read=FVersionProp};
	__property Flexprops::TIntProp* ConnectorsMinGapProp = {read=FConnectorsMinGapProp};
	__property Flexprops::TBoolProp* ConnectorsKeepLinkProp = {read=FConnectorsKeepLinkProp};
public:
	/* TFlexControl.Create */ inline __fastcall virtual TFlexSchemes(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
	/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexSchemes(void) { }
	
};


class DELPHICLASS TFlexDragObject;
class PASCALIMPLEMENTATION TFlexDragObject : public Controls::TDragObject
{
	typedef Controls::TDragObject inherited;
	
private:
	TFlexGroup* FDragGroup;
	Types::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 Types::TPoint MouseDragDelta = {read=FMouseDragDelta, write=FMouseDragDelta};
	__property TFlexPanel* DefaultFlex = {read=FDefaultFlex, write=FDefaultFlex};
public:
	/* TObject.Create */ inline __fastcall TFlexDragObject(void) : Controls::TDragObject() { }
	
};


struct TFlexPaintStruct;
typedef TFlexPaintStruct *PFlexPaintStruct;

struct TFlexPaintStruct
{
	
public:
	bool IsFirstPaint;
	Graphics::TCanvas* Canvas;
	Types::TPoint Origin;
	int Scale;
	Types::TRect PaintRect;
	int PaintWidth;
	int PaintHeight;
	bool PaintForExport;
	bool UseOriginalBezier;
	bool UseImageClipTransparent;
};


class DELPHICLASS TFlexPaintList;
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};
};


struct TFlexPaintCache;
typedef TFlexPaintCache *PFlexPaintCache;

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


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 System::UnicodeString __fastcall DoGetActionCaption(Flexhistory::THistoryAction* Action, const System::TObject* Source);
	virtual bool __fastcall DoIsRecordable(Flexhistory::THistoryActionClass &ActionClass, System::TObject* &Source, Flexhistory::THistoryGroup* Parent);
	virtual bool __fastcall DoIsSame(Flexhistory::THistoryAction* ExistedAction, Flexhistory::THistoryActionClass 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 */ System::UnicodeString &PropName);
	Flexhistory::THistoryGroup* __fastcall BeginPanelGroup(Flexhistory::THistoryGroupClass GroupClass);
	bool __fastcall EndPanelGroup(Flexhistory::THistoryGroupClass GroupClass);
	bool __fastcall RecordSelectedAsNew(void);
	__property TFlexPanel* Owner = {read=FPanel};
public:
	/* THistory.Destroy */ inline __fastcall virtual ~TFlexPanelHistory(void) { }
	
};


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

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

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

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

class PASCALIMPLEMENTATION TFlexPanel : public Forms::TScrollingWinControl
{
	typedef Forms::TScrollingWinControl inherited;
	
private:
	Forms::TFormBorderStyle FBorderStyle;
	Graphics::TCanvas* FCanvas;
	int FDocWidth;
	int FDocHeight;
	Graphics::TColor FDocFrameColor;
	Graphics::TColor FDocShadowColor;
	Graphics::TBrush* FDocSpaceBrush;
	bool FDocSpaceFill;
	bool FDocClipping;
	bool FSchemeBkStretch;
	bool FShowDocFrame;
	bool FAutoZoom;
	bool FAutoNames;
	bool FAutoNameNumbs;
	bool FSelectAsFilled;
	bool FSelectPartialOverlapped;
	TFlexGrid* FGridControl;
	TFlexToolMode FToolMode;
	TFlexToolMode FDefaultToolMode;
	bool FAutoDragEnabled;
	TFlexLayers* FLayers;
	TFlexLayer* FActiveLayer;
	TFlexSchemes* FSchemes;
	TFlexCustomScheme* FActiveScheme;
	Classes::TList* FSelList;
	bool FInDesign;
	bool FViewing;
	bool FModified;
	Flexutils::TIdPool* FIdPool;
	TFlexControl* FIdChangeControl;
	int FConnectorsMinGap;
	Types::TPoint FMouseAnchor;
	Types::TPoint FMoveStart;
	Types::TRect FResizeRect;
	Types::TRect FMarqueeRect;
	TFlexControlClass FCreatingControlClass;
	bool FShowEditPointGuide;
	TFlexEditPointGuide FEditPointGuide;
	TFlexControl* FEditPointControl;
	Flexpath::TSelectedArray FEditPointSelected;
	int FEditPointSelCount;
	bool FUseOriginalBezier;
	bool FUseImageClipTransparent;
	bool FWMPaintProcessing;
	Flexutils::TNotifyLink* FNotifyLink;
	Flexalpha::TAlphaBuffer* FAlphaBuffer;
	bool FFrostPan;
	bool FFrostPanFullDoc;
	TFlexControlCreateEvent FOnControlCreate;
	TFlexUpdateCursorEvent FOnUpdateCursor;
	Flexprops::TPropChangedEvent FOnPropBeforeChanged;
	Flexprops::TPropChangedEvent FOnPropChanged;
	TFlexPaintEvent FOnPaintScheme;
	TFlexPaintEvent FOnPaintOver;
	TFlexNotifyEvent FOnNotify;
	Classes::TNotifyEvent FOnBeginSelectionUpdate;
	Classes::TNotifyEvent FOnEndSelectionUpdate;
	Flexutils::TFlexProgressEvent FOnProgress;
	Classes::TNotifyEvent FOnToolMode;
	TFlexNeedHintEvent FOnNeedHint;
	TFlexShowHintEvent FOnShowHint;
	Classes::TNotifyEvent FOnMouseControlChange;
	void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
	void __fastcall SetInDesign(const bool Value);
	void __fastcall SetActiveLayer(const TFlexLayer* Value);
	void __fastcall SetActiveScheme(const TFlexCustomScheme* Value);
	TFlexControl* __fastcall GetSelected(int Index);
	int __fastcall GetSelectedCount(void);
	void __fastcall SetToolMode(const TFlexToolMode Value);
	void __fastcall SetCreatingControlClass(const TFlexControlClass Value);
	unsigned __fastcall GetCppCreatingControlClass(void);
	void __fastcall SetCppCreatingControlClass(const unsigned Value);
	void __fastcall SetDocHeight(const int Value);
	void __fastcall SetDocWidth(const int Value);
	void __fastcall SetDocFrameColor(const Graphics::TColor Value);
	void __fastcall SetDocShadowColor(const Graphics::TColor Value);
	void __fastcall SetDocSpaceFill(const bool Value);
	bool __fastcall GetDocFrameVisible(void);
	void __fastcall SetDocClipping(const bool Value);
	void __fastcall SetShowDocFrame(const bool Value);
	void __fastcall SetScale(int Value);
	bool __fastcall GetShowGrid(void);
	void __fastcall SetShowGrid(const bool Value);
	bool __fastcall GetShowPixGrid(void);
	void __fastcall SetShowPixGrid(const bool Value);
	int __fastcall GetGridHorizSize(void);
	int __fastcall GetGridVertSize(void);
	void __fastcall SetGridHorizSize(const int Value);
	void __fastcall SetGridVertSize(const int Value);
	TFlexGridStyle __fastcall GetGridStyle(void);
	void __fastcall SetGridStyle(const TFlexGridStyle Value);
	bool __fastcall GetSnapToGrid(void);
	void __fastcall SetSnapToGrid(const bool Value);
	TFlexSnaps __fastcall GetSnapStyle(void);
	void __fastcall SetSnapStyle(const TFlexSnaps Value);
	Graphics::TColor __fastcall GetGridColor(void);
	void __fastcall SetGridColor(const Graphics::TColor Value);

⌨️ 快捷键说明

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