Class TCastlePackedGroup
Unit
Declaration
type TCastlePackedGroup = class(TCastleUserInterface)
Description
Abstract ancestor for containers that pack children, like TCastleHorizontalGroup and TCastleVerticalGroup.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleUserInterface
- TCastlePackedGroup
Overview
Fields
FPackingValid: boolean; |
|
nested const DefaultPadding = 0; |
|
nested const DefaultSpacing = 0; |
Methods
procedure DoPackChildren(out InsideWidth, InsideHeight: Single); virtual; abstract; |
|
procedure PreferredSize(var PreferredWidth, PreferredHeight: Single); override; |
|
procedure Loaded; override; |
|
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
procedure BeforeRender; override; |
|
procedure Render; override; |
|
procedure VisibleChange(const Changes: TCastleUserInterfaceChanges; const ChangeInitiatedByChildren: boolean = false); override; |
|
procedure EditorAllowResize(out ResizeWidth, ResizeHeight: Boolean; out Reason: String); override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
property FrameColor: TCastleColor read FFrameColor write SetFrameColor; deprecated 'display frame using Border or parent UI control'; |
|
property Frame: boolean read FFrame write SetFrame default false; deprecated 'display frame using Border or parent UI control'; |
|
property Padding: Single read FPadding write SetPadding default DefaultPadding; |
|
property Spacing: Single read FSpacing write SetSpacing default DefaultSpacing; |
|
property AutoSizeWidth: Boolean
read FAutoSizeWidth write SetAutoSizeWidth default true; |
|
property AutoSizeHeight: Boolean
read FAutoSizeHeight write SetAutoSizeHeight default true; |
|
property FrameColorPersistent: TCastleColorPersistent read FFrameColorPersistent ; |
Description
Fields
FPackingValid: boolean; |
|
This item has no description. |
nested const DefaultPadding = 0; |
|
This item has no description. |
nested const DefaultSpacing = 0; |
|
This item has no description. |
Methods
procedure DoPackChildren(out InsideWidth, InsideHeight: Single); virtual; abstract; |
|
This item has no description. |
procedure PreferredSize(var PreferredWidth, PreferredHeight: Single); override; |
|
This item has no description. Showing description inherited from TCastleUserInterface.PreferredSize. Controls that have a preferred size should override this. By default this contains values derived from Width, WidthFraction, Height, HeightFraction, with Border subtracted. Note that the arguments should be already scaled, i.e. multiplied by UIScale, i.e. expressed in final device pixels. Note that the returned PreferredWidth and PreferredHeight must not include the space for Border. Border size will be added later. |
procedure Loaded; override; |
|
This item has no description. |
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
procedure BeforeRender; override; |
|
This item has no description. Showing description inherited from TCastleUserInterface.BeforeRender. Prepare your resources, right before drawing. Called only when Exists and GLInitialized. Do not explicitly call this method. Instead, render controls by adding them to the TCastleContainer.Controls list, or render them explicitly (for off-screen rendering) by TCastleContainer.RenderControl. |
procedure Render; override; |
|
This item has no description. Showing description inherited from TCastleUserInterface.Render. Render a control. Called only when Exists and render context is initialized. Do not call this method. It will be automatically called by the engine when needed. It will be called when UI is part of TCastleContainer.Controls list or rendered (e.g. for off-screen rendering) by TCastleContainer.RenderControl. You should only override this method. See https://castle-engine.io/manual_2d_ui_custom_drawn.php for examples what you can put here. You can depend on some OpenGL state being set before calling this method. You can depend on it being set, and you can carelessly change it. This state we set:
Beware that GLSL RenderContext.CurrentProgram has undefined value when this is called. You should always set it, before making direct OpenGL drawing calls (all the engine drawing routines do it already, this is only a concern if you make direct OpenGL / OpenGLES calls). |
procedure VisibleChange(const Changes: TCastleUserInterfaceChanges; const ChangeInitiatedByChildren: boolean = false); override; |
|
This item has no description. Showing description inherited from TCastleUserInterface.VisibleChange. Called always when something important inside this control (or it's children) changed. To be more precise, this is called when something mentioned among the TCastleUserInterfaceChange enumerated items changed. This is always called with Changes <> [] (non-empty set). |
procedure EditorAllowResize(out ResizeWidth, ResizeHeight: Boolean; out Reason: String); override; |
|
This item has no description. Showing description inherited from TCastleUserInterface.EditorAllowResize. Override this to prevent resizing some dimension in CGE editor. |
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
This item has no description. Showing description inherited from TCastleComponent.PropertySections. Section where to show property in the editor. |
Properties
property FrameColor: TCastleColor read FFrameColor write SetFrameColor; deprecated 'display frame using Border or parent UI control'; |
|
Warning: this symbol is deprecated: display frame using Border or parent UI control If Frame, this is the frame's color. By default white. |
property Padding: Single read FPadding write SetPadding default DefaultPadding; |
|
This item has no description. |
property Spacing: Single read FSpacing write SetSpacing default DefaultSpacing; |
|
This item has no description. |
property AutoSizeWidth: Boolean
read FAutoSizeWidth write SetAutoSizeWidth default true; |
|
Whether the control's size is automatically adjusted to wrap children tightly. Be careful to not create a recursive loop! Group's size calculation always looks at children size (even when auto-size is off, since it needs to arrange children next to each other anyway). This means that children size cannot depend on a parent. So a direct child of TCastleVerticalGroup or TCastleHorizontalGroup cannot use FullSize, or WidthFraction or HeightFraction. This would create a loop in calculations, which would be forcefully resolved by some control having undefined size. So, you can only deactivate auto-size on a group if all children have explicitly defined size using their Width and Height properties. |
property AutoSizeHeight: Boolean
read FAutoSizeHeight write SetAutoSizeHeight default true; |
|
This item has no description. |
property FrameColorPersistent: TCastleColorPersistent read FFrameColorPersistent ; |
|
FrameColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write FrameColor directly. See also
|
Generated by PasDoc 0.16.0-snapshot.