FGX.NativeControl.Factory.TfgNativeControlFactory: различия между версиями

Материал из FGX Native Докуметации
Перейти к навигации Перейти к поиску
(summary)
(summary)
 
(не показаны 24 промежуточные версии этого же участника)
Строка 1: Строка 1:
* [[ FGX.NativeControl.Factory | Вверх к родителю: FGX.NativeControl.Factory ]]
+
* [[ System.TObject | Вверх к родителю: TObject ]]
* [[ FGX.NativeControl.Factory.TfgNativeControlFactory_Methods | Методы ]]
+
* [[ FGX.NativeControl.Factory | К модулю: FGX.NativeControl.Factory ]]
* [[ FGX.NativeControl.Factory.TfgNativeControlFactory_Properties | Свойства ]]
 
  
 
Delphi
 
Delphi
  
<code>TfgNativeControlFactory = class (TObject)</code>
+
<syntaxhighlight lang="Delphi">TfgNativeControlFactory = class (TObject)</syntaxhighlight>
 +
 
 +
<p class="class-inheritance"><span class="type-border">[[System.TObject|TObject]]</span> -> <span class="type-border">[[FGX.NativeControl.Factory.TfgNativeControlFactory|TfgNativeControlFactory]]</span></p>
 +
 
 +
== Описание ==
 +
 
 +
<p>Фабрика по регистрации реализаций нативных контролов и созданию их.</p>
 +
== Методы ==
 +
 
 +
{| class="wikitable sortable"
 +
|-
 +
| <syntaxhighlight lang="Delphi">class procedure</syntaxhighlight> || <code lang="Delphi">Register(const AControlClass: [[TClass]]; const APresentationAllocator: [[TfgNativeControlAllocator|TfgNativeControlAllocator]])</code>
 +
<p>Tries to register presentation proxy class with specified name. If factory already has presentation proxy with the same name, it will rise exception <i>EPresentationProxy</i> .</p>
 +
|-
 +
| <syntaxhighlight lang="Delphi">class procedure</syntaxhighlight> || <code lang="Delphi">Register(const AControlClass: [[string]]; const APresentationAllocator: [[TfgNativeControlAllocator|TfgNativeControlAllocator]])</code>
 +
<p>Tries to register presentation proxy class with specified name. If factory already has presentation proxy with the same name, it will rise exception <i>EPresentationProxy</i> .</p>
 +
|-
 +
| <syntaxhighlight lang="Delphi">class procedure</syntaxhighlight> || <code lang="Delphi">Unregister(const AControlClass: [[TClass]])</code>
 +
<p>Unregisters specified presentation proxy class by control class.</p>
 +
|-
 +
| <syntaxhighlight lang="Delphi">class function</syntaxhighlight> || <code lang="Delphi">Supported(const AControlClass: [[TClass]]): [[Boolean]]</code>
 +
<p>Returns True if factory has presentation proxy with specified name. Returns False otherwise.</p>
 +
|-
 +
| <syntaxhighlight lang="Delphi">class function</syntaxhighlight> || <code lang="Delphi">Supported(const AControlClass: [[string]]): [[Boolean]]</code>
 +
<span style="color:gray">Описание отсутствует.</span>
 +
|-
 +
| <syntaxhighlight lang="Delphi">class function</syntaxhighlight> || <code lang="Delphi">CreatePresentation(const AControl: [[TComponent]]): [[FGX.NativeControl.Factory.TfgNativeControlHandle|TfgNativeControlHandle]]</code>
 +
 
 +
<p>Creates instance of presentation proxy by specified name and casts to specified type <i>T</i> .</p><div class="info">If factory doesn't have specified presentation proxy, it will rise <i>EPresentationProxy</i> exception. If type <i>T</i> is not compatible with found presentation proxy class, It will return nil.</div>
 +
|-
 +
| <syntaxhighlight lang="Delphi">class function</syntaxhighlight> || <code lang="Delphi">CreatePresentation(const AControlClass: [[string]]; const AControl: [[TComponent]]): [[FGX.NativeControl.Factory.TfgNativeControlHandle|TfgNativeControlHandle]]</code>
 +
<span style="color:gray">Описание отсутствует.</span>
 +
|}

Текущая версия на 02:51, 1 июля 2019

Delphi

TfgNativeControlFactory = class (TObject)

TObject -> TfgNativeControlFactory

Описание

Фабрика по регистрации реализаций нативных контролов и созданию их.

Методы

class procedure
Register(const AControlClass: TClass; const APresentationAllocator: TfgNativeControlAllocator)

Tries to register presentation proxy class with specified name. If factory already has presentation proxy with the same name, it will rise exception EPresentationProxy .

class procedure
Register(const AControlClass: string; const APresentationAllocator: TfgNativeControlAllocator)

Tries to register presentation proxy class with specified name. If factory already has presentation proxy with the same name, it will rise exception EPresentationProxy .

class procedure
Unregister(const AControlClass: TClass)

Unregisters specified presentation proxy class by control class.

class function
Supported(const AControlClass: TClass): Boolean

Returns True if factory has presentation proxy with specified name. Returns False otherwise.

class function
Supported(const AControlClass: string): Boolean

Описание отсутствует.

class function
CreatePresentation(const AControl: TComponent): TfgNativeControlHandle

Creates instance of presentation proxy by specified name and casts to specified type T .

If factory doesn't have specified presentation proxy, it will rise EPresentationProxy exception. If type T is not compatible with found presentation proxy class, It will return nil.
class function
CreatePresentation(const AControlClass: string; const AControl: TComponent): TfgNativeControlHandle

Описание отсутствует.