熠轩 發表於 2021-3-16 17:01:00

深入Delphi FMX从FMX.Types开始(一、原理)

<p>深入Delphi FMX从FMX.Types开始(一、原理)</p>
<p>一、FMX.Types中那些个有用的东西(倒序),你们记着晃一眼及时用哟</p>
<p>1.001、虚拟键盘相关(2083、572行次)</p>
<p>1.002、共享内容个克隆缓存中的属性相关(2090行次)</p>
<p>1.003、Caret及其光标闪烁相关(2071、872行次),&nbsp; TFlasherInterval = -1..1000;</p>
<p>1.004、Screen屏幕显示区域和边界相关(2048行次)</p>
<p>1.005、TFmxObject及泛型的枚举过滤器相关(2014行次)</p>
<p>1.006、全局的系统空闲消息类相关(2045行次),你可以用它去实现系统空闲消息的发布、订阅和监听</p>
<p>1.007、移除字符串中的&amp;符号但保留原始位置及格式相关(2010行次)</p>
<p>1.008、提供debug调试消息的静态方法日志输出相关(1940行次)</p>
<p>1.009、元素为TAlignLayout的全局布局TAnchors数组变量,已枚举各种可能的情况进行赋值(1836行次),可用于遍历或枚举</p>
<p>1.010、注册FMX类为持久类相关(1831行次)</p>
<p>1.011、忽略ARC引用计数并强制释放对象:将AObject赋值为nil,从内存地址中清除(1829行次)</p>
<p>1.012、判断并捕获FMX应用的句柄是否有效相关(1826行次),&nbsp;TFmxHandle = THandle;&nbsp; THandle = NativeUInt;&nbsp;&nbsp;Result := (Hnd &lt;&gt; 0);</p>
<p>1.013、FMX文字语言及翻译类相关(1496、1784及1802行次)</p>
<p>1.014、动态计算并部署FMX对象Align布局的相关方法(1790行次)</p>
<p>1.015、动态维护StyleLookup的相关方法(1773行次)</p>
<p>1.016、FMX中的TPixelFormat像素格式、颜色及其转化的相关方法(1756行次)</p>
<p>1.017、FMX中的持久类TPersistent相关的维护接口(1700行次)</p>
<p>1.018、FMX中的TGuillotineBinPack矩形区域截取类相关(1594行次)</p>
<p>1.019、FMX中的线条的索引及长短的捕获类相关(1566行次)</p>
<p>1.020、FMX内置的TTimer毫秒计时器及其计时接口服务相关(1530行次)</p>
<p>1.021、FMX的弹出菜单PopupMenu相关(1243行次)</p>
<p>1.022、FMX的TTabList类及其接口相关(1219、676行次)</p>
<p>&nbsp;1.023、通过StyleName快速访问FMX对象的相关类(1034行次)</p>
<p>1.024、TEnumProcResult枚举过程结果的全局枚举类型(1031行次)</p>
<p>1.025、FMX对象TFmxObject相关类(1053行次)</p>
<p>1.026、FMX对象列表类TFmxObjectList及其子对象TFmxChildrenList的枚举列表类、FMX对象间的比较匿名函数的参照全局类(1053行次)</p>
<p>1.027、FMX对象的位置、纵横比、旋转的外观转化的本地持久类(967行次)</p>
<p>1.028、FMX曲线类TSpline(699行次)</p>
<p>1.029、FMX中Items类型等容器接口(669行次)</p>
<p>&nbsp;1.030、FMX原生控件的句柄接口(555行次)</p>
<p>1.031、FMX对象及其子对象重新布局接口IAlignRoot(549行次)</p>
<p>1.032、FMX对象的IRoot祖先根节点接口(524行次)</p>
<p>1.033、FMX对象嵌套的内容捕获接口(407行次)</p>
<p>1.034、FMX控件的行为的释放通知接口(430行次),比如焦点等等各种事件</p>
<p>1.035、FMX的其它与布局和显示相关的基础常量和枚举类型(193、74行次)</p>
<p>&nbsp;</p>
<p>深入Delphi FMX从FMX.Types开始(一、原理)<br>Delphi中System.Types和FMX.Types和Androidapi.JNI.JavaTypes等平台属性的对应关系:</p>
<p>Androidapi.JNI.JavaTypes等平台属性======》FMX.Types======》System.Types====》System.TypInfo</p>
<p>一、FMX.Types中那些个有用的东西(倒序),你们记着晃一眼及时用哟<br>1.001、虚拟键盘相关(2083、572行次)<br> <br>type<br>TShowVirtualKeyboard = procedure (const Displayed: boolean;<br>                                    const Caret: TCustomCaret;<br>                                    var VirtualKeyboardState: TVirtualKeyboardStates);<br> <br>procedure RegisterShowVKProc(const ShowVirtualKeyboard: TShowVirtualKeyboard);<br> <br>type<br>TKeyKind = (Usual, Functional, Unknown);<br> <br>TKeyKindHelper = record helper for TKeyKind<br>TVirtualKeyboardType = (Default, NumbersAndPunctuation, NumberPad, PhonePad, Alphabet, URL, NamePhonePad,<br>    EmailAddress, DecimalNumberPad);<br> <br>TVirtualKeyboardTypeHelper = record helper for TVirtualKeyboardType<br>const<br>    vktDefault = TVirtualKeyboardType.Default deprecated 'Use TVirtualKeyboardType.Default';<br>    vktNumbersAndPunctuation = TVirtualKeyboardType.NumbersAndPunctuation deprecated 'Use TVirtualKeyboardType.NumbersAndPunctuation';<br>    vktNumberPad = TVirtualKeyboardType.NumberPad deprecated 'Use TVirtualKeyboardType.NumberPad';<br>    vktPhonePad = TVirtualKeyboardType.PhonePad deprecated 'Use TVirtualKeyboardType.PhonePad';<br>    vktAlphabet = TVirtualKeyboardType.Alphabet deprecated 'Use TVirtualKeyboardType.Alphabet';<br>    vktURL = TVirtualKeyboardType.URL deprecated 'Use TVirtualKeyboardType.URL';<br>    vktNamePhonePad = TVirtualKeyboardType.NamePhonePad deprecated 'Use TVirtualKeyboardType.NamePhonePad';<br>    vktEmailAddress = TVirtualKeyboardType.EmailAddress deprecated 'Use TVirtualKeyboardType.EmailAddress';<br>end;<br> <br>TVirtualKeyboardState = (AutoShow, Visible, Error, Transient);<br> <br>TVirtualKeyboardStateHelper = record helper for TVirtualKeyboardState<br>const<br>    vksAutoShow = TVirtualKeyboardState.AutoShow deprecated 'Use TVirtualKeyboardState.AutoShow';<br>    vksVisible = TVirtualKeyboardState.Visible deprecated 'Use TVirtualKeyboardState.Visible';<br>    vksError = TVirtualKeyboardState.Error deprecated 'Use TVirtualKeyboardState.Error';<br>    vksTransient = TVirtualKeyboardState.Transient deprecated 'Use TVirtualKeyboardState.Transient';<br>end;<br> <br>TVirtualKeyboardStates = set of TVirtualKeyboardState;<br> <br>TReturnKeyType = (Default, Done, Go, Next, Search, Send);<br> <br>TReturnKeyTypeHelper = record helper for TReturnKeyType<br>const<br>    rktDefault = TReturnKeyType.Default deprecated 'Use TReturnKeyType.Default';<br>    rktDone = TReturnKeyType.Done deprecated 'Use TReturnKeyType.Done';<br>    rktGo = TReturnKeyType.Go deprecated 'Use TReturnKeyType.Go';<br>    rktNext = TReturnKeyType.Next deprecated 'Use TReturnKeyType.Next';<br>    rktSearch = TReturnKeyType.Search deprecated 'Use TReturnKeyType.Search';<br>    rktSend = TReturnKeyType.Send deprecated 'Use TReturnKeyType.Send';<br>end;<br> <br>IVirtualKeyboardControl = interface<br>    ['{41127080-97FC-4C30-A880-AB6CD351A6C4}']<br>    procedure SetKeyboardType(Value: TVirtualKeyboardType);<br>    function GetKeyboardType: TVirtualKeyboardType;<br>    property KeyboardType: TVirtualKeyboardType read GetKeyboardType write SetKeyboardType;<br>    //<br>    procedure SetReturnKeyType(Value: TReturnKeyType);<br>    function GetReturnKeyType: TReturnKeyType;<br>    property ReturnKeyType: TReturnKeyType read GetReturnKeyType write SetReturnKeyType;<br>    //<br>    function IsPassword: Boolean;<br>end;<br>&nbsp;</p>
<p>1.002、共享内容个克隆缓存中的属性相关(2090行次)<br> <br> <br>var<br>SharedContext: TRttiContext;<br>ClonePropertiesCache: TDictionary&lt;string, TList&lt;TRttiProperty&gt;&gt;;<br> <br>1.003、Caret及其光标闪烁相关(2071、872行次),&nbsp; TFlasherInterval = -1..1000;<br> <br>/// &lt;summary&gt;Registers the flasher class for the TCustomCaret object specified<br>/// in the CaretClass parameter.&lt;/summary&gt;<br>procedure RegisterFlasherClass(const FlasherClass: TFmxObjectClass; const CaretClass: TCaretClass);<br>/// &lt;summary&gt;Returns the class of a flasher registered for the TCustomCaret<br>/// object specified in the CaretClass parameter.&lt;/summary&gt;<br>function FlasherClass(const CaretClass: TCaretClass): TFmxObjectClass;<br>/// &lt;summary&gt;Returns the flasher object registered for the TCustomCaret object<br>/// specified in the CaretClass parameter.&lt;/summary&gt;<br>function Flasher(const CaretClass: TCaretClass): TFmxObject;<br>/// &lt;summary&gt;Checks whether a flasher is registered for the TCustomCaret object<br>/// specified in the CaretClass parameter.&lt;/summary&gt;<br>function AssignedFlasher(const CaretClass: TCaretClass): boolean;<br> <br>TCaretDisplayChanged = procedure (Sender: TCustomCaret; const VirtualKeyboardState: TVirtualKeyboardStates) of object;<br> <br>TCaretClass = class of TCustomCaret;<br> <br>TCustomCaret = class (TPersistent)<br>private<br>    FOwner: TFMXObject;<br>    FIControl: IControl;<br>    FVisible: Boolean;<br>    FDisplayed: Boolean;<br>    FTemporarilyHidden: Boolean;<br>    FChanged: Boolean;<br>    FUpdateCount: Integer;<br>    FOnDisplayChanged: TCaretDisplayChanged;<br>    FColor: TAlphaColor;<br>    FDefaultColor: TAlphaColor;<br>    FPos: TPointF;<br>    FSize: TSizeF;<br>    FInterval: TFlasherInterval;<br>    FReadOnly: Boolean;<br>    procedure SetColor(const Value: TAlphaColor);<br>    procedure SetPos(const Value: TPointF);<br>    procedure SetSize(const Value: TSizeF);<br>    procedure SetTemporarilyHidden(const Value: boolean);<br>    procedure SetVisible(const Value: Boolean);<br>    procedure SetInterval(const Value: TFlasherInterval);<br>    procedure SetReadOnly(const Value: boolean);<br>    procedure StartTimer;<br>    function GetWidth: Word;<br>    procedure SetWidth(const Value: Word);<br>    function GetFlasher: IFlasher;<br>    procedure SetDefaultColor(const Value: TAlphaColor);<br>protected<br>    function GetOwner: TPersistent; override;<br>    procedure DoDisplayChanged(const VirtualKeyboardState: TVirtualKeyboardStates); virtual;<br>    procedure DoUpdateFlasher; virtual;<br>public<br>    constructor Create(const AOwner: TFMXObject); virtual;<br>    destructor Destroy; override;<br>    procedure Assign(Source: TPersistent); override;<br>    /// &lt;summary&gt;<br>    ///   hide the caret<br>    /// &lt;/summary&gt;<br>    procedure Hide; virtual;<br>    /// &lt;summary&gt;<br>    ///   if possible (CanShow = True and Visible = True), the caret show.<br>    /// &lt;/summary&gt;<br>    procedure Show; virtual;<br>    /// &lt;summary&gt;<br>    ///   This method is performed after changing the Displayed<br>    /// &lt;/summary&gt;<br>    property Pos: TPointF read FPos write SetPos;<br>    property Size: TSizeF read FSize write SetSize;<br>    property Color: TAlphaColor read FColor write SetColor default TAlphaColorRec.Null;<br>    property DefaultColor: TAlphaColor read FDefaultColor write SetDefaultColor;<br>    property Interval: TFlasherInterval read FInterval write SetInterval default 0;<br>    property Owner: TFMXObject read FOwner;<br>    property Control: IControl read FIControl;<br>    procedure BeginUpdate;<br>    procedure EndUpdate;<br>    class function FlasherName: string; virtual; abstract;<br>    property UpdateCount: integer read FUpdateCount;<br>    /// &lt;summary&gt;<br>    ///   The update of the "Flasher", if UpdateCount = 0.<br>    /// &lt;/summary&gt;<br>    procedure UpdateFlasher;<br>    /// &lt;summary&gt;<br>    ///   This property controls the visibility of a caret, for the control in which the input focus.<br>    /// &lt;/summary&gt;<br>    property Visible: Boolean read FVisible write SetVisible;<br>    /// &lt;summary&gt;<br>    ///   The function returns true, if the control is visible, enabled,<br>    ///   has the input focus and it in an active form<br>    /// &lt;/summary&gt;<br>    function CanShow: Boolean; virtual;<br>    /// &lt;summary&gt;<br>    ///   This property is set to True, after the successful execution of<br>    ///   method Show, and is set to False after method Hide<br>    /// &lt;/summary&gt;<br>    property Displayed: Boolean read FDisplayed;<br>    /// &lt;summary&gt;<br>    ///   If this property is 'true', the blinking control is invisible<br>    ///   and does not take values of Visible, Displayed.<br>    ///   When you change the properties, methods DoShow, DoHide, DoDisplayChanged not met.<br>    /// &lt;/summary&gt;<br>    property TemporarilyHidden: boolean read FTemporarilyHidden write SetTemporarilyHidden;<br>    /// &lt;summary&gt;<br>    ///   Blinking visual component is displayed.<br>    ///   Usually this line, having a thickness of one or two pixels.<br>    /// &lt;/summary&gt;<br>    property Flasher: IFlasher read GetFlasher;<br>    property ReadOnly: boolean read FReadOnly write SetReadOnly;<br>    property Width: Word read GetWidth write SetWidth default 0;<br> <br>    property OnDisplayChanged: TCaretDisplayChanged read FOnDisplayChanged write FOnDisplayChanged;<br>end;<br>&nbsp;</p>
<p>1.004、Screen屏幕显示区域和边界相关(2048行次)<br> <br>TDisplay = record<br> <br>1.005、TFmxObject及泛型的枚举过滤器相关(2014行次)<br> <br>type<br>TEnumerableFilter&lt;F; T: TFmxObject&gt; = class(TEnumerable&lt;T&gt;)<br>public<br>    constructor Create(const FullEnum: TEnumerable&lt;F&gt;; SelfDestruct: Boolean = False; const Pred: TPredicate&lt;T&gt; = nil);<br>    class function Filter(const Src: TEnumerable&lt;F&gt;; const Predicate: TPredicate&lt;T&gt; = nil): TEnumerableFilter&lt;F,T&gt;;<br> <br>type<br>    TFilterEnumerator = class(TEnumerator&lt;T&gt;)<br>    public<br>      constructor Create(const Enumerable: TEnumerable&lt;F&gt;; const Cleanup: TEnumerableFilter&lt;F,T&gt;;<br>      const Pred: TPredicate&lt;T&gt;);<br>      destructor Destroy; override;<br>      property Current: T read GetCurrent;<br>      function MoveNext: Boolean;<br>    end;<br>end;<br>1.006、全局的系统空闲消息类相关(2045行次),你可以用它去实现系统空闲消息的发布、订阅和监听<br>TIdleMessage = class(System.Messaging.TMessage)<br>1.007、移除字符串中的&amp;符号但保留原始位置及格式相关(2010行次)<br>//但保留原始位置及格式<br>function DelAmp(const AText: string): string<br>1.008、提供debug调试消息的静态方法日志输出相关(1940行次)<br>{ Debugging }<br>type<br>/// &lt;summary&gt;Provides static methods for debug messages.&lt;/summary&gt;<br>Log = class abstract<br>public type<br>    /// &lt;summary&gt;A conversion function used to convert array elements in ArrayToString&lt;/summary&gt;<br>    TToStringFunc = reference to function(const AObject: TObject): string;<br>    /// &lt;summary&gt;A timestamp of specific point in procedure execution. TLogMarks are used by Log.Trace.<br>    /// See Trace and TLogToken.&lt;/summary&gt;<br>    TLogMark = record<br>      /// &lt;summary&gt;A short message&lt;/summary&gt;<br>      Msg: string;<br>      /// &lt;summary&gt;Timestamp&lt;/summary&gt;<br>      Time: TDateTime;<br>    end;<br>    /// &lt;summary&gt;A token received in Trace callback. Token can be used to mark specific points in time during<br>    ///procedure execution. Use Mark(Message) to mark specific moment in time. Marks will be printed<br>    /// in sequence with their elapsed times in Trace output.&lt;/summary&gt;<br>    TLogToken = class<br>    public<br>      /// &lt;summary&gt;Mark time during timed execution of a procedure.&lt;/summary&gt;<br>      procedure Mark(const Msg: string);<br>      /// &lt;summary&gt;Get a mark at Index.&lt;/summary&gt;<br>      property MarkAt: TLogMark read GetMarkAt;<br>      /// &lt;summary&gt;Count of accumulated Marks.&lt;/summary&gt;<br>      property Count: Integer read GetCount;<br>    end;<br>public<br>    /// &lt;summary&gt;Log a debug message. Same arguments as Format.&lt;/summary&gt;<br>    class procedure d(const Fmt: string; const Args: array of const); overload;<br>    /// &lt;summary&gt;Log a simple debug message.&lt;/summary&gt;<br>    class procedure d(const Msg: string); overload; inline;<br>    /// &lt;summary&gt;Log a debug message with Tag, object data of Instance, Method that invokes the logger and message Msg.<br>    /// &lt;/summary&gt;<br>    class procedure d(const Tag: string; const Instance: TObject; const Method, Msg: string); overload; inline;<br>    /// &lt;summary&gt;Log a debug message with Tag, object data of Instance and a message Msg&lt;/summary&gt;<br>    class procedure d(const Tag: string; const Instance: TObject; const Msg: string); overload; inline;<br>    /// &lt;summary&gt;Log a time stamp with message Msg&lt;/summary&gt;<br>    class procedure TimeStamp(const Msg: string); overload;<br>    /// &lt;summary&gt;Perform a timed execution of Func and print execution times, return function result.<br>    /// Proc receives a parameter TLogToken which can be used to mark specific points where timestamps should be taken<br>    /// in addition to complete procedure time.&lt;/summary&gt;<br>    class function Trace&lt;TResult&gt;(const Tag: string; const Func: TFunc&lt;TLogToken, TResult&gt;;<br>      const Threshold: Integer = -1): TResult; overload;<br>    /// &lt;summary&gt;A convenience variant of Trace&amp;lt;TResult&amp;gt; when token is not needed.&lt;/summary&gt;<br>    class function Trace&lt;TResult&gt;(const Tag: string; const Func: TFunc&lt;TResult&gt;; const Threshold: Integer = -1): TResult; overload;<br>    /// &lt;summary&gt;A convenience variant of Trace&amp;lt;TResult&amp;gt; for procedures.&lt;/summary&gt;<br>    class procedure Trace(const Tag: string; const Proc: TProc&lt;TLogToken&gt;; const Threshold: Integer = -1); overload;<br>    /// &lt;summary&gt;A convenience variant of Trace&amp;lt;TResult&amp;gt; for procedures when token is not needed.&lt;/summary&gt;<br>    class procedure Trace(const Tag: string; const Proc: TProc; const Threshold: Integer = -1); overload;<br>    /// &lt;summary&gt;Get a basic string representation of an object, consisting of ClassName and its pointer&lt;/summary&gt;<br>    class function ObjToString(const Instance: TObject): string;<br>    /// &lt;summary&gt;Get a string representation of array using MakeStr function to convert individual elements.&lt;/summary&gt;<br>    class function ArrayToString(const AArray: TEnumerable&lt;TFmxObject&gt;; const MakeStr: TToStringFunc): string; overload;<br>    /// &lt;summary&gt;Get a string representation of array using TObject.ToString to convert individual elements.&lt;/summary&gt;<br>    class function ArrayToString(const AArray: TEnumerable&lt;TFmxObject&gt;): string; overload;<br>    /// &lt;summary&gt;转储导出指定的TFmxObject及其所有子对象字符串Dump complete TFmxObject with all its children.&lt;/summary&gt;<br>    class procedure DumpFmxObject(const AObject: TFmxObject; const Nest: Integer = 0);<br>end;<br> <br>1.009、元素为TAlignLayout的全局布局TAnchors数组变量,已枚举各种可能的情况进行赋值(1836行次),可用于遍历或枚举<br>var<br>AnchorAlign: array of TAnchors<br>1.010、注册FMX类为持久类相关(1831行次)<br> <br>procedure RegisterFmxClasses(const RegClasses: array of TPersistentClass); overload;<br>procedure RegisterFmxClasses(const RegClasses: array of TPersistentClass;<br>const GroupClasses: array of TPersistentClass); overload;<br>1.011、忽略ARC引用计数并强制释放对象:将AObject赋值为nil,从内存地址中清除(1829行次)<br>procedure DisposeOfAndNil(var AObject);<br>1.012、判断并捕获FMX应用的句柄是否有效相关(1826行次),&nbsp;TFmxHandle = THandle;&nbsp; THandle = NativeUInt;&nbsp;&nbsp;Result := (Hnd &lt;&gt; 0);<br>function IsHandleValid(Hnd: TFmxHandle): Boolean;<br>1.013、FMX文字语言及翻译类相关(1496、1784及1802行次)<br>{ TLang }<br> <br>TLang = class(TFmxObject)<br>private<br>    //..........<br>protected<br>    { vcl }<br>    //..........<br>public<br>    constructor Create(AOwner: TComponent); override;<br>    destructor Destroy; override;<br>    procedure AddLang(const AName: string);<br>    procedure LoadFromFile(const AFileName: string);<br>    procedure SaveToFile(const AFileName: string);<br>    property Original: TStrings read FOriginal;<br>    property Resources: TStrings read FResources;<br>    property LangStr: TStrings read GetLangStr;<br>published<br>    property AutoSelect: Boolean read FAutoSelect write FAutoSelect default True;<br>    property FileName: string read FFileName write FFileName;<br>    property StoreInForm: Boolean read FStoreInForm write FStoreInForm default True;<br>    property Lang: string read FLang write SetLang;<br>end;<br> <br>{ Lang }<br> <br>procedure LoadLangFromFile(const AFileName: string);<br>procedure LoadLangFromStrings(const AStr: TStrings);<br>procedure ResetLang;<br> <br>type<br>TCustomTranslateProc = function(const AText: string): string;<br> <br>var<br>CustomTranslateProc: TCustomTranslateProc;<br> <br>{ This function use to collect string which can be translated. Just place this function at Application start. }<br> <br>procedure CollectLangStart;<br>procedure CollectLangFinish;<br>{ This function return Strings with collected text }<br>function CollectLangStrings: TStrings;<br> <br>function Translate(const AText: string): string;<br>function TranslateText(const AText: string): string;<br>1.014、动态计算并部署FMX对象Align布局的相关方法(1790行次)<br>{ Align }<br> <br>procedure ArrangeControl(const Control: IAlignableObject; AAlign: TAlignLayout; const AParentWidth, AParentHeight: Single;<br>const ALastWidth, ALastHeight: Single; var R: TRectF);<br> <br>procedure AlignObjects(const AParent: TFmxObject; APadding: TBounds; AParentWidth, AParentHeight: Single;<br>var ALastWidth, ALastHeight: Single; var ADisableAlign: Boolean);<br> <br>procedure RecalcAnchorRules(const Parent : TFmxObject; Anchors : TAnchors; const BoundsRect : TRectF;<br>var AOriginalParentSize:TPointF; var AAnchorOrigin:TPointF; var AAnchorRules:TPointF);<br>procedure RecalcControlOriginalParentSize(const Parent: TFmxObject; ComponentState : TComponentState;<br>const Anchoring: Boolean; var AOriginalParentSize : TPointF);<br>1.015、动态维护StyleLookup的相关方法(1773行次)<br>{ Resources }<br> <br>type<br>TCustomFindStyleResource = function(const AStyleLookup: string; const Clone: Boolean = False): TFmxObject of object;<br> <br>procedure AddCustomFindStyleResource(const ACustomProc: TCustomFindStyleResource);<br>procedure RemoveCustomFindStyleResource(const ACustomProc: TCustomFindStyleResource);<br> <br>procedure AddResource(const AObject: TFmxObject);<br>procedure RemoveResource(const AObject: TFmxObject);<br>function FindStyleResource(const AStyleLookup: string; const Clone: Boolean = False): TFmxObject;<br>1.016、FMX中的TPixelFormat像素格式、颜色及其转化的相关方法(1756行次)<br>{ Pixel Formats }<br> <br>function PixelToFloat4(Input: Pointer; InputFormat: TPixelFormat): TAlphaColorF;<br>procedure Float4ToPixel(const Input: TAlphaColorF; Output: Pointer; OutputFormat: TPixelFormat);<br> <br>function PixelToAlphaColor(Input: Pointer; InputFormat: TPixelFormat): TAlphaColor;<br>procedure AlphaColorToPixel(Input: TAlphaColor; Output: Pointer; OutputFormat: TPixelFormat);<br> <br>procedure ScanlineToAlphaColor(Input: Pointer; Output: PAlphaColor; PixelCount: Integer; InputFormat: TPixelFormat);<br>procedure AlphaColorToScanline(Input: PAlphaColor; Output: Pointer; PixelCount: Integer; OutputFormat: TPixelFormat);<br>procedure ChangePixelFormat(const AInput: Pointer; const AOutput: Pointer; const APixelCount: Integer;<br>                            const AInputFormat, AOutputFormat: TPixelFormat);<br> <br>function PixelFormatToString(Format: TPixelFormat): string;<br>function FindClosestPixelFormat(Format: TPixelFormat; const FormatList: TPixelFormatList): TPixelFormat;<br>1.017、FMX中的持久类TPersistent相关的维护接口(1700行次)<br>///&lt;summary&gt;Provider a persistent object for the designer. A different TPersistent can be routed into the<br>/// designer using this interface. This can be used to expose properties of non-controls in the<br>/// Object Inspector.&lt;/summary&gt;<br>IPersistentProvider = interface<br>    ['{B0B03758-A2F5-49B9-9A39-C2C2405B2EAD}']<br>    ///&lt;summary&gt;Return the provided persistent&lt;/summary&gt;<br>    function GetPersistent: TPersistent;<br>end;<br> <br>///&lt;summary&gt;Shim is a representative of a visual non-control object in the Designer. The shim needs to implement<br>/// this interface in order to let the Designer know about its bounding rectangles.<br>///&lt;/summary&gt;<br>IPersistentShim = interface<br>    ['{B6F815C7-BFD1-489D-A661-0CD4639EC920}']<br>    ///&lt;summary&gt;Return bounding rectangle of shim.&lt;/summary&gt;<br>    function GetBoundsRect: TRect;<br>end;<br> <br>///&lt;summary&gt;Extension of TPersistent directly exposed to the Designer.&lt;/summary&gt;<br>IDesignablePersistent = interface<br>    ['{4A731994-9060-4F3C-92D7-C123B04601D4}']<br>    ///&lt;summary&gt;GetDesignParent should return a TPersistent known to the designer, e.g. its parent TControl.&lt;/summary&gt;<br>    function GetDesignParent: TPersistent;<br>    ///&lt;summary&gt;Bounding rectangle representing this TPersistent in the designer&lt;/summary&gt;<br>    function GetBoundsRect: TRect;<br>    ///&lt;summary&gt;<br>    /// Bind this persistent with its shim, thus enabling GetBoundsRect without using the host.<br>    /// Example: TItemAppearanceProperties as IDesignablePersistent are bound to the TListItemShim<br>    ///          Their counterpart FmxReg.TListViewObjectsProperties are bound to the same TListItemShim<br>    ///&lt;/summary&gt;<br>    procedure Bind(AShim: IPersistentShim);<br>    ///&lt;summary&gt;<br>    /// Unbind this persistent. The implementation would normally clear its reference to IPersistentShim.<br>    ///&lt;/summary&gt;<br>    procedure Unbind;<br>    ///&lt;summary&gt;True if this TPersistent is currently in Design mode and wants the Designer to create<br>    ///IItem for itself.&lt;/summary&gt;<br>    function BeingDesigned: Boolean;<br>end;<br> <br>///&lt;summary&gt;Interface for TPersistent to receive bounding rectangle changes from the Designer.&lt;/summary&gt;<br>IMovablePersistent = interface<br>    ['{A86F9221-09E9-40A7-AF0E-5C3EB859C297}']<br>    /// &lt;summary&gt;Set bounds rectangle.&lt;/summary&gt;<br>    procedure SetBoundsRect(const AValue: TRect);<br>end;<br> <br>///&lt;summary&gt;Interface that allows binding a TPersistent with a TreeView Sprig in StructureView&lt;/summary&gt;<br>ISpriggedPersistent = interface<br>1.018、FMX中的TGuillotineBinPack矩形区域截取类相关(1594行次)<br>{ TGuillotineBinPack }<br> <br>TFreeChoiceHeuristic = (BestAreaFit, BestShortSideFit, BestLongSideFit, WorstAreaFit, WorstShortSideFit,<br>    WorstLongSideFit);<br> <br>TSplitMethodHeuristic = (ShorterLeftoverAxis, LongerLeftoverAxis, MinimizeArea, MaximizeArea, ShorterAxis,<br>    LongerAxis);<br> <br>TGuillotineBinPack = class<br>private<br>    //..........<br>public<br>    constructor Create; overload;<br>    constructor Create(const ASize: TPoint); overload;<br>    destructor Destroy; override;<br> <br>    procedure Init(const ASize: TPoint);<br>    procedure MergeFreeList;<br> <br>    function Insert(const NodeSize: TPoint; const Merge: Boolean = True;<br>      const FreeChoice: TFreeChoiceHeuristic = TFreeChoiceHeuristic.BestAreaFit;<br>      const SplitMethod: TSplitMethodHeuristic = TSplitMethodHeuristic.MinimizeArea): TRect;<br> <br>    property Size: TPoint read FSize;<br>    property Occupancy: Single read GetOccupancy;<br>    property SupportsRectangleInversion: Boolean read FSupportsRectangleInversion write FSupportsRectangleInversion;<br>end;<br>1.019、FMX中的线条的索引及长短的捕获类相关(1566行次)<br>{ TLineInfo }<br> <br>PLineMetric = ^TLineMetric;<br>TLineMetric = record<br>    Index: integer;<br>    Len: integer;<br>end;<br> <br>TLineMetricInfo = class<br>protected<br>    //.........<br>public<br>    constructor Create;<br>    destructor Destroy; override;<br>    procedure Clear; virtual;<br>    property Count: integer read GetCount write SetCount;<br>    property Metrics: PLineMetric read GetMetrics;<br>end;<br>1.020、FMX内置的TTimer毫秒计时器及其计时接口服务相关(1530行次)<br>{ TTimer }<br> <br>TTimerProc = procedure of object;<br> <br>IFMXTimerService = interface(IInterface)<br>    ['{856E938B-FF7B-4E13-85D4-3414A6A9FF2F}']<br>    function CreateTimer(Interval: Integer; TimerFunc: TTimerProc): TFmxHandle;<br>    function DestroyTimer(Timer: TFmxHandle): Boolean;<br>    function GetTick: Double;<br>end;<br> <br>TTimer = class(TFmxObject)<br>const<br>cIdNoTimer: TFmxHandle = TFmxHandle(-1);<br>&nbsp;</p>
<p>1.021、FMX的弹出菜单PopupMenu相关(1243行次)<br>{ TCustomPopupMenu }<br> <br>TCustomPopupMenu = class(TFmxObject)<br>private<br>    FPopupComponent: TComponent;<br>    FOnPopup: TNotifyEvent;<br>protected<br>    procedure DoPopup; virtual;<br>    property OnPopup: TNotifyEvent read FOnPopup write FOnPopup;<br>public<br>    procedure Popup(X, Y: Single); virtual; abstract;<br>    property PopupComponent: TComponent read FPopupComponent write FPopupComponent;<br>end;<br>1.022、FMX的TTabList类及其接口相关(1219、676行次)<br>TTabList = class(TAggregatedObject, ITabList)<br>strict private<br>    //.........<br>protected<br>    //.........<br>public<br>    constructor Create(const TabStopController: ITabStopController);<br>    destructor Destroy; override;<br>    procedure Clear;<br>    procedure Add(const TabStop: IControl); virtual;<br>    procedure Remove(const TabStop: IControl); virtual;<br>    procedure Update(const TabStop: IControl; const NewValue: TTabOrder);<br>    function IndexOf(const TabStop: IControl): Integer; virtual;<br>    function GetCount: Integer; virtual;<br>    function GetItem(const Index: Integer): IControl; virtual;<br>    function GetTabOrder(const TabStop: IControl): TTabOrder;<br>    function FindNextTabStop(const Current: IControl; const MoveForward: Boolean; const Climb: Boolean): IControl;<br>end;<br>TTabListClass = class of TTabList;<br>ITabList = interface<br>    ['{80C67BA2-3064-4d90-A8E1-B00028CA670E}']<br>    procedure Add(const TabStop: IControl);<br>    procedure Remove(const TabStop: IControl);<br>    procedure Update(const TabStop: IControl; const NewValue: TTabOrder);<br>    function GetTabOrder(const TabStop: IControl): TTabOrder;<br>    function GetCount: Integer;<br>    function GetItem(const Index: Integer): IControl;<br>    function FindNextTabStop(const Current: IControl; const MoveForward: Boolean; const Climb: Boolean): IControl;<br>    property Count: Integer read GetCount;<br>end;<br> <br>ITabStopController = interface<br>    ['{E7D2E0C5-EA3B-40bd-B728-5E4BB264EFC1}']<br>    function GetTabList: ITabList;<br>    property TabList: ITabList read GetTabList;<br>end;<br>&nbsp;1.023、通过StyleName快速访问FMX对象的相关类(1034行次)<br>/// &lt;summary&gt;Index for getting fast access to nested objects by &lt;c&gt;StyleName&lt;/c&gt;.&lt;/summary&gt;<br>TStyleIndexer = class<br>private<br>    //.....<br>public<br>    constructor Create(const AStyle: TFmxObject);<br>    destructor Destroy; override;<br> <br>    /// &lt;summary&gt;Marks index for lazy update.&lt;/summary&gt;<br>    procedure NeedRebuild;<br>    /// &lt;summary&gt;Updates index, if it's required only.&lt;/summary&gt;<br>    procedure RebuildIfNeeded;<br>    /// &lt;summary&gt;Finds style object by specified &lt;c&gt;StyleLookup&lt;/c&gt; value and returns object in &lt;c&gt;AObject&lt;/c&gt;.&lt;/summary&gt;<br>    function FindStyleObject(const AStyleLookup: string; var AObject: TFmxObject): Boolean;<br>    /// &lt;summary&gt;Clears index.&lt;/summary&gt;<br>    procedure Clear;<br>end;<br>1.024、TEnumProcResult枚举过程结果的全局枚举类型(1031行次)<br>TEnumProcResult = (Continue, Discard, Stop);<br>1.025、FMX对象TFmxObject相关类(1053行次)<br>{ TFmxObject }<br> <br>TEnumProcResult = (Continue, Discard, Stop);<br> <br>/// &lt;summary&gt;Index for getting fast access to nested objects by &lt;c&gt;StyleName&lt;/c&gt;.&lt;/summary&gt;<br>TStyleIndexer = class<br>end;<br> <br>TFmxObject = class(TComponent, IFreeNotification, IActionClient)<br>public type<br>    /// &lt;summary&gt; Determines the current state of the object<br>    /// &lt;para&gt;CallingFreeNotify - state is set before sending notifications in &lt;b&gt;BeforeDestruction&lt;/b&gt; method.<br>    /// See also &lt;b&gt;IFreeNotification&lt;/b&gt;&lt;/para&gt;<br>    /// &lt;para&gt;CallingRelease - state is set in &lt;b&gt;Release&lt;/b&gt; method&lt;/para&gt;<br>    /// &lt;/summary&gt;<br>    TObjectState = set of (CallingFreeNotify, CallingRelease) deprecated 'Support to this state will be removed';<br>strict private<br>    //..........<br>private<br>    //..........<br>protected<br>    //..........<br>public<br>    function GetParentComponent: TComponent; override;<br>    function HasParent: Boolean; override;<br>protected<br>    //..........<br>public<br>    constructor Create(AOwner: TComponent); override;<br>    destructor Destroy; override;<br>    procedure BeforeDestruction; override;<br>    procedure Release; virtual; deprecated 'Support for this method will be removed';<br>    function Released: Boolean; deprecated 'Support for this method will be removed';<br>    /// &lt;summary&gt; Describes the current state of this instance. Indicates that a component needs to avoid certain<br>    /// actions. &lt;para&gt;See also &lt;b&gt;TComponent.ComponentState&lt;/b&gt;&lt;/para&gt;&lt;/summary&gt;<br>    function ObjectState: TObjectState; deprecated 'Support for this funcionality will be removed';<br>    procedure SetRoot(ARoot: IRoot);<br>    { design }<br>    procedure SetDesign(Value: Boolean; SetChildren: Boolean = True);<br>    { clone }<br>    function Clone(const AOwner: TComponent): TFmxObject;<br>    { childs }<br>    procedure AddObject(const AObject: TFmxObject);<br>    procedure InsertObject(Index: Integer; const AObject: TFmxObject);<br>    procedure RemoveObject(const AObject: TFmxObject); overload;<br>    procedure RemoveObject(Index: Integer); overload;<br>    function ContainsObject(AObject: TFmxObject): Boolean; virtual;<br>    procedure Exchange(const AObject1, AObject2: TFmxObject); virtual;<br>    procedure DeleteChildren;<br>    function IsChild(AObject: TFmxObject): Boolean; virtual;<br>    procedure BringChildToFront(const Child: TFmxObject);<br>    procedure SendChildToBack(const Child: TFmxObject);<br>    procedure BringToFront; virtual;<br>    procedure SendToBack; virtual;<br>    procedure AddObjectsToList(const AList: TFmxObjectList);<br>    procedure Sort(Compare: TFmxObjectSortCompare); virtual;<br>    /// &lt;summary&gt;Loops through the children of this object, and runs the specified procedure once per object as the first parameter in each call.&lt;/summary&gt;<br>    procedure EnumObjects(const Proc: TFunc&lt;TFmxObject, TEnumProcResult&gt;);<br>    { animation property }<br>    procedure AnimateFloat(const APropertyName: string; const NewValue: Single; Duration: Single = 0.2;<br>      AType: TAnimationType = TAnimationType.In; AInterpolation: TInterpolationType = TInterpolationType.Linear);<br>      deprecated 'Use FMX.Ani.TAnimator instead';<br>    procedure AnimateFloatDelay(const APropertyName: string; const NewValue: Single; Duration: Single = 0.2;<br>      Delay: Single = 0.0; AType: TAnimationType = TAnimationType.In;<br>      AInterpolation: TInterpolationType = TInterpolationType.Linear);<br>      deprecated 'Use FMX.Ani.TAnimator instead';<br>    procedure AnimateFloatWait(const APropertyName: string; const NewValue: Single; Duration: Single = 0.2;<br>      AType: TAnimationType = TAnimationType.In; AInterpolation: TInterpolationType = TInterpolationType.Linear);<br>      deprecated 'Use FMX.Ani.TAnimator instead';<br>    procedure AnimateInt(const APropertyName: string; const NewValue: Integer; Duration: Single = 0.2;<br>      AType: TAnimationType = TAnimationType.In; AInterpolation: TInterpolationType = TInterpolationType.Linear);<br>      deprecated 'Use FMX.Ani.TAnimator instead';<br>    procedure AnimateIntWait(const APropertyName: string; const NewValue: Integer; Duration: Single = 0.2;<br>      AType: TAnimationType = TAnimationType.In; AInterpolation: TInterpolationType = TInterpolationType.Linear);<br>      deprecated 'Use FMX.Ani.TAnimator instead';<br>    procedure AnimateColor(const APropertyName: string; NewValue: TAlphaColor; Duration: Single = 0.2;<br>      AType: TAnimationType = TAnimationType.In; AInterpolation: TInterpolationType = TInterpolationType.Linear);<br>      deprecated 'Use FMX.Ani.TAnimator instead';<br>    procedure StopPropertyAnimation(const APropertyName: string);<br>    { notify }<br>    procedure AddFreeNotify(const AObject: IFreeNotification);<br>    procedure RemoveFreeNotify(const AObject: IFreeNotification);<br>    { resource }<br>    function FindStyleResource(const AStyleLookup: string; const AClone: Boolean = False): TFmxObject; overload; virtual;<br>    { }<br>    property Root: IRoot read FRoot;<br>    property Stored: Boolean read FStored write SetStored;<br>    { tags }<br>    property TagObject: TObject read FTagObject write FTagObject;<br>    property TagFloat: Single read FTagFloat write FTagFloat;<br>    property TagString: string read FTagString write FTagString;<br>    { children }<br>    property ChildrenCount: Integer read GetChildrenCount;<br>    property Children: TFmxChildrenList read FChildrenList;<br>    property Data: TValue read GetData write SetData;<br>    property Parent: TFmxObject read FParent write SetParent;<br>    property Index: Integer read GetIndex write SetIndex;<br>    property ActionClient: boolean read GetActionClient;<br>published<br>    property StyleName: string read FStyleName write SetStyleName;<br>end;<br> <br>TTabList = class(TAggregatedObject, ITabList)<br>end;<br>TTabListClass = class of TTabList;<br> <br>1.026、FMX对象列表类TFmxObjectList及其子对象TFmxChildrenList的枚举列表类、FMX对象间的比较匿名函数的参照全局类(1053行次)<br>TFmxObjectSortCompare = reference to function (Left, Right: TFmxObject): Integer;<br> <br>TFmxObjectList = TList&lt;TFmxObject&gt;;<br> <br>TFmxChildrenList = class(TEnumerable&lt;TFmxObject&gt;)<br>strict private<br>    //......<br>protected<br>    //......<br>public<br>    constructor Create(const AChildren: TFmxObjectList);<br>    destructor Destroy; override;<br>    property Count: Integer read GetChildCount;<br>    function IndexOf(const Obj: TFmxObject): Integer; virtual;<br>    property Items: TFmxObject read GetChild; default;<br>end;<br>1.027、FMX对象的位置、纵横比、旋转的外观转化的本地持久类(967行次)<br>{ TTransform }<br> <br>TTransform = class(TPersistent)<br>private<br>    //......<br>protected<br>    //......<br>public<br>    constructor Create; virtual;<br>    destructor Destroy; override;<br>    procedure Assign(Source: TPersistent); override;<br>    property Matrix: TMatrix read FMatrix;<br>    property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;<br>published<br>    property Position: TPosition read FPosition write SetPosition;<br>    property Scale: TPosition read FScale write SetScale;<br>    property RotationAngle: Single read FRotationAngle write SetRotationAngle;<br>    property RotationCenter: TPosition read FRotationCenter write FRotationCenter;<br>end;<br>1.028、FMX曲线类TSpline(699行次)<br>TSpline = class(TObject)<br>private<br>    //.........<br>public<br>    constructor Create(const Polygon: TPolygon);<br>    destructor Destroy; override;<br>    procedure SplineXY(const t: Single; var X, Y: Single);<br>end;<br>1.029、FMX中Items类型等容器接口(669行次)<br>IItemsContainer = interface<br>    ['{100B2F87-5DCB-4699-B751-B4439588E82A}']<br>    function GetItemsCount: Integer;<br>    function GetItem(const AIndex: Integer): TFmxObject;<br>    function GetObject: TFmxObject;<br>end;<br>IContainerObject = interface<br>    ['{DE635E60-CB00-4741-92BB-3B8F1F29A67C}']<br>    function GetContainerWidth: Single;<br>    function GetContainerHeight: Single;<br>    property ContainerWidth: single read GetContainerWidth;<br>    property ContainerHeight: single read GetContainerHeight;<br>end;<br>&nbsp;1.030、FMX原生控件的句柄接口(555行次)<br>INativeControl = interface<br>['{3E6F1A17-BAE3-456C-8551-5F6EA92EEE32}']<br>    function GetHandle: TFmxHandle;<br>    procedure SetHandle(const Value: TFmxHandle);<br>    function GetHandleSupported: boolean;<br>    property HandleSupported: boolean read GetHandleSupported;<br>    property Handle: TFmxHandle read GetHandle write SetHandle;<br>end;<br>1.031、FMX对象及其子对象重新布局接口IAlignRoot(549行次)<br>IAlignRoot = interface<br>['{86DF30A6-0394-4a0e-8722-1F2CDB242CE8}']<br>    procedure Realign;<br>    procedure ChildrenAlignChanged;<br>end;<br>1.032、FMX对象的IRoot祖先根节点接口(524行次)<br>IRoot = interface<br>    ['{7F7BB7B0-5932-49dd-9D35-712B2BA5D8EF}']<br>    procedure AddObject(const AObject: TFmxObject);<br>    procedure InsertObject(Index: Integer; const AObject: TFmxObject);<br>    procedure RemoveObject(const AObject: TFmxObject); overload;<br>    procedure RemoveObject(Index: Integer); overload;<br>    procedure BeginInternalDrag(const Source: TObject; const ABitmap: TObject);<br>    function GetActiveControl: IControl;<br>    procedure SetActiveControl(const AControl: IControl);<br>    function GetCaptured: IControl;<br>    procedure SetCaptured(const Value: IControl);<br>    function GetFocused: IControl;<br>    procedure SetFocused(const Value: IControl);<br>    function NewFocusedControl(const Value: IControl): IControl;<br>    function GetHovered: IControl;<br>    procedure SetHovered(const Value: IControl);<br>    function GetObject: TFmxObject;<br>    function GetBiDiMode: TBiDiMode;<br>    { access }<br>    property Captured: IControl read GetCaptured write SetCaptured;<br>    property Focused: IControl read GetFocused write SetFocused;<br>    property Hovered: IControl read GetHovered write SetHovered;<br>    property BiDiMode: TBiDiMode read GetBiDiMode;<br>end;<br>1.033、FMX对象嵌套的内容捕获接口(407行次)<br>IContent = interface<br>    ['{96E89B94-2AD6-4AD3-A07C-92E66B2E6BC8}']<br>    function GetParent: TFmxObject;<br>    function GetObject: TFmxObject;<br>    function GetChildrenCount: Integer;<br>    property Parent: TFmxObject read GetParent;<br>    property ChildrenCount: Integer read GetChildrenCount;<br>    procedure Changed;<br>end;<br>1.034、FMX控件的行为的释放通知接口(430行次),比如焦点等等各种事件<br>IControl = interface(IFreeNotificationBehavior)<br>    ['{7318D022-D048-49DE-BF55-C5C36A2AD1AC}']<br>    function GetObject: TFmxObject;<br>    procedure SetFocus;<br>    function GetIsFocused: Boolean;<br>    function GetCanFocus: Boolean;<br>    function GetCanParentFocus: Boolean;<br>    function GetEnabled: Boolean;<br>    function GetAbsoluteEnabled: Boolean;<br>    function GetPopupMenu: TCustomPopupMenu;<br>    function EnterChildren(AObject: IControl): Boolean;<br>    function ExitChildren(AObject: IControl): Boolean;<br>    procedure DoEnter;<br>    procedure DoExit;<br>    procedure DoActivate;<br>    procedure DoDeactivate;<br>    procedure DoMouseEnter;<br>    procedure DoMouseLeave;<br>    function ShowContextMenu(const ScreenPosition: TPointF): Boolean;<br>    function ScreenToLocal(P: TPointF): TPointF;<br>    function LocalToScreen(P: TPointF): TPointF;<br>    function ObjectAtPoint(P: TPointF): IControl;<br>    procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Single);<br>    procedure MouseMove(Shift: TShiftState; X, Y: Single);<br>    procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single);<br>    procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean);<br>    procedure MouseClick(Button: TMouseButton; Shift: TShiftState; X, Y: Single);<br>    procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);<br>    procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);<br>    procedure Tap(const Point: TPointF);<br>    procedure DialogKey(var Key: Word; Shift: TShiftState);<br>    procedure AfterDialogKey(var Key: Word; Shift: TShiftState);<br>    function FindTarget(P: TPointF; const Data: TDragObject): IControl;<br>    procedure DragEnter(const Data: TDragObject; const Point: TPointF);<br>    procedure DragOver(const Data: TDragObject; const Point: TPointF; var Operation: TDragOperation);<br>    procedure DragDrop(const Data: TDragObject; const Point: TPointF);<br>    procedure DragLeave;<br>    procedure DragEnd;<br>    function CheckForAllowFocus: Boolean;<br>    procedure Repaint;<br>    function GetDragMode: TDragMode;<br>    procedure SetDragMode(const ADragMode: TDragMode);<br>    procedure BeginAutoDrag;<br>    function GetParent: TFmxObject;<br>    function GetLocked: Boolean;<br>    function GetVisible: Boolean;<br>    procedure SetVisible(const Value: Boolean);<br>    function GetHitTest: Boolean;<br>    function GetCursor: TCursor;<br>    function GetInheritedCursor: TCursor;<br>    function GetDesignInteractive: Boolean;<br>    function GetAcceptsControls: Boolean;<br>    procedure SetAcceptsControls(const Value: Boolean);<br>    procedure BeginUpdate;<br>    procedure EndUpdate;<br>    function GetTabStopController: ITabStopController;<br>    function GetTabStop: Boolean;<br>    procedure SetTabStop(const TabStop: Boolean);<br>    /// &lt;summary&gt;This method returns true if the control has an available hint to display.&lt;/summary&gt;<br>    function HasHint: Boolean;<br>    /// &lt;summary&gt;If HasHint is true, this method is invoked in order to know if the control has an available<br>    /// string to swho as hint.&lt;/summary&gt;<br>    function GetHintString: string;<br>    /// &lt;summary&gt;If HasHint is true, this method is invoked in order to know if the control has a custom hint<br>    /// object to manage the hint display. This usually returns an instance of THint to allow the form to manage<br>    /// it.&lt;/summary&gt;<br>    function GetHintObject: TObject;<br>    { access }<br>    property AbsoluteEnabled: Boolean read GetAbsoluteEnabled;<br>    property Cursor: TCursor read GetCursor;<br>    property InheritedCursor: TCursor read GetInheritedCursor;<br>    property DragMode: TDragMode read GetDragMode write SetDragMode;<br>    property DesignInteractive: Boolean read GetDesignInteractive;<br>    property Enabled: Boolean read GetEnabled;<br>    property Parent: TFmxObject read GetParent;<br>    property Locked: Boolean read GetLocked;<br>    property HitTest: Boolean read GetHitTest;<br>    property PopupMenu: TCustomPopupMenu read GetPopupMenu;<br>    property Visible: Boolean read GetVisible write SetVisible;<br>    property AcceptsControls: Boolean read GetAcceptsControls write SetAcceptsControls;<br>    property IsFocused: Boolean read GetIsFocused;<br>    property TabStop: Boolean read GetTabStop write SetTabStop;<br>end;<br>IFreeNotificationBehavior = interface<br>    ['{83F052C5-8696-4AFA-88F5-DCDFEF005480}']<br>    procedure AddFreeNotify(const AObject: IFreeNotification);<br>    procedure RemoveFreeNotify(const AObject: IFreeNotification);<br>end;<br>1.035、FMX的其它与布局和显示相关的基础常量和枚举类型(193、74行次)<br>TPixelFormat = (None, RGB, RGBA, BGR, BGRA, RGBA16, BGR_565, BGRA4, BGR4, BGR5_A1, BGR5, BGR10_A2, RGB10_A2, L, LA,<br>    LA4, L16, A, R16F, RG16F, RGBA16F, R32F, RG32F, RGBA32F);<br> <br>TPixelFormatList = TList&lt;TPixelFormat&gt;;<br> <br>const<br>PixelFormatBytes: array of Integer = ({ None } 0, { RGB } 4, { RGBA } 4, { BGR } 4, { BGRA } 4,<br>    { RGBA16 } 8, { BGR_565 } 2, { BGRA4 } 2, { BGR4 } 2, { BGR5_A1 } 2, { BGR5 } 2, { BGR10_A2 } 4, { RGB10_A2 } 4,<br>    { L } 1, { LA } 2, { LA4 } 1, { L16 } 2, { A } 1, { R16F } 2, { RG16F } 4, { RGBA16F } 8, { R32F } 4, { RG32F } 8,<br>    { RGBA32F } 16);<br> <br>NullRect: TRectF = (Left: 0; Top: 0; Right: 0; Bottom: 0);<br> <br>AllCorners: TCorners = ;<br> <br>AllSides: TSides = ;<br> <br>ClosePolygon: TPointF = (X: $FFFF; Y: $FFFF) deprecated 'Non-closed polygons are not supported.';<br> <br>/// &lt;summary&gt;A special polygon point marker typically used for converting paths to polygons and vice-versa,<br>/// usually indicating path closure. For the rendering methods, this marker has no meaning and the actual<br>/// interpretation may be platform-dependent.&lt;/summary&gt;<br>PolygonPointBreak: TPointF = (X: $FFFFFF; Y: $FFFFFF);<br> <br>AllStyledSettings: TStyledSettings = ;<br>DefaultStyledSettings: TStyledSettings = ;<br> <br>InvalidSize : TSizeF = (cx: -1; cy: -1);<br> <br>AlignmentToTTextAlign: array of TTextAlign =<br>    (TTextAlign.Leading, TTextAlign.Trailing, TTextAlign.Center);<br>type<br> <br>TOSPlatform = (Windows, OSX, iOS, Android, Linux);<br> <br>TPointArray = array of TPointF;<br> <br>TLongByteArray = array of Byte;<br>PLongByteArray = ^TLongByteArray;<br>&nbsp;<br>————————————————<br>版权声明:本文为CSDN博主「pulledup」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。<br>原文链接:https://blog.csdn.net/pulledup/article/details/105162617</p><br><br>
来源:https://www.cnblogs.com/Thenext/p/14544563.html
頁: [1]
查看完整版本: 深入Delphi FMX从FMX.Types开始(一、原理)