FGX.Control.TfgControl: различия между версиями

Материал из FGX Native Докуметации
Перейти к навигации Перейти к поиску
(summary)
(summary)
Строка 5: Строка 5:
 
<syntaxhighlight lang="Delphi">TfgControl = class (TComponent, IInterfaceComponentReference, IInterface)</syntaxhighlight>
 
<syntaxhighlight lang="Delphi">TfgControl = class (TComponent, IInterfaceComponentReference, IInterface)</syntaxhighlight>
  
== Описание ==
+
Известные прямые наследники:
 
+
[[FGX.ActivityIndicator.TfgCustomActivityIndicator|TfgCustomActivityIndicator]], [[FGX.Button.TfgCustomButton|TfgCustomButton]], [[FGX.CollectionView.TfgCollectionViewStyles|TfgCollectionViewStyles]], [[FGX.CollectionView.TfgCustomCollectionView|TfgCustomCollectionView]], [[FGX.ComboBox.TfgCustomComboBox|TfgCustomComboBox]], [[FGX.DateTimeControl.TfgCustomDateTimeControl|TfgCustomDateTimeControl]], [[FGX.DrawerLayout.TfgCustomDrawerLayout|TfgCustomDrawerLayout]], [[FGX.Edit.TfgCustomEdit|TfgCustomEdit]], [[FGX.GraphicControl.TfgGraphicControl|TfgGraphicControl]], [[FGX.Image.TfgCustomImage|TfgCustomImage]], [[FGX.Layout.TfgCustomLayout|TfgCustomLayout]], [[FGX.ListMenu.TfgCustomListMenu|TfgCustomListMenu]], [[FGX.ListView.TfgCustomListView|TfgCustomListView]], [[FGX.Memo.TfgCustomMemo|TfgCustomMemo]], [[FGX.NavigationBar.TfgCustomNavigationBar|TfgCustomNavigationBar]], [[FGX.PageControl.TfgCustomPageControl|TfgCustomPageControl]], [[FGX.ProgressBar.TfgCustomProgressBar|TfgCustomProgressBar]], [[FGX.SearchEdit.TfgCustomSearchEdit|TfgCustomSearchEdit]], [[FGX.Spacer.TfgCustomSpacer|TfgCustomSpacer]], [[FGX.StaticLabel.TfgCustomLabel|TfgCustomLabel]], [[FGX.TabBar.TfgCustomTabBar|TfgCustomTabBar]], [[FGX.TabControl.TfgCustomTabControl|TfgCustomTabControl]], [[FGX.ToolBar.TfgCustomToolBar|TfgCustomToolBar]], [[FGX.TrackBar.TfgCustomTrackBar|TfgCustomTrackBar]], [[FGX.VideoControl.TfgCustomVideoControl|TfgCustomVideoControl]], [[FGX.WebBrowser.TfgCustomWebBrowser|TfgCustomWebBrowser]]
Описание отсутствует.
 
 
 
== Конструкторы ==
 
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">constructor</syntaxhighlight> || <code>Create(AOwner: [[TComponent]])</code>
 
 
 
|}
 
 
 
== Методы ==
 
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">AfterConstruction()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">BeforeDestruction()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">IsLoading(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">IsCreating(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">IsDestroying(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">InsertControl(const AChild: [[FGX.Control.TfgControl|TfgControl]])</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">RemoveControl(const AChild: [[FGX.Control.TfgControl|TfgControl]])</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">DeleteControls()</code>
 
Удаляет все дочерние объекты.
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">HasParent(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">IsChild(const AChild: [[FGX.Control.TfgControl|TfgControl]]): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">GetParentComponent(): [[TComponent]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">BringToFront()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SendToBack()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">HitTestPoint(const ALocalPoint: [[TPointF]]): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">ControlAtPoint(const ALocalPoint: [[TPointF]]; const AIgnoreStored: [[Boolean]]): [[FGX.Control.TfgControl|TfgControl]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Invalidate()</code>
 
Выполнить полную перерисовку формы.
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">Clone(const AStoreEvents: [[Boolean]]): [[FGX.Control.TfgControl|TfgControl]]</code>
 
Делает копию текущего контрола на основании "published" свойств.
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">GetFormPosition(): [[TPointF]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">GetFormBounds(): [[TRectF]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">MeasureSize(const AWidthSpec: [[.TfgMeasuringSpecification|TfgMeasuringSpecification]]; const AWidth: [[Single]]; const AHeightSpec: [[.TfgMeasuringSpecification|TfgMeasuringSpecification]]; const AHeight: [[Single]]): [[TSizeF]]</code>
 
Выполняет рассчет размера контрола на основании входящих данных. Спецификации '' AWidthSpec '' и '' AHeightSpec '' указывают, как нужно использовать ширину '' AWidth '' и высоту '' AHeight '' при вычислении размера контрола.
 
 
 
- финальный вычисляемый размер никак не ограничен сверху. При использовании этой спецификации переданный размер в '' AWidth '' или '' AHeight '' будет проигнорирован.
 
 
 
- означает, что финальный вычисляемый размер ограничен сверху соответствующим значением ширины '' AWidth '' или высоты '' AHeight '' .
 
 
 
- означает, что финальный вычисляемый размер зафиксирован сверху соответствующим значением ширины '' AWidth '' или высоты '' AHeight '' .
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">LocalToForm(const ALocalPoint: [[TPointF]]): [[TPointF]]</code>
 
Конвертирует локальные координаты в рамках контрола в систему координат формы.
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">CanRealign(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Realign()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">BeginUpdate()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">EndUpdate()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">IsUpdating(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SetFocus()</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">ResetFocus(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">IsFocused(): [[Boolean]]</code>
 
 
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SubscribeOnNotification(const AObserver: [[.IFGXNotificationObserver|IFGXNotificationObserver]]; const ANotificationType: [[.TfgNotificationType|TfgNotificationType]])</code>
 
Подисывает наблюдателя '' AObserver '' на получение уведомлений типа '' ANotificationType '' .
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">UnsubscribeOnNotification(const AObserver: [[.IFGXNotificationObserver|IFGXNotificationObserver]]; const ANotificationType: [[.TfgNotificationType|TfgNotificationType]])</code>
 
Отписывает наблюдателя '' AObserver '' на получение уведомлений типа '' ANotificationType '' . Если подписчик не был ранее подписан, метод тогда ничего не делает.
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Notify(const ANotificationType: [[.TfgNotificationType|TfgNotificationType]])</code>
 
Уведомляет всех подписчиков, что произошло событие с типом '' ANotificationType '' .
 
|}
 
 
 
== Свойства ==
 
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Index: [[Integer]]</code>
 
Порядковый номер контрола в рамках родителя. Отвечает за порядок выравнивания и Z-порядок. 0 - контрол находится позади всех соседних и выравнивается первым.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Form: [[FGX.Control.TfgControl|TfgControl]]</code>
 
Возвращает ссылку на форму, в которую встроен контрол.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Controls: [[TList<FGX.Control.TfgControl>]]</code>
 
Вложенные контролы.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>ControlsCount: [[Integer]]</code>
 
Количество вложенных контролов.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>BackgroundLink: [[FGX.Assets.TfgAssetLink|TfgAssetLink]]</code>
 
Связь ресурса заднего фона.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Handle: [[FGX.NativeControl.Factory.TfgNativeControlHandle|TfgNativeControlHandle]]</code>
 
Хендл с информацией о нативном представлении контрола.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Parent: [[FGX.Control.TfgControl|TfgControl]]</code>
 
Родитель
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Bounds: [[TRectF]]</code>
 
Местоположение контрола в родительской системе координат.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>LocalBounds: [[TRectF]]</code>
 
Возвращает местоположение контрола в своей системе координат.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Height: [[Single]]</code>
 
Высота контрола
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Width: [[Single]]</code>
 
Ширина контрола
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>NaturalSize: [[TSizeF]]</code>
 
Естественный размер контрола. Каждый контрол может сказать, какой размер ему необходим, чтобы нормально отобразить свое содержимое.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Stored: [[Boolean]]</code>
 
Нужно ли при серилизации сохранять текущий контрол.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>TagObject: [[TObject]]</code>
 
Место хранения пользовательских данных, ассоциированных с данным контролом.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Locked: [[Boolean]]</code>
 
Позволяет заблокировать выделение компонента мышкой в дизайн тайме.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Alignment: [[FGX.Control.Types.TfgControlAlignment|TfgControlAlignment]]</code>
 
Настройки выравнивания контрола в рамках родителя.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>PositionMode: [[.TfgPositionMode|TfgPositionMode]]</code>
 
Режим позиционирования контрола в рамках родителя (в абсолютных координатах / относительно).
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Position: [[FGX.Control.Types.TfgPosition|TfgPosition]]</code>
 
Позиция контрола в локальных логических координатах родителя '' Parent '' .
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>RelativePosition: [[FGX.Control.Types.TfgRelativePosition|TfgRelativePosition]]</code>
 
Относительная позиция контролов относительно родителя. Актуально только для Относительная позиция контролов относительно родителя. Актуально только для .
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Size: [[FGX.Control.Types.TfgSize|TfgSize]]</code>
 
Размер контрола в логических координатах.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Constraints: [[FGX.Control.Types.TfgConstraints|TfgConstraints]]</code>
 
Ограничение на размеры контрола.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Margins: [[FGX.Control.Types.TfgMargins|TfgMargins]]</code>
 
Внешние отступы контрола. Используются при выравнивании текущего контрола в рамках контейнера.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>AlignWithMargins: [[Boolean]]</code>
 
Нужно ли использовать заданные внешние отступы '' Margins '' .
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>GestureKinds: [[.TfgGestureKinds|TfgGestureKinds]]</code>
 
Виды поддерживаемых жестов.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>LookupName: [[string]]</code>
 
Идентификатор, используемый для поиска данного контрола среди других. Актуально для ситуаций, когда несколько контролов могут иметь одно и тоже имя для поиска и нам нужно найти данный контрол в определенной части поддерева.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Opacity: [[Single]]</code>
 
Прозрачность контрола.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>BackgroundName: [[.TfgAssetName|TfgAssetName]]</code>
 
Настройки отображения заднего фона контрола.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Visible: [[Boolean]]</code>
 
Видимость контрола.
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>HitTest: [[Boolean]]</code>
 
<span style="color:gray">Описание отсутствует.</span>
 
|}
 

Версия 22:12, 11 июня 2019