FGX.Control.TfgControl: различия между версиями
Admin (обсуждение | вклад) (summary) |
Admin (обсуждение | вклад) (summary) |
||
Строка 128: | Строка 128: | ||
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Notify(const ANotificationType: [[.TfgNotificationType|TfgNotificationType]])</code> | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Notify(const ANotificationType: [[.TfgNotificationType|TfgNotificationType]])</code> | ||
Уведомляет всех подписчиков, что произошло событие с типом '' ANotificationType '' . | Уведомляет всех подписчиков, что произошло событие с типом '' 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:17, 11 июня 2019
Delphi
TfgControl = class (TComponent, IInterfaceComponentReference, IInterface)
Известные прямые наследники: TfgCustomActivityIndicator, TfgCustomButton, TfgCollectionViewStyles, TfgCustomCollectionView, TfgCustomComboBox, TfgCustomDateTimeControl, TfgCustomDrawerLayout, TfgCustomEdit, TfgGraphicControl, TfgCustomImage, TfgCustomLayout, TfgCustomListMenu, TfgCustomListView, TfgCustomMemo, TfgCustomNavigationBar, TfgCustomPageControl, TfgCustomProgressBar, TfgCustomSearchEdit, TfgCustomSpacer, TfgCustomLabel, TfgCustomTabBar, TfgCustomTabControl, TfgCustomToolBar, TfgCustomTrackBar, TfgCustomVideoControl, TfgCustomWebBrowser
Известные не прямые наследники: TfgActivityIndicator, TfgButton, TfgCollectionView, TfgComboBox, TfgCustomDateControl, TfgCustomTimeControl, TfgCustomCalendar, TfgCustomDateEdit, TfgCustomDatePicker, TfgCalendar, TfgDateEdit, TfgDatePicker, TfgCustomTimeEdit, TfgCustomTimePicker, TfgTimeEdit, TfgTimePicker, TfgDrawerLayout, TfgCustomAutoCompleteEdit, TfgEdit, TfgAutoCompleteEdit, TfgCustomPaintBox, TfgShape, TfgPaintBox, TfgCustomArc, TfgCustomCircle, TfgCustomEllipse, TfgCustomLine, TfgCustomRectangle, TfgCustomRegularPolygon, TfgCustomRhomb, TfgCustomSvgPath, TfgArc, TfgCustomArch, TfgCustomSector, TfgArch, TfgSector, TfgCircle, TfgEllipse, TfgLine, TfgRectangle, TfgRegularPolygon, TfgRhomb, TfgSvgPath, TfgImage, TfgCustomCardPanel, TfgCollectionViewStyle, TfgCustomComboBoxItem, TfgCustomDrawer, TfgCustomForm, TfgLayout, TfgCustomPage, TfgCustomScrollBox, TfgCardPanel, TfgComboBoxTextItem, TfgDrawer, TfgForm, TfgMainContent, TfgPage, TfgScrollBox, TfgListMenu, TfgListView, TfgMemo, TfgNavigationBar, TfgPageControl, TfgProgressBar, TfgSearchEdit, TfgSpacer, TfgCustomCheckBox, TfgCustomRadioButton, TfgLabel, TfgCustomSwitch, TfgCheckBox, TfgRadioButton, TfgSwitch, TfgTabBar, TfgTabControl, TfgToolBar, TfgTrackBar, TfgVideoControl, TfgWebBrowser
Содержание
Описание
Описание отсутствует.
Конструкторы
constructor
|
Create(AOwner: TComponent)
|
Методы
procedure
|
AfterConstruction()
|
procedure
|
BeforeDestruction()
|
function
|
IsLoading(): Boolean
|
function
|
IsCreating(): Boolean
|
function
|
IsDestroying(): Boolean
|
procedure
|
InsertControl(const AChild: TfgControl)
|
procedure
|
RemoveControl(const AChild: TfgControl)
|
procedure
|
DeleteControls()
Удаляет все дочерние объекты. |
function
|
HasParent(): Boolean
|
function
|
IsChild(const AChild: TfgControl): Boolean
|
function
|
GetParentComponent(): TComponent
|
procedure
|
BringToFront()
|
procedure
|
SendToBack()
|
function
|
HitTestPoint(const ALocalPoint: TPointF): Boolean
|
function
|
ControlAtPoint(const ALocalPoint: TPointF; const AIgnoreStored: Boolean): TfgControl
|
procedure
|
Invalidate()
Выполнить полную перерисовку формы. |
function
|
Clone(const AStoreEvents: Boolean): TfgControl
Делает копию текущего контрола на основании "published" свойств. |
function
|
GetFormPosition(): TPointF
|
function
|
GetFormBounds(): TRectF
|
function
|
MeasureSize(const AWidthSpec: TfgMeasuringSpecification; const AWidth: Single; const AHeightSpec: TfgMeasuringSpecification; const AHeight: Single): TSizeF
Выполняет рассчет размера контрола на основании входящих данных. Спецификации AWidthSpec и AHeightSpec указывают, как нужно использовать ширину AWidth и высоту AHeight при вычислении размера контрола. - финальный вычисляемый размер никак не ограничен сверху. При использовании этой спецификации переданный размер в AWidth или AHeight будет проигнорирован. - означает, что финальный вычисляемый размер ограничен сверху соответствующим значением ширины AWidth или высоты AHeight . - означает, что финальный вычисляемый размер зафиксирован сверху соответствующим значением ширины AWidth или высоты AHeight . |
function
|
LocalToForm(const ALocalPoint: TPointF): TPointF
Конвертирует локальные координаты в рамках контрола в систему координат формы. |
function
|
CanRealign(): Boolean
|
procedure
|
Realign()
|
procedure
|
BeginUpdate()
|
procedure
|
EndUpdate()
|
function
|
IsUpdating(): Boolean
|
procedure
|
SetFocus()
|
function
|
ResetFocus(): Boolean
|
function
|
IsFocused(): Boolean
|
procedure
|
SubscribeOnNotification(const AObserver: IFGXNotificationObserver; const ANotificationType: TfgNotificationType)
Подисывает наблюдателя AObserver на получение уведомлений типа ANotificationType . |
procedure
|
UnsubscribeOnNotification(const AObserver: IFGXNotificationObserver; const ANotificationType: TfgNotificationType)
Отписывает наблюдателя AObserver на получение уведомлений типа ANotificationType . Если подписчик не был ранее подписан, метод тогда ничего не делает. |
procedure
|
Notify(const ANotificationType: TfgNotificationType)
Уведомляет всех подписчиков, что произошло событие с типом ANotificationType . |
Свойства
property
|
Index: Integer
Порядковый номер контрола в рамках родителя. Отвечает за порядок выравнивания и Z-порядок. 0 - контрол находится позади всех соседних и выравнивается первым. |
property
|
Form: TfgControl
Возвращает ссылку на форму, в которую встроен контрол. |
property
|
Controls: [[TList<FGX.Control.TfgControl>]]
Вложенные контролы. |
property
|
ControlsCount: Integer
Количество вложенных контролов. |
property
|
BackgroundLink: TfgAssetLink
Связь ресурса заднего фона. |
property
|
Handle: TfgNativeControlHandle
Хендл с информацией о нативном представлении контрола. |
property
|
Parent: TfgControl
Родитель |
property
|
Bounds: TRectF
Местоположение контрола в родительской системе координат. |
property
|
LocalBounds: TRectF
Возвращает местоположение контрола в своей системе координат. |
property
|
Height: Single
Высота контрола |
property
|
Width: Single
Ширина контрола |
property
|
NaturalSize: TSizeF
Естественный размер контрола. Каждый контрол может сказать, какой размер ему необходим, чтобы нормально отобразить свое содержимое. |
property
|
Stored: Boolean
Нужно ли при серилизации сохранять текущий контрол. |
property
|
TagObject: TObject
Место хранения пользовательских данных, ассоциированных с данным контролом. |
property
|
Locked: Boolean
Позволяет заблокировать выделение компонента мышкой в дизайн тайме. |
property
|
Alignment: TfgControlAlignment
Настройки выравнивания контрола в рамках родителя. |
property
|
PositionMode: TfgPositionMode
Режим позиционирования контрола в рамках родителя (в абсолютных координатах / относительно). |
property
|
Position: TfgPosition
Позиция контрола в локальных логических координатах родителя Parent . |
property
|
RelativePosition: TfgRelativePosition
Относительная позиция контролов относительно родителя. Актуально только для Относительная позиция контролов относительно родителя. Актуально только для . |
property
|
Size: TfgSize
Размер контрола в логических координатах. |
property
|
Constraints: TfgConstraints
Ограничение на размеры контрола. |
property
|
Margins: TfgMargins
Внешние отступы контрола. Используются при выравнивании текущего контрола в рамках контейнера. |
property
|
AlignWithMargins: Boolean
Нужно ли использовать заданные внешние отступы Margins . |
property
|
GestureKinds: TfgGestureKinds
Виды поддерживаемых жестов. |
property
|
LookupName: string
Идентификатор, используемый для поиска данного контрола среди других. Актуально для ситуаций, когда несколько контролов могут иметь одно и тоже имя для поиска и нам нужно найти данный контрол в определенной части поддерева. |
property
|
Opacity: Single
Прозрачность контрола. |
property
|
BackgroundName: TfgAssetName
Настройки отображения заднего фона контрола. |
property
|
Visible: Boolean
Видимость контрола. |
property
|
HitTest: Boolean
Описание отсутствует. |