FireMonkey图形控件继承关系

FireMonkey 的控件都是自己绘制的(而不是基于系统组件), 我想它们应该是基于一些基本图形; 就从基本图形开始吧.

FMX.Objects 单元给出的类:


TShape //基本图形的基类
TLine
TRectangle
TRoundRect
TCalloutRectangle
TEllipse
TCircle
TPie
TArc
TPath
TText

TImage
TPaintBox
TSelection
TSelectionPoint


添加一个 TRectangle, 先纵观一下它的可用功能:


{ TRectangle }
  public
    constructor Create(AOwner: TComponent); override;
  published
    property Fill;
    property Stroke;
    property StrokeCap;
    property StrokeDash;
    property StrokeJoin;
    property StrokeThickness;
    property XRadius: Single read FXRadius write SetXRadius;
    property YRadius: Single read FYRadius write SetYRadius;
    property Corners: TCorners read FCorners write SetCorners stored IsCornersStored;
    property CornerType: TCornerType read FCornerType write SetCornerType default TCornerType.ctRound;
    property Sides: TSides read FSides write SetSides stored IsSidesStored;

{ TRectangle 的父类 TShape }
  protected
    procedure FillChanged(Sender: TObject); virtual;
    procedure StrokeChanged(Sender: TObject); virtual;
    function GetShapeRect: TRectF;
    procedure Painting; override;
    procedure AfterPaint; override;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    property Fill: TBrush read FFill write SetFill;
    property Stroke: TBrush read FStroke write SetStroke;
    property StrokeThickness: Single read FStrokeThickness write SetStrokeThickness stored IsStrokeThicknessStored;
    property StrokeCap: TStrokeCap read FStrokeCap write SetStrokeCap default TStrokeCap.scFlat;
    property StrokeDash: TStrokeDash read FStrokeDash write SetStrokeDash default TStrokeDash.sdSolid;
    property StrokeJoin: TStrokeJoin read FStrokeJoin write SetStrokeJoin default TStrokeJoin.sjMiter;
    property ShapeRect: TRectF read GetShapeRect;

{ TShape 的父类 TControl(来自 FMX.Types) }
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure AddObject(AObject: TFmxObject); override;
    procedure RemoveObject(AObject: TFmxObject); override;
    procedure SetNewScene(AScene: IScene); virtual;
    procedure SetBounds(X, Y, AWidth, AHeight: Single); virtual;
    { matrix }
    function AbsoluteToLocal(P: TPointF): TPointF; virtual;
    function LocalToAbsolute(P: TPointF): TPointF; virtual;
    function AbsoluteToLocalVector(P: TVector): TVector; virtual;
    function LocalToAbsoluteVector(P: TVector): TVector; virtual;
    function PointInObject(X, Y: Single): Boolean; virtual;
    { optimizations }
    procedure RecalcUpdateRect; virtual;
    procedure RecalcNeedAlign; virtual;
    procedure RecalcOpacity; virtual;
    procedure RecalcAbsolute; virtual;
    procedure RecalcEnabled; virtual;
    procedure RecalcHasEffect; virtual;
    { drag and drop }
    function MakeScreenshot: TBitmap;
    { caret }
    procedure ShowCaretProc;
    procedure SetCaretPos(const APoint: TPointF);
    procedure SetCaretSize(const ASize: TPointF);
    procedure SetCaretColor(const AColor: TAlphaColor);
    procedure HideCaret;
    { align }
    procedure BeginUpdate; virtual;
    procedure EndUpdate; virtual;
    procedure Realign; virtual;
    { paining }
    procedure ApplyEffect;
    procedure Painting; virtual;
    procedure DoPaint; virtual;
    procedure AfterPaint; virtual;
    { effects }
    procedure UpdateEffects;
    { }
    procedure SetFocus;
    procedure PaintTo(const ACanvas: TCanvas; const ARect: TRectF; const AParent: TFmxObject = nil);
    procedure Repaint;
    procedure InvalidateRect(ARect: TRectF);
    procedure Lock;
    property AbsoluteMatrix: TMatrix read GetAbsoluteMatrix;
    property AbsoluteOpacity: Single read GetAbsoluteOpacity;
    property AbsoluteWidth: Single read GetAbsoluteWidth;
    property AbsoluteHeight: Single read GetAbsoluteHeight;
    property AbsoluteScale: TPointF read GetAbsoluteScale;
    property AbsoluteEnabled: Boolean read GetAbsoluteEnabled;
    property HasEffect: Boolean read GetAbsoluteHasEffect;
    property HasDisablePaintEffect: Boolean read GetAbsoluteHasDisablePaintEffect;
    property HasAfterPaintEffect: Boolean read GetAbsoluteHasAfterPaintEffect;
    property ChildrenRect: TRectF read GetChildrenRect;
    property InvertAbsoluteMatrix: TMatrix read GetInvertAbsoluteMatrix;
    property InPaintTo: Boolean read FInPaintTo;
    property LocalRect: TRectF read GetLocalRect;
    property AbsoluteRect: TRectF read GetAbsoluteRect;
    property UpdateRect: TRectF read GetUpdateRect;
    property BoundsRect: TRectF read GetBoundsRect write SetBoundsRect;
    property ParentedRect: TRectF read GetParentedRect;
    property ParentedVisible: Boolean read GetParentedVisible;
    property ClipRect: TRectF read GetClipRect;
    property Canvas: TCanvas read GetCanvas;
    property Scene: IScene read FScene;
    property AutoCapture: Boolean read FAutoCapture write FAutoCapture default False;
    property CanFocus: Boolean read FCanFocus write FCanFocus default False;
    property DisableFocusEffect: Boolean read FDisableFocusEffect write FDisableFocusEffect default False;
    property DisableDefaultAlign: Boolean read FDisableDefaultAlign write FDisableDefaultAlign;
    property TabOrder: TTabOrder read GetTabOrder write SetTabOrder default -1;
  published
    { triggers }
    property IsMouseOver: Boolean read FIsMouseOver;
    property IsDragOver: Boolean read FIsDragOver;
    property IsFocused: Boolean read FIsFocused;
    property IsVisible: Boolean read FVisible;
    { props }
    property Align: TAlignLayout read FAlign write SetAlign default TAlignLayout.alNone;
    property Cursor: TCursor read GetCursor write SetCursor default crDefault;
    property DragMode: TDragMode read GetDragMode write SetDragMode default TDragMode.dmManual;
    property EnableDragHighlight: Boolean read FEnableDragHighlight write FEnableDragHighlight default True;
    property Enabled: Boolean read FEnabled write SetEnabled default True;
    property Position: TPosition read FPosition write SetPosition;
    property RotationAngle: Single read FRotationAngle write SetRotationAngle;
    property RotationCenter: TPosition read FRotationCenter write FRotationCenter;
    property Locked: Boolean read FLocked write SetLocked default False;
    property Width: Single read FWidth write SetWidth;
    property Height: Single read FHeight write SetHeight;
    property Margins: TBounds read FMargins write FMargins;
    property Padding: TBounds read FPadding write FPadding;
    property Opacity: Single read FOpacity write SetOpacity stored IsOpacityStored;
    property ClipChildren: Boolean read FClipChildren write SetClipChildren default False;
    property ClipParent: Boolean read FClipParent write FClipParent default False;
    property HitTest: Boolean read FHitTest write SetHitTest default True;
    property CanClip: Boolean read FCanClip write FCanClip default True;
    property PopupMenu: TCustomPopupMenu read FPopupMenu write SetPopupMenu;
    property Scale: TPosition read FScale write FScale;
    property Visible: Boolean read FVisible write SetVisible default True;
    property DesignVisible: Boolean read FDesignVisible write SetDesignVisible default True;
    property OnDragEnter: TDragEnterEvent read FOnDragEnter write FOnDragEnter;
    property OnDragLeave: TNotifyEvent read FOnDragLeave write FOnDragLeave;
    property OnDragOver: TDragOverEvent read FOnDragOver write FOnDragOver;
    property OnDragDrop: TDragDropEvent read FOnDragDrop write FOnDragDrop;
    property OnDragEnd: TNotifyEvent read FOnDragEnd write FOnDragEnd;
    property OnKeyDown: TKeyEvent read FOnKeyDown write FOnKeyDown;
    property OnKeyUp: TKeyEvent read FOnKeyUp write FOnKeyUp;
    property OnClick: TNotifyEvent read FOnClick write FOnClick;
    property OnDblClick: TNotifyEvent read FOnDblClick write FOnDblClick;
    property OnCanFocus: TCanFocusEvent read FOnCanFocus write FOnCanFocus;
    property OnEnter: TNotifyEvent read FOnEnter write FOnEnter;
    property OnExit: TNotifyEvent read FOnExit write FOnExit;
    property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown;
    property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove;
    property OnMouseUp: TMouseEvent read FOnMouseUp write FOnMouseUp;
    property OnMouseWheel: TMouseWheelEvent read FOnMouseWheel write FOnMouseWheel;
    property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
    property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;
    property OnPainting: TOnPaintEvent read FOnPainting write FOnPainting;
    property OnPaint: TOnPaintEvent read FOnPaint write FOnPaint;
    property OnResize: TNotifyEvent read FOnResize write FOnResize;
    property OnApplyStyleLookup: TNotifyEvent read FOnApplyStyleLookup write FOnApplyStyleLookup;

{ TControl 的父类 TFmxObject (来自 FMX.Types) }
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure Release(Delay: Single = 0.1);
    { check for support interface }
    function IsIControl: Boolean;
    function AsIControl: IControl;
    procedure SetRoot(ARoot: IRoot);
    { design }
    procedure SetDesign(Value: Boolean; SetChildren: Boolean = True);
    function ItemClass: string; virtual;
    { clone }
    function Clone(const AOwner: TComponent): TFmxObject;
    procedure CloneChildFromStream(AStream: TStream);
    { childs }
    procedure AddObject(AObject: TFmxObject); virtual;
    procedure InsertObject(Index: Integer; AObject: TFmxObject); virtual;
    procedure RemoveObject(AObject: TFmxObject); overload; virtual;
    procedure RemoveObject(Index: Integer); overload; virtual;
    procedure Exchange(AObject1, AObject2: TFmxObject); virtual;
    procedure DeleteChildren; virtual;
    procedure BringToFront;
    procedure SendToBack;
    procedure AddObjectsToList(const AList: TList);
    procedure AddControlsToList(const AList: TList);
    procedure Sort(Compare: TFmxObjectSortCompare); virtual;
    { notify }
    procedure AddFreeNotify(const AObject: IFreeNotification);
    procedure RemoveFreeNotify(const AObject: IFreeNotification);
    { tab }
    procedure GetTabOrderList(const List: TList; AChildren: Boolean);
    { i/o }
    procedure LoadFromStream(const AStream: TStream);
    procedure SaveToStream(const Stream: TStream);
    procedure LoadFromBinStream(const AStream: TStream);
    procedure SaveToBinStream(const AStream: TStream);
    { resource }
    function FindStyleResource(const AStyleLookup: string): TFmxObject; virtual;
    procedure UpdateStyle; virtual;
    { animations }
    procedure StartAnimation(const AName: string); virtual;
    procedure StopAnimation(const AName: string); virtual;
    procedure StartTriggerAnimation(AInstance: TFmxObject; const ATrigger: string); virtual;
    procedure StartTriggerAnimationWait(AInstance: TFmxObject; const ATrigger: string); virtual;
    procedure StopTriggerAnimation(AInstance: TFmxObject); virtual;
    procedure ApplyTriggerEffect(AInstance: TFmxObject; const ATrigger: string); virtual;
    { animation property }
    procedure AnimateFloat(const APropertyName: string; const NewValue: Single; Duration: ...);
    procedure AnimateColor(const APropertyName: string; NewValue: TAlphaColor; Duration: ...);
    procedure AnimateFloatDelay(const APropertyName: string; const NewValue: Single; Duration: ...);
    procedure AnimateFloatWait(const APropertyName: string; const NewValue: Single; Duration: ...);
    procedure StopPropertyAnimation(const APropertyName: string);
    { }
    property Root: IRoot read FRoot;
    property Stored: Boolean read FStored write SetStored;
    { }
    property TagObject: TObject read FTagObject write FTagObject;
    property TagFloat: Single read FTagFloat write FTagFloat;
    property TagString: string read FTagString write FTagString;
    { children }
    property ChildrenCount: Integer read GetChildrenCount;
    property Children[Index: Integer]: TFmxObject read GetChild;
    { binding }
    function FindBinding(const ABinding: string): TFmxObject;
    property Data: Variant read GetData write SetData;
    property Binding[const Index: string]: Variant read GetBinding write SetBinding;
    property Parent: TFmxObject read FParent write SetParent;
    property Index: Integer read GetIndex write SetIndex;
  published
    property BindingName: string read FBindingName write SetBindingName;
    property StyleName: string read FStyleName write SetStyleName;

{ TFmxObject 的父类 TComponent (来自 System.Classes), 到这里不新鲜了 }
  public
    constructor Create(AOwner: TComponent); virtual;
    destructor Destroy; override;
    procedure BeforeDestruction; override;
    procedure DestroyComponents;
    procedure Destroying;
    function ExecuteAction(Action: TBasicAction): Boolean; dynamic;
    function FindComponent(const AName: string): TComponent;
    procedure FreeNotification(AComponent: TComponent);
    procedure RemoveFreeNotification(AComponent: TComponent);
    procedure FreeOnRelease;
    function GetEnumerator: TComponentEnumerator;
    function GetParentComponent: TComponent; dynamic;
    function GetNamePath: string; override;
    function HasParent: Boolean; dynamic;
    procedure InsertComponent(AComponent: TComponent);
    procedure RemoveComponent(AComponent: TComponent);
    procedure SetSubComponent(IsSubComponent: Boolean);
    function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; override;
    function UpdateAction(Action: TBasicAction): Boolean; virtual;
    function IsImplementorOf(const I: IInterface): Boolean;
    function ReferenceInterface(const I: IInterface; Operation: TOperation): Boolean;
    property ComObject: IUnknown read GetComObject;
    property Components[Index: Integer]: TComponent read GetComponent;
    property ComponentCount: Integer read GetComponentCount;
    property ComponentIndex: Integer read GetComponentIndex write SetComponentIndex;
    property ComponentState: TComponentState read FComponentState;
    property ComponentStyle: TComponentStyle read FComponentStyle;
    property DesignInfo: Longint read FDesignInfo write FDesignInfo;
    property Owner: TComponent read FOwner;
    property VCLComObject: Pointer read FVCLComObject write FVCLComObject;
    property Observers: TObservers read GetObservers;
  published
    property Name: TComponentName read FName write SetName stored False;
    property Tag: NativeInt read FTag write FTag default 0;

{ TComponent 的父类 TPersistent (来自 System.Classes) }
  public
    destructor Destroy; override;
    procedure Assign(Source: TPersistent); virtual;
    function GetNamePath: string; dynamic;

{ TPersistent 的父类 TObject (来自 System) }
  public
    constructor Create;
    procedure Free;
    class function InitInstance(Instance: Pointer): TObject;
    procedure CleanupInstance;
    function ClassType: TClass; inline;
    class function ClassName: string;
    class function ClassNameIs(const Name: string): Boolean;
    class function ClassParent: TClass;
    class function ClassInfo: Pointer; inline;
    class function InstanceSize: Longint; inline;
    class function InheritsFrom(AClass: TClass): Boolean;
    class function MethodAddress(const Name: ShortString): Pointer; overload;
    class function MethodAddress(const Name: string): Pointer; overload;
    class function MethodName(Address: Pointer): string;
    class function QualifiedClassName: string;
    function FieldAddress(const Name: ShortString): Pointer; overload;
    function FieldAddress(const Name: string): Pointer; overload;
    function GetInterface(const IID: TGUID; out Obj): Boolean;
    class function GetInterfaceEntry(const IID: TGUID): PInterfaceEntry;
    class function GetInterfaceTable: PInterfaceTable;
    class function UnitName: string;
    class function UnitScope: string;
    function Equals(Obj: TObject): Boolean; virtual;
    function GetHashCode: Integer; virtual;
    function ToString: string; virtual;
    function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; virtual;
    procedure AfterConstruction; virtual;
    procedure BeforeDestruction; virtual;
    procedure Dispatch(var Message); virtual;
    procedure DefaultHandler(var Message); virtual;
    class function NewInstance: TObject; virtual;
    procedure FreeInstance; virtual;
    destructor Destroy; virtual;


FireMonkey图形控件继承关系

时间: 2024-12-22 14:17:34

FireMonkey图形控件继承关系的相关文章

JavaFX 初学入门(一):FXML嵌套与原始控件继承

说明 之前由于做一个小项目需要用swing,结果swing把我折腾的够呛.后来得知有javaFX这个类似于C#中WPF形式的利用XML来写界面的框架之后,马上就转到javaFX上了.找过一些资料但是帮助都不大,最后还是选择直接看官方demo.(我之前是做过android app,有些东西其实都是差不多的.) 下面选取官方demo中的一个 UnlockCustom . 这个demo中涉及到 继承原始控件(自定义),FXML 布局嵌套,以及一些控件动画等. 一.javaFX的入口函数 整个javaF

TControl.GetDeviceContext会给图形控件建立新的坐标原点和建立新的剪裁区域

这是取得DC句柄的其中一种方法(会重定义原点和建立新的剪裁区): function TControl.GetDeviceContext(var WindowHandle: HWnd): HDC; begin if Parent = nil then raise EInvalidOperation.CreateFmt(SParentRequired, [Name]); Result := Parent.GetDeviceContext(WindowHandle); SetViewportOrgEx

cad动态的2D/3D图形控件VectorDraw Developer Framework (VDF)

VectorDraw Developer Framework (VDF)为您的应用程序增加动态的2D/3D图形.是一个可轻松创建爱你和管理及打印2D和3D图形的构件. 其对象可显示与大多数公共矢量格式和其他CAD对象兼容的方法和属性. 支持10多种矢量格式和多种离散格式.VectorDraw Developer Framework (VDF) 是完全基于对象的和支持 .NET 2的. 此构件是用.NET 2005 C# 代码写成的. 同时还提供了一个ActiveX组件. 此ActiveX组件为旧

在MFC程序中使用AnyCAD图形控件

AnyCAD图形控件有.Net版本和C++两个版本,使用C++要比C#稍微繁杂一点.SDK中提供了针对MFC的文档视图的封装,只需改一下几个基类即可. 准备 VS2010 下载C++版本的AnyCAD图形控件:http://pan.baidu.com/s/1c06hmPa 项目设置 $(AnyCADSDK)替换为您的工程相对于AnyCAD C++ SDK的位置,您也可以把AnyCADSDK加到环境变量中. 头文件 $(AnyCADSDK)\inc Lib查找目录 $(AnyCADSDK)\lib

多比(SVG/VML)图形控件多比(SVG/VML)图形控件免费下载

多比图形控件是一款基于Web(VML和SVG技术)的矢量图形控件, 类似于网页上的Visio控件,是目前国内外最佳的基于web的工作流设计器.工作流流程监视器解决方案. 可广泛应用于包括:电力.军工.煤炭.化工.科研.能源等各种监控软件.web工作流设计器.asp.net工作流设计器.电力.化工.煤炭.工控组态软件.仿真.地理信息系统.工作流.复杂报表 工业SCADA系统.ERP流程设计系统.图形管理.图形拓扑分析.GIS地理信息系统系统.工程制图等领域.目前已经为全球20多个国家的数千家客户采

[改善] dcef3 for Firemonkey 浏览器控件,拉动窗体大小会闪烁的问题

问题:dcef3 for Firemonkey 浏览器控件,拉动窗体大小会闪烁的问题 修改源码:ceffmx.pas 找到 procedure TCustomChromiumFMX.Resize; 修改如下: procedure TCustomChromiumFMX.Resize; var brws: ICefBrowser; b: TBitmap; begin inherited; if not (csDesigning in ComponentState) then begin brws :

多比(SVG/VML)图形控件多比(SVG/VML)图形拓扑图控件免费下载地址

多比图形控件是一款基于Web(VML和SVG技术)的矢量图形控件, 类似于网页上的Visio控件拓扑图软件,是目前国内外最佳的基于web的工作流设计器.工作流流程监视器解决方案. 可广泛应用于包括:电力.军工.煤炭.化工.科研.能源等各种监控软件.web工作流设计器.asp.net工作流设计器.电力.化工.煤炭.工控组态软件.仿真.地理信息系统.工作流.复杂报表 工业SCADA系统.ERP流程设计系统.图形管理.图形拓扑分析.GIS地理信息系统系统.工程制图等领域.目前已经为全球20多个国家的数

多比(SVG/VML)图形控件拓扑图控件免费下载

多比图形控件是一款基于Web(VML和SVG技术)的矢量图形拓扑图控件, 类似于网页上的Visio控件,是目前国内外最佳的基于web的工作流设计器.工作流流程监视器解决方案. 可广泛应用于包括:电力.军工.煤炭.化工.科研.能源等各种监控软件.web工作流设计器.asp.net工作流设计器.电力.化工.煤炭.工控组态软件.仿真.地理信息系统.工作流.复杂报表 工业SCADA系统.ERP流程设计系统.图形管理.图形拓扑分析.GIS地理信息系统系统.工程制图等领域.目前已经为全球20多个国家的数千家

LightningChart 图形控件 被应用于光学项目当中

LightningChart图形控件彻底发挥了GPU加速和性能优化的最大效应,能够实时呈现超过10亿数据点的庞大数据.广泛应用于科研.工程.医疗.航空.贸易.金融.能源和许多其他领域的实时测量和分析应用等等. 原文地址:https://www.cnblogs.com/highcharts/p/9322618.html