Class TFloatRectanglePersistent

Unit

Declaration

type TFloatRectanglePersistent = class(TCastleComponent)

Description

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

Component with various CGE extensions: can be a parent of other non-visual components (to display them in CGE editor and serialize them to files), can be translated, can have custom logic when serializing/deserializing (CustomSerialization).

Note that everywhere in CGE (in particular in editor and when serializing) we handle a standard Pascal TComponent as well. So there's no need to derive all your components from TCastleComponent, so you derive from standard TComponent too. You can use TCastleComponent only if necessary, i.e. only if you need one of the extra features in this class.

Hierarchy

Overview

Fields

Public InternalGetValue: TGetFloatRectangleEvent;
Public InternalSetValue: TSetFloatRectangleEvent;
Public InternalDefaultValue: TFloatRectangle;

Methods

Protected procedure Loaded; override;
Public function ValueIsStreamed: Boolean; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;
Public function ToString: String; override;

Properties

Public property Value: TFloatRectangle read GetValue write SetValue;
Published property Left: Single read GetLeft write SetLeft stored LeftIsStored nodefault;
Published property Bottom: Single read GetBottom write SetBottom stored BottomIsStored nodefault;
Published property Width: Single read GetWidth write SetWidth stored WidthIsStored nodefault;
Published property Height: Single read GetHeight write SetHeight stored HeightIsStored nodefault;

Description

Fields

Public InternalGetValue: TGetFloatRectangleEvent;

This item has no description.

Public InternalSetValue: TSetFloatRectangleEvent;

This item has no description.

Public InternalDefaultValue: TFloatRectangle;

This item has no description.

Methods

Protected procedure Loaded; override;

This item has no description.

Public function ValueIsStreamed: Boolean; override;

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.

Public 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.

Public function ToString: String; override;

This item has no description.

Properties

Public property Value: TFloatRectangle read GetValue write SetValue;

This item has no description.

Published property Left: Single read GetLeft write SetLeft stored LeftIsStored nodefault;

This item has no description.

Published property Bottom: Single read GetBottom write SetBottom stored BottomIsStored nodefault;

This item has no description.

Published property Width: Single read GetWidth write SetWidth stored WidthIsStored nodefault;

This item has no description.

Published property Height: Single read GetHeight write SetHeight stored HeightIsStored nodefault;

This item has no description.


Generated by PasDoc 0.16.0-snapshot.