Class TCastleVector4PersistentSimple

Unit

Declaration

type TCastleVector4PersistentSimple = class(TCastleVector4Persistent)

Description

Like TCastleVector4Persistent, but it just contains TVector4, you don't need to provide InternalGetValue, InternalSetValue callbacks.

Source: scene/load/ifc/castleifc_ifc_types.inc (line 171).

Hierarchy

Show Additional Members:

Overview

Fields

Public InternalGetValue: TGetVector4Event;
Public InternalSetValue: TSetVector4Event;
Public InternalDefaultValue: TVector4;

Methods

Protected function GetInternalText: String; virtual;
Protected procedure SetInternalText(const Value: String); virtual;
Protected procedure SetName(const Value: TComponentName); override;
Protected procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); virtual;
Public destructor Destroy; override;
Public procedure CustomSerialization(const SerializationProcess: TSerializationProcess); virtual;
Public procedure SetTransient;
Public procedure AddNonVisualComponent(const NonVisualComponent: TComponent);
Public procedure InsertNonVisualComponent(const Index: Integer; const NonVisualComponent: TComponent);
Public procedure RemoveNonVisualComponent(const NonVisualComponent: TComponent);
Public function NonVisualComponentsIndexOf(const NonVisualComponent: TComponent): Integer;
Public function NonVisualComponentsCount: Integer;
Public function NonVisualComponentsEnumerate: TNonVisualComponentsEnumerator;
Public procedure DesignerInfo(const SList: TStrings); virtual;
Public procedure DesignerWarnings(const SList: TStrings); virtual;
Protected procedure Loaded; override;
Public function ValueIsStreamed: Boolean; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;
Public function ToString: String; override;
Public constructor Create(const AOwner: TComponent = nil);

Properties

Public property NonVisualComponents [const Index: Integer]: TComponent read GetNonVisualComponents;
Public property IsLoading: Boolean read FIsLoading;
Public property Value: TVector4 read GetValue write SetValue;
Published property X: Single read GetX write SetX stored XIsStored nodefault;
Published property Y: Single read GetY write SetY stored YIsStored nodefault;
Published property Z: Single read GetZ write SetZ stored ZIsStored nodefault;
Published property W: Single read GetW write SetW stored WIsStored nodefault;

Description

Fields

Public InternalGetValue: TGetVector4Event;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 171).

Public InternalSetValue: TSetVector4Event;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 172).

Public InternalDefaultValue: TVector4;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 173).

Methods

Protected function GetInternalText: String; virtual;

This item is declared in ancestor TCastleComponent.

This item has no description.

Source: base/castleclassutils.pas (line 575).

Protected procedure SetInternalText(const Value: String); virtual;

This item is declared in ancestor TCastleComponent.

This item has no description.

Source: base/castleclassutils.pas (line 576).

Protected procedure SetName(const Value: TComponentName); override;

This item is declared in ancestor TCastleComponent.

This item has no description.

Source: base/castleclassutils.pas (line 577).

Protected procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); virtual;

This item is declared in ancestor TCastleComponent.

Enumerate all properties that are possible to translate in this component. E.g. in TCastleLabel it will return TCastleLabel.Caption, in TCastleEdit it will return TCastleEdit.Text and TCastleEdit.Placeholder.

Returns only non-empty properties, thus assuming that if current (by convention, English) text is empty, then there is no point in translating it. Moreover descendants may define boolean properties to exclude particular text from translating, e.g. TCastleLabel.CaptionTranslate, TCastleEdit.TextTranslate, TCastleEdit.PlaceholderTranslate.

It is not recursive (it doesn't enumerate children properties). Use global TranslateProperties procedure to call this on a hierarchy of TComponent.

You usually don't want to call this method (it is called by other engine routines). But you may find it useful to override this, if you define new component.

Source: base/castleclassutils.pas (line 598).

Public destructor Destroy; override;

This item is declared in ancestor TCastleComponent.

This item has no description.

Source: base/castleclassutils.pas (line 604).

Public procedure CustomSerialization(const SerializationProcess: TSerializationProcess); virtual;

This item is declared in ancestor TCastleComponent.

Override this method to call various methods of SerializationProcess, which in turn allows to serialize/deserialize things that are not published. This allows to serialize/deserialize with more freedom, e.g. to serialize/deserialize some private field.

Source: base/castleclassutils.pas (line 610).

Public procedure SetTransient;

This item is declared in ancestor TCastleComponent.

Ignore this component when serializing parent's TCastleUserInterface.Controls list or TCastleTransform.List, and do not show this component in CGE editor. This simply sets csTransient flag in ComponentStyle.

This is useful for children that are automatically managed by the parent, and should not be modified by user code. For example, TCastleCheckbox is internally composed from TCastleImageControl and TCastleLabel children, but we don't want to serialize or even show these children to user.

Note that if you want to prevent this component from serializing as part of TCastleUserInterface.Controls list or TCastleTransform.List, but you still want it to be visible in CGE editor, then make it a "subcomponent" instead, by SetSubComponent(true).

Note that both csSubComponent and csTransient only disable the component serialization as part of parent's lists enumerated by CustomSerialization (see internal TCastleUserInterface.SerializeChildrenEnumerate , TCastleTransform.SerializeChildrenEnumerate, TCastleTransform.SerializeBehaviorsEnumerate).

If you will make the component published in its own property (which is normal for "subcomponents") then it will be serialized anyway, just as part of it's own property (like TCastleScrollView.ScrollArea). So to really avoid serializing a children component make it csSubComponent and/or csTransient, and do not publish it.

Source: base/castleclassutils.pas (line 663).

Public procedure AddNonVisualComponent(const NonVisualComponent: TComponent);

This item is declared in ancestor TCastleComponent.

Add non-visual component to this component. This is used to organize non-visual components in a tree hierarchy, in CGE designs and editor.

See also
NonVisualComponentsCount
Count of components added by AddNonVisualComponent.
NonVisualComponents
Components added by AddNonVisualComponent.
NonVisualComponentsEnumerate
You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do ....

Source: base/castleclassutils.pas (line 672).

Public procedure InsertNonVisualComponent(const Index: Integer; const NonVisualComponent: TComponent);

This item is declared in ancestor TCastleComponent.

Insert non-visual component to this component. This is used to organize non-visual components in a tree hierarchy, in CGE designs and editor.

See also
NonVisualComponentsCount
Count of components added by AddNonVisualComponent.
NonVisualComponents
Components added by AddNonVisualComponent.
NonVisualComponentsEnumerate
You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do ....

Source: base/castleclassutils.pas (line 681).

Public procedure RemoveNonVisualComponent(const NonVisualComponent: TComponent);

This item is declared in ancestor TCastleComponent.

Removes the component previously added by AddNonVisualComponent.

Source: base/castleclassutils.pas (line 684).

Public function NonVisualComponentsIndexOf(const NonVisualComponent: TComponent): Integer;

This item is declared in ancestor TCastleComponent.

Index of the previously added non-visual component. Returns -1 if the component was not found.

Source: base/castleclassutils.pas (line 688).

Public function NonVisualComponentsCount: Integer;

This item is declared in ancestor TCastleComponent.

Count of components added by AddNonVisualComponent.

See also
AddNonVisualComponent
Add non-visual component to this component.
NonVisualComponents
Components added by AddNonVisualComponent.
NonVisualComponentsEnumerate
You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do ....

Source: base/castleclassutils.pas (line 695).

Public function NonVisualComponentsEnumerate: TNonVisualComponentsEnumerator;

This item is declared in ancestor TCastleComponent.

You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do .... Do not call this method in other contexts, it is only useful for "for..in" construction.

See also
AddNonVisualComponent
Add non-visual component to this component.

Source: base/castleclassutils.pas (line 705).

Public procedure DesignerInfo(const SList: TStrings); virtual;

This item is declared in ancestor TCastleComponent.

Override to add information that should be visible at design-time. Call SList.Add for each new line of information.

Source: base/castleclassutils.pas (line 743).

Public procedure DesignerWarnings(const SList: TStrings); virtual;

This item is declared in ancestor TCastleComponent.

Override to add warnings that should be visible at design-time. Call SList.Add for each new warning.

Source: base/castleclassutils.pas (line 747).

Protected procedure Loaded; override;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 169).

Public function ValueIsStreamed: Boolean; override;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description. Showing description inherited from TCastleComponent.ValueIsStreamed.

Whether the current value of this object should be written to the stream. This should be True if anything inside this object should be serialized (which means it has non-default value or "stored" specifier indicates that it should be serialized).

This is used by CastleComponentSerialize, which is used in Castle Game Engine for all serialization.

In simple cases, this just says whether the current value of this object equals to some default value.

The default implementation of this class returns True (so always write).

Descendants that override this to sometimes return False (so no need to write) must be very careful: any addition of a new field requires extending this method, otherwise new field may not be saved sometimes (when all other fields are default). Descentants of such classes must also be aware of it. This check must include everything that is inside this object in JSON, including subcomponents and children objects (as done e.g. by TSerializationProcess.ReadWriteList). In practice, overriding this method is only reasonable for simple classes that will not change much in the future, like TCastleVector3Persistent.

The name of this method is consistent with TPropertyEditor.ValueIsStreamed in LCL.

Source: base/castlevectors_persistent.inc (line 176).

Public function PropertySections(const PropertyName: String): TPropertySections; override;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description. Showing description inherited from TCastleComponent.PropertySections.

Section where to show property in the editor.

Source: base/castlevectors_persistent.inc (line 177).

Public function ToString: String; override;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 178).

Public constructor Create(const AOwner: TComponent = nil);

This item has no description.

Source: scene/load/ifc/castleifc_ifc_types.inc (line 177).

Properties

Public property NonVisualComponents [const Index: Integer]: TComponent read GetNonVisualComponents;

This item is declared in ancestor TCastleComponent.

Components added by AddNonVisualComponent.

Source: base/castleclassutils.pas (line 698).

Public property IsLoading: Boolean read FIsLoading;

This item is declared in ancestor TCastleComponent.

Is the component during deserialization now.

Note: We can't use csLoading in ComponentState because in Delphi it is not possible to control it from CastleComponentSerialize.

Source: base/castleclassutils.pas (line 711).

Public property Value: TVector4 read GetValue write SetValue;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 175).

Published property X: Single read GetX write SetX stored XIsStored nodefault;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 180).

Published property Y: Single read GetY write SetY stored YIsStored nodefault;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 181).

Published property Z: Single read GetZ write SetZ stored ZIsStored nodefault;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 182).

Published property W: Single read GetW write SetW stored WIsStored nodefault;

This item is declared in ancestor TCastleVector4Persistent.

This item has no description.

Source: base/castlevectors_persistent.inc (line 183).


Generated by PasDoc 0.17.0.snapshot.