📄 flexbase.hpp
字号:
TFlexControl* FParent;
TFlexLayer* FLayer;
TFlexState FState;
Classes::TList* FControls;
Flexprops::TPropList* FProps;
unsigned FCheckID;
bool FNonVisual;
bool FNoPaintRectCheck;
int FUpdateCounter;
int FPointsDesigning;
Flexutils::TNotifyLink* FNotifyLink;
Classes::TList* FLinkPoints;
bool FLinkPointsChanged;
bool FRectChanged;
int FTranslateCount;
Flexprops::TStrProp* FNameProp;
Flexprops::TIntProp* FLeftProp;
Flexprops::TIntProp* FTopProp;
Flexprops::TIntProp* FWidthProp;
Flexprops::TIntProp* FHeightProp;
Flexprops::TLongWordProp* FIdProp;
Flexprops::TIntProp* FTagProp;
Flexprops::TBoolProp* FVisibleProp;
TLayerProp* FLayerProp;
Flexprops::TStrListProp* FHintProp;
Flexprops::TBoolProp* FShowHintProp;
TSchemeRefProp* FReferenceProp;
Flexprops::TUserDataProp* FUserDataProp;
Flexprops::TIntProp* FTransparencyProp;
Flexprops::TBoolProp* FSelectableProp;
TFlexControl* __fastcall GetControl(int Index);
int __fastcall GetCount(void);
bool __fastcall GetIsSelected(void);
AnsiString __fastcall GetName();
bool __fastcall GetVisual(void);
unsigned __fastcall GetID(void);
int __fastcall GetHeight(void);
int __fastcall GetLeft(void);
int __fastcall GetTop(void);
int __fastcall GetWidth(void);
AnsiString __fastcall GetHint();
bool __fastcall GetShowHint(void);
int __fastcall GetTag(void);
bool __fastcall GetVisible(void);
void __fastcall SetParent(const TFlexControl* Value);
void __fastcall SetName(const AnsiString Value);
void __fastcall SetLeft(int Value);
void __fastcall SetTop(int Value);
void __fastcall SetWidth(int Value);
void __fastcall SetHeight(int Value);
void __fastcall SetID(unsigned Value);
void __fastcall SetLayer(TFlexLayer* Value);
void __fastcall SetHint(const AnsiString Value);
void __fastcall SetShowHint(bool Value);
void __fastcall SetTag(int Value);
void __fastcall SetVisible(bool Value);
void __fastcall SetIsSelected(bool Value);
Types::TRect __fastcall GetDocRect();
Types::TRect __fastcall GetPaintRect();
void __fastcall GetLayerStrProp(System::TObject* Sender, /* out */ AnsiString &Value);
TFlexControl* __fastcall GetByName(const AnsiString Name);
TFlexCustomScheme* __fastcall GetParentScheme(void);
void __fastcall SetOwner(TFlexPanel* Value);
TFlexCustomScheme* __fastcall GetRef(void);
void __fastcall SetRef(TFlexCustomScheme* Value);
Types::TPoint __fastcall GetNode(int NodeIndex);
void __fastcall SetNode(int NodeIndex, const Types::TPoint &Value);
int __fastcall GetNodeCount(void);
Flexpath::TPointType __fastcall GetNodeType(int NodeIndex);
void __fastcall SetNodeType(int NodeIndex, const Flexpath::TPointType Value);
Types::TPoint __fastcall GetLinkPoint(int Index);
int __fastcall GetLinkPointCount(void);
void __fastcall SetLinkPoint(int Index, const Types::TPoint &Value);
int __fastcall GetTransparency(void);
void __fastcall SetTransparency(const int Value);
bool __fastcall GetSelectable(void);
void __fastcall SetSelectable(const bool Value);
protected:
bool FAnchorEnabled;
#pragma pack(push, 1)
Types::TRect FSavedDocRect;
#pragma pack(pop)
#pragma pack(push, 1)
Types::TRect FLinkSavedBounds;
#pragma pack(pop)
#pragma pack(push, 1)
Types::TPoint FResizingTopLeft;
#pragma pack(pop)
#pragma pack(push, 1)
Types::TRect FResizingRect;
#pragma pack(pop)
DynamicArray<Types::TPoint > FResizingLinkPoints;
System::TObject* FUserObject;
TFlexAlphaBufferMode FPaintAlphaBufferMode;
Flexalpha::TAlphaBuffer* FPaintAlphaBuffer;
int FGroupUngroupLevel;
virtual void __fastcall InitializeControl(TFlexControl* AParent, TFlexLayer* ALayer);
virtual void __fastcall FinalizeControl(void);
virtual void __fastcall CreateProperties(void);
virtual void __fastcall ControlCreate(void);
virtual void __fastcall ControlDestroy(void);
virtual void __fastcall ControlTranslate(const Flexutils::TTranslateInfo &TranslateInfo);
void __fastcall BeginTranslate(void);
void __fastcall EndTranslate(void);
virtual void __fastcall BeginSelectionTransformation(void);
virtual void __fastcall EndSelectionTransformation(void);
virtual void __fastcall MirrorInResize(bool HMirror, bool VMirror);
virtual void __fastcall ConnectorMinGapChanged(void);
virtual void __fastcall CreateInDesign(TFlexCreateInDesignInfo &Info);
virtual TFlexControl* __fastcall CreateCurveControl(void);
virtual void __fastcall CreateCurveGuide(const Types::TPoint &NewPoint, TFlexEditPointGuide &Guide);
virtual bool __fastcall MovePathPoints(int PointIndex, Types::TPoint &Delta, Flexpath::TSelectedArray Selected, bool Smooth = false, bool Symmetric = false);
virtual bool __fastcall MovePathSegment(int FirstIndex, int NextIndex, Types::TPoint &Delta, const double SegmentCurvePos);
virtual void __fastcall DoNotify(Flexutils::TFlexNotify Notify);
virtual void __fastcall DoNeedHint(Forms::THintInfo &HintInfo, bool &IsShowHint);
virtual void __fastcall Paint(Graphics::TCanvas* Canvas, Types::TRect &PaintRect);
virtual void __fastcall PaintAll(Graphics::TCanvas* Canvas, int PaintX, int PaintY);
virtual void __fastcall StartResizing(const Types::TRect &SelRect);
virtual void __fastcall FinishResizing(void);
virtual void __fastcall PropBeforeChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
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 = "");
virtual void __fastcall PropReadOnly(System::TObject* Sender, Flexprops::TCustomProp* Prop, bool &IsReadOnly);
virtual void __fastcall PropHistoryAction(System::TObject* Sender, Flexprops::TCustomProp* Prop, TMetaClass* &ActionClass);
virtual Types::TPoint __fastcall GetAnchorPoint();
virtual void __fastcall GetLinkProps(TLinkPointProp* &LinkFirst, TLinkPointProp* &LinkLast);
virtual Types::TPoint __fastcall GetDefaultLinkPoint(int Index);
virtual int __fastcall GetDefaultLinkPointCount(void);
virtual Types::TPoint __fastcall GetPoint(int Index);
virtual void __fastcall SetPoint(int Index, const Types::TPoint &Value);
virtual Flexpath::TPointType __fastcall GetPointType(int Index);
virtual void __fastcall SetPointType(int Index, const Flexpath::TPointType Value);
virtual int __fastcall GetPointCount(void);
virtual bool __fastcall GetIsPointsClosed(void);
virtual void __fastcall SetIsPointsClosed(bool Value);
virtual Flexpath::PPathInfo __fastcall GetPointsInfo(void);
virtual void __fastcall SetDocRect(const Types::TRect &Value);
virtual bool __fastcall ValidateName(bool CheckEmpty, bool CheckUnique);
virtual Types::TRect __fastcall GetRefreshRect(int RefreshX, int RefreshY);
virtual Flexutils::TNotifyLink* __fastcall GetNotifyLink(void);
virtual void __fastcall LinkPointsTranslate(const Flexutils::TTranslateInfo &TranslateInfo);
virtual void __fastcall LinkPointsResize(const Types::TRect &OldDocRect, const Types::TRect &NewDocRect);
virtual bool __fastcall GetIsSelectable(void);
virtual bool __fastcall GetIsUngroupable(void);
__property bool NonVisual = {read=FNonVisual, write=FNonVisual, nodefault};
__property bool NoPaintRectCheck = {read=FNoPaintRectCheck, write=FNoPaintRectCheck, nodefault};
__property int TranslateCount = {read=FTranslateCount, nodefault};
public:
__fastcall virtual TFlexControl(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer);
__fastcall virtual ~TFlexControl(void);
virtual void __fastcall AfterConstruction(void);
/* class method */ static TFlexControl* __fastcall CppCreate(TMetaClass* vmt, TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer);
/* virtual class method */ virtual Controls::TCursor __fastcall CursorInCreate(TMetaClass* vmt);
/* virtual class method */ virtual bool __fastcall GetToolInfo(TMetaClass* vmt, Graphics::TBitmap* ToolIcon, AnsiString &Hint);
/* virtual class method */ virtual bool __fastcall IsConnectorControl(TMetaClass* vmt);
virtual bool __fastcall BeginUpdate(void);
virtual bool __fastcall EndUpdate(void);
virtual bool __fastcall BeginGroupUngroup(void);
virtual bool __fastcall EndGroupUngroup(void);
virtual void __fastcall Invalidate(void);
virtual int __fastcall Add(TFlexControl* AControl);
int __fastcall IndexOf(TFlexControl* AControl);
virtual void __fastcall Delete(int Index);
void __fastcall Remove(TFlexControl* AControl);
virtual void __fastcall Extract(TFlexControl* AControl);
virtual void __fastcall Clear(void);
virtual void __fastcall ChangeOrder(int CurIndex, int NewIndex);
void __fastcall ToFront(void);
void __fastcall ToBack(void);
void __fastcall ForwardOne(void);
void __fastcall BackOne(void);
virtual TFlexControl* __fastcall FindControlAtPoint(int x, int y);
TFlexControl* __fastcall FindByID(unsigned ControlID);
TFlexControl* __fastcall FindByName(const AnsiString AName);
virtual void __fastcall BeginPointsDesigning(void);
virtual void __fastcall EndPointsDesigning(void);
bool __fastcall CreatePointsPath(HDC DC);
virtual int __fastcall GetNodeIndex(int Index);
virtual int __fastcall GetPointIndex(int NodeIndex);
virtual int __fastcall InsertPoint(int Index, const Types::TPoint &Point);
virtual int __fastcall InsertCurvePoints(int Index, const Types::TPoint &Point, const Types::TPoint &CtrlPointA, const Types::TPoint &CtrlPointB);
virtual void __fastcall DeletePoint(int Index);
int __fastcall AddCurvePoints(const Types::TPoint &Point, const Types::TPoint &CtrlPointA, const Types::TPoint &CtrlPointB);
int __fastcall AddPoint(const Types::TPoint &Point);
int __fastcall InsertCurveNode(int NodeIndex, const Types::TPoint &Point, const Types::TPoint &CtrlPointA, const Types::TPoint &CtrlPointB);
void __fastcall DeleteNode(int NodeIndex);
virtual int __fastcall InsertNearestPoint(const Types::TPoint &Point);
void __fastcall EndFigure(bool Close = true);
void __fastcall SetPoints(const Flexpath::TPointArray APoints);
virtual void __fastcall SetPointsEx(const Flexpath::TPointArray APoints, const Flexpath::TPointTypeArray ATypes);
virtual void __fastcall GetPointsEx(/* out */ Flexpath::TPointArray &APoints, /* out */ Flexpath::TPointTypeArray &ATypes);
virtual bool __fastcall EditPoints(Flexpath::TPathEditFunc Func, const Flexpath::TSelectedArray Selected, Flexpath::PPathEditParams Params = (void *)(0x0));
virtual Flexpath::TPathEditFuncs __fastcall EditPointsCaps(const Flexpath::TSelectedArray Selected);
virtual bool __fastcall FlattenPoints(const float Curvature);
virtual bool __fastcall FindNearestPoint(const Types::TPoint &Point, Flexpath::TNearestPoint &Nearest);
virtual bool __fastcall FindNearestPathSegment(const Types::TPoint &Point, int &FirstIndex, int &NextIndex, Flexpath::PNearestPoint Nearest = (void *)(0x0), bool ForInsert = true, bool ForSelect = false);
Flexpath::TPointArray __fastcall GetTransformPoints(int OfsX, int OfsY, int Scale);
virtual bool __fastcall IsPointInside(int PaintX, int PaintY);
virtual int __fastcall AddLinkPoint(Types::PPoint Point);
virtual int __fastcall IndexOfLinkPoint(Types::PPoint Point);
virtual void __fastcall DeleteLinkPoint(int Index);
void __fastcall RemoveLinkPoint(Types::PPoint Point);
Types::TPoint __fastcall ClientToOwner(const Types::TPoint &Point);
Types::TPoint __fastcall OwnerToClient(const Types::TPoint &Point);
virtual void __fastcall Translate(const Flexutils::TTranslateInfo &TranslateInfo);
virtual void __fastcall SaveToFiler(Flexutils::TFlexFiler* Filer, const AnsiString Indent);
virtual void __fastcall LoadFromFiler(Flexutils::TFlexFiler* Filer);
__property TFlexPanel* Owner = {read=FOwner, write=SetOwner};
__property TFlexControl* Parent = {read=FParent, write=SetParent};
__property TFlexCustomScheme* ParentScheme = {read=GetParentScheme};
__property TFlexState State = {read=FState, nodefault};
__property TFlexLayer* Layer = {read=FLayer, write=SetLayer};
__property bool Visual = {read=GetVisual, nodefault};
__property int UpdateCounter = {read=FUpdateCounter, nodefault};
__property int PointsDesigning = {read=FPointsDesigning, nodefault};
__property Types::TRect DocRect = {read=GetDocRect, write=SetDocRect};
__property Types::TRect PaintRect = {read=GetPaintRect};
__property bool IsSelected = {read=GetIsSelected, write=SetIsSelected, nodefault};
__property bool IsSelectable = {read=GetIsSelectable, nodefault};
__property bool IsUngroupable = {read=GetIsUngroupable, nodefault};
__property int Count = {read=GetCount, nodefault};
__property TFlexControl* Controls[int Index] = {read=GetControl/*, default*/};
__property TFlexControl* ByName[AnsiString Name] = {read=GetByName};
__property Flexprops::TPropList* Props = {read=FProps};
__property bool AnchorEnabled = {read=FAnchorEnabled, nodefault};
__property Types::TPoint AnchorPoint = {read=GetAnchorPoint};
__property int PointCount = {read=GetPointCount, nodefault};
__property Types::TPoint Points[int Index] = {read=GetPoint, write=SetPoint};
__property Flexpath::TPointType PointTypes[int Index] = {read=GetPointType, write=SetPointType};
__property Flexpath::PPathInfo PointsInfo = {read=GetPointsInfo};
__property int NodeCount = {read=GetNodeCount, nodefault};
__property Types::TPoint Nodes[int NodeIndex] = {read=GetNode, write=SetNode};
__property Flexpath::TPointType NodeTypes[int NodeIndex] = {read=GetNodeType, write=SetNodeType};
__property bool IsPointsClosed = {read=GetIsPointsClosed, write=SetIsPointsClosed, nodefault};
__property int LinkPointCount = {read=GetLinkPointCount, nodefault};
__property Types::TPoint LinkPoints[int Index] = {read=GetLinkPoint, write=SetLinkPoint};
__property int DefaultLinkPointCount = {read=GetDefaultLinkPointCount, nodefault};
__property Types::TPoint DefaultLinkPoints[int Index] = {read=GetDefaultLinkPoint};
__property Flexutils::TNotifyLink* NotifyLink = {read=GetNotifyLink, write=FNotifyLink};
__property Flexprops::TStrProp* NameProp = {read=FNameProp};
__property Flexprops::TIntProp* LeftProp = {read=FLeftProp};
__property Flexprops::TIntProp* TopProp = {read=FTopProp};
__property Flexprops::TIntProp* WidthProp = {read=FWidthProp};
__property Flexprops::TIntProp* HeightProp = {read=FHeightProp};
__property Flexprops::TLongWordProp* IdProp = {read=FIdProp};
__property Flexprops::TIntProp* TagProp = {read=FTagProp};
__property Flexprops::TBoolProp* VisibleProp = {read=FVisibleProp};
__property TLayerProp* LayerProp = {read=FLayerProp};
__property Flexprops::TStrListProp* HintProp = {read=FHintProp};
__property Flexprops::TBoolProp* ShowHintProp = {read=FShowHintProp};
__property TSchemeRefProp* ReferenceProp = {read=FReferenceProp};
__property Flexprops::TIntProp* TransparencyProp = {read=FTransparencyProp};
__property Flexprops::TBoolProp* SelectableProp = {read=FSelectableProp};
__property Flexprops::TUserDataProp* UserData = {read=FUserDataProp};
__property System::TObject* UserObject = {read=FUserObject, write=FUserObject};
virtual void __fastcall BeforeDestruction(void);
__property AnsiString Name = {read=GetName, write=SetName};
__property unsigned ID = {read=GetID, write=SetID, nodefault};
__property int Tag = {read=GetTag, write=SetTag, nodefault};
__property int Left = {read=GetLeft, write=SetLeft, nodefault};
__property int Top = {read=GetTop, write=SetTop, nodefault};
__property int Width = {read=GetWidth, write=SetWidth, nodefault};
__property int Height = {read=GetHeight, write=SetHeight, nodefault};
__property bool Visible = {read=GetVisible, write=SetVisible, nodefault};
__property AnsiString Hint = {read=GetHint, write=SetHint};
__property bool ShowHint = {read=GetShowHint, write=SetShowHint, nodefault};
__property TFlexCustomScheme* Reference = {read=GetRef, write=SetRef};
__property int Transparency = {read=GetTransparency, write=SetTransparency, nodefault};
__property bool Selectable = {read=GetSelectable, write=SetSelectable, nodefault};
};
class PASCALIMPLEMENTATION TFlexServiceControl : public TFlexControl
{
typedef TFlexControl inherited;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -