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

📄 flexbase.hpp

📁 FlexGraphics是一套创建矢量图形的VCL组件
💻 HPP
📖 第 1 页 / 共 5 页
字号:
	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;
	Windows::TPoint FMouseAnchor;
	Windows::TPoint FMoveStart;
	Windows::TRect FResizeRect;
	Windows::TRect FMarqueeRect;
	TMetaClass*FCreatingControlClass;
	bool FShowEditPointGuide;
	TFlexEditPointGuide FEditPointGuide;
	TFlexControl* FEditPointControl;
	DynamicArray<bool >  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 TMetaClass* 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);
	void __fastcall SetMarqueeRect(const Windows::TRect &Value);
	void __fastcall SetEditPointControl(TFlexControl* Value);
	TFlexCustomScheme* __fastcall GetDefaultScheme(void);
	Graphics::TColor __fastcall GetGridPixColor(void);
	void __fastcall SetGridPixColor(const Graphics::TColor Value);
	void __fastcall SetHorzExtraSpace(const int Value);
	void __fastcall SetVertExtraSpace(const int Value);
	void __fastcall DocSpaceBrushChanged(System::TObject* Sender);
	void __fastcall SetSchemeBkStretch(const bool Value);
	void __fastcall FilerProgress(System::TObject* Sender, int Progress, Flexutils::TFlexFilerProcess Process
		);
	void __fastcall SetDocSpaceBrush(const Graphics::TBrush* Value);
	HIDESBASE int __fastcall GetControlCount(TFlexControl* Control);
	bool __fastcall GetEditPointSelected(int Index);
	void __fastcall SetEditPointSelected(int Index, bool Value);
	Flexpath::TPathEditFuncs __fastcall GetEditPointsCaps(void);
	bool __fastcall GetIsLoading(void);
	void __fastcall SetHideSelection(const bool Value);
	void __fastcall UpdateMouseData(void);
	bool __fastcall IsEditCloseFigure(void);
	bool __fastcall CloseFigureByPoint(int Index);
	void __fastcall SetShowEditPointGuide(const bool Value);
	Flexutils::TNotifyLink* __fastcall GetNotifyLink(void);
	void __fastcall SetAutoZoom(const bool Value);
	void __fastcall SetGridControl(const TFlexGrid* Value);
	void __fastcall SetFrostPan(const bool Value);
	HIDESBASE MESSAGE void __fastcall CMHintShow(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Message);
	HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMNCCalcSize(Messages::TMessage &Message);
	
protected:
	TFlexPanelHistory* FHistory;
	Flexhistory::THistoryGroup* FCreateInDesignAction;
	Classes::TList* FWithoutParent;
	Controls::TCursor FFlexCursor;
	Windows::TPoint FOrigin;
	Windows::TRect FClientDocRect;
	Flexutils::TFlexFilerProcess FFilerProcess;
	TFlexPaintCache FPaintCache;
	int FPaintWidth;
	int FPaintHeight;
	Windows::TRect FPaintRect;
	bool FPaintForExport;
	bool FPaintSchemeBackground;
	Windows::TPoint FInPaintOrigin;
	int FInPaintScale;
	int FScale;
	bool FZoomingIn;
	Windows::TPoint FZoomMouseStart;
	bool FIsPointAlter;
	bool FIsOverPoint;
	bool FIsOverCurveSegment;
	bool FIsOverSegment;
	Flexpath::TNearestPoint FOverCurveNearest;
	TFlexControl* FMouseControl;
	TFlexControl* FMouseSubControl;
	bool FHideSelection;
	TFlexControl* FHintControl;
	int FEditPointIndex;
	int FIsLoading;
	TFlexLoadFunc FLoadFunc;
	Windows::TPoint FLastMousePos;
	Classes::TShiftState FLastKeyShift;
	Windows::TRect FSelRect;
	int FSelUpdateCounter;
	bool FSelNeedUpdate;
	TResizeCursor FResizeCursor;
	HRGN FPointsRgn;
	bool FPointsRgnExact;
	TFlexDragObject* FDragObject;
	Flexprops::TPropRefList* FRefPropsList;
	TLinkPointInfo FDefaultLinkPoint;
	Windows::TPoint FLastMovedPos;
	TFlexPaintList* FPaintList;
	int FHorzExtraSpace;
	int FVertExtraSpace;
	bool FSaveAsBinary;
	Graphics::TBitmap* FFrostPanImage;
	int __fastcall AddWithoutParent(TFlexControl* Control);
	bool __fastcall RemoveWithoutParent(TFlexControl* Control);
	TFlexControl* __fastcall WithoutParentFindById(unsigned ControlID);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall DoNotify(TFlexControl* Control, Flexutils::TFlexNotify Notify);
	bool __fastcall IsInternalControl(TFlexControl* Control);
	void __fastcall UpdateOrigin(void);
	HIDESBASE void __fastcall UpdateScrollBars(void);
	virtual void __fastcall Paint(Graphics::TCanvas* ACanvas, TFlexControl* AControl, bool ChildrenOnly
		, bool SelectedOnly);
	virtual void __fastcall PaintPoints(Graphics::TCanvas* ACanvas);
	virtual void __fastcall PaintLinkPoint(Graphics::TCanvas* ACanvas);
	Windows::TRect __fastcall GetAnchorRect(TFlexControl* AControl, int Inflate);
	Windows::TRect __fastcall GetEditPointRect(int Index, int Inflate);
	bool __fastcall DoPointEdit(TFlexControl* Control, int Index, int DocX, int DocY);
	DYNAMIC void __fastcall DoEnter(void);
	DYNAMIC void __fastcall DoExit(void);
	virtual void __fastcall DoMouseControlChange(void);
	void __fastcall UpdatePoints(void);
	bool __fastcall UpdatePointGuide(HRGN Region);
	bool __fastcall UpdatePointTangents(HRGN Region);
	void __fastcall UpdateEditPointIndex(void);
	void __fastcall FindControlPoints(int PointIndex, /* out */ int &PrevNode, /* out */ int &NextNode)
		;
	int __fastcall FindFirstOrLastNodeIfEqual(int Index, TFlexControl* AControl);
	void __fastcall InvalidateSelection(void);
	virtual void __fastcall PaintSelection(Graphics::TCanvas* ACanvas);
	virtual void __fastcall PaintMarquee(Graphics::TCanvas* ACanvas);
	virtual void __fastcall DoNeedHint(bool &IsNeedHint);
	virtual void __fastcall DoShowHint(Forms::THintInfo &HintInfo, bool &IsShowHint);
	DYNAMIC void __fastcall DoStartDrag(Controls::TDragObject* &DragObject);
	DYNAMIC void __fastcall DragOver(System::TObject* Source, int X, int Y, Controls::TDragState State, 
		bool &Accept);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
		Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	void __fastcall UpdateToolMode(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyUp(Word &Key, Classes::TShiftState Shift);
	bool __fastcall ValidateID(TFlexControl* Control, unsigned LastID);
	virtual void __fastcall PropBeforeChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
	virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
	virtual HRGN __fastcall CreateSelMarkersRgn(void);
	virtual TResizeCursor __fastcall GetSelResizeCursor(int PaintX, int PaintY);
	void __fastcall UpdateSelection(TFlexControl* Control);
	virtual void __fastcall SetConnectorsMinGap(const int Value);
	virtual void __fastcall SetMouseControl(TFlexControl* Control, TFlexControl* SubControl);
	__property Graphics::TCanvas* Canvas = {read=FCanvas};
	__property Windows::TRect MarqueeRect = {read=FMarqueeRect, write=SetMarqueeRect};
	__property Flexalpha::TAlphaBuffer* AlphaBuffer = {read=FAlphaBuffer};
	
public:
	__fastcall virtual TFlexPanel(Classes::TComponent* AOwner);
	__fastcall virtual ~TFlexPanel(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	DYNAMIC void __fastcall Click(void);
	HIDESBASE void __fastcall AutoSize(void);
	virtual void __fastcall BeginLoading(void);
	virtual void __fastcall EndLoading(void);
	virtual TFlexControl* __fastcall CreateControl(TMetaClass* ControlClass, int ALeft, int ATop, int AWidth
		, int AHeight, TFlexCustomScheme* Scheme, TFlexLayer* Layer, bool UseGrid);
	HIDESBASE void __fastcall PaintTo(Graphics::TCanvas* ACanvas, const Windows::TRect &APaintRect, const 
		Windows::TPoint &AOrigin, int AScale, TFlexControl* AControl, bool Clipping, bool ChildrenOnly, bool 
		SelectedOnly, bool ForExport, bool AUseOriginalBezier, bool AUseImageClipTransparent);
	virtual void __fastcall PaintEmptyPicture(Graphics::TCanvas* ACanvas, TFlexControl* APicture);
	void __fastcall InvalidateDocRect(const Windows::TRect &DocRect);
	HIDESBASE virtual bool __fastcall InvalidateControl(TFlexControl* AControl);
	void __fastcall EmptyDocument(void);
	void __fastcall NewDocument(void);
	virtual void __fastcall UpdateCursor(void);
	TFlexControl* __fastcall FindControl(const AnsiString AName, TFlexControl* From);
	TFlexControl* __fastcall FindControlByID(unsigned ControlID, TFlexControl* From);
	virtual TFlexControl* __fastcall FindControlAtPoint(int x, int y);
	AnsiString __fastcall GetDefaultNewName(TFlexControl* Control, TFlexControl* RootControl, bool GenerateNumb
		);
	void __fastcall GenerateID(TFlexControl* Control);
	virtual void __fastcall DoSnapToGrid(int HStep, int VStep, const Windows::TRect &SnapRect, Windows::TPoint 
		&Delta, TFlexSnaps SnapTo, TResizeCursor ResizeCursor, int HOffset, int VOffset);
	TFlexDragObject* __fastcall StartDrag(TFlexControl* AControl, bool ChildrenOnly, bool SelectedOnly, 
		const Windows::TPoint &MousePos, const Windows::TPoint &AOrigin, int AScale, const AnsiString DragName
		);
	TFlexDragObject* __fastcall CreateDragObject(TFlexControl* AControl, bool ChildrenOnly, bool SelectedOnly
		, AnsiString DragName);
	DYNAMIC void __fastcall DragDrop(System::TObject* Source, int X, int Y);
	Flexutils::TFlexFiler* __fastcall CreateFlexFiler(Classes::TStream* AStream, Flexutils::TFlexFilerProcess 
		Process, bool ABinary);
	bool __fastcall LoadFromStream(Classes::TStream* Stream);
	bool __fastcall LoadFromFile(const AnsiString Filename);
	virtual bool __fastcall LoadFromFiler(Flexutils::TFlexFiler* Filer, TFlexLoadFunc LoadFunc);
	virtual TFlexControl* __fastcall LoadFlexControl(Flexutils::TFlexFiler* Filer, TFlexControl* AParent
		, const AnsiString First, bool WithoutParent);
	bool __fastcall SaveToFile(const AnsiString Filename);
	bool __fastcall SaveToStream(Classes::TStream* Stream);
	bool __fastcall SaveToFiler(Flexutils::TFlexFiler* Filer, bool SelectedOnly, TFlexControl* AControl
		, bool ChildrenOnly);
	void __fastcall Print(Printers::TPrinter* APrinter, bool PrintBackground, bool SelectedOnly);
	void __fastcall TransformRect(Windows::TRect &R);
	void __fastcall TransformPoint(int &px, int &py);
	void __fastcall TransformPointIndirect(Windows::TPoint &P);
	void __fastcall UnTransformPoint(int &px, int &py);
	void __fastcall BeginSelectionUpdate(bool IsTransformation, TMetaClass* HistoryGroup);
	void __fastcall EndSelectionUpdate(bool IsTransformation, TMetaClass* HistoryGroup);
	bool __fastcall IsSelected(TFlexControl* AControl);
	bool __fastcall Select(TFlexControl* AControl);
	HIDESBASE TFlexControl* __fastcall SelectNext(void);
	TFlexControl* __fastcall SelectPrev(void);
	bool __fastcall Unselect(TFlexControl* AControl);
	void __fastcall UnselectAll(void);
	void __fastcall CopyToClipboard(void);
	void __fastcall CutToClipboard(void);
	virtual void __fastcall PasteFromClipboard(bool FlexDocOnly);

⌨️ 快捷键说明

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