Class TSFStringEnum

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSFStringEnum = class(TSFString)

Description

String field that contains a value from a specified set. This wraps a commonly used VRML/X3D construct where SFString field is used to hold values from some limited set, thus emulating an "enumerated" field.

Access the EnumValue to get / set the field value as an integer, which is an index to ValueNames array.

Hierarchy

Overview

Methods

Protected procedure SetValue(const NewValue: string); override;
Protected procedure SetDefaultValue(const NewDefaultValue: string); override;
Protected class function ExposedEventsFieldClass: TX3DFieldClass; override;
Public constructor Create(AParentNode: TX3DFileItem; const AName: string; const AEnumNames: array of string; const AValue: Integer);
Public destructor Destroy; override;
Public procedure SendEnumValue(const NewValue: Integer);

Properties

Public property EnumValue: Integer read FEnumValue write SetEnumValue;
Public property DefaultEnumValue: Integer read FDefaultEnumValue write SetDefaultEnumValue;

Description

Methods

Protected procedure SetValue(const NewValue: string); override;
 
Protected procedure SetDefaultValue(const NewDefaultValue: string); override;
 
Protected class function ExposedEventsFieldClass: TX3DFieldClass; override;
 
Public constructor Create(AParentNode: TX3DFileItem; const AName: string; const AEnumNames: array of string; const AValue: Integer);
 
Public destructor Destroy; override;
 
Public procedure SendEnumValue(const NewValue: Integer);
 

Properties

Public property EnumValue: Integer read FEnumValue write SetEnumValue;
 
Public property DefaultEnumValue: Integer read FDefaultEnumValue write SetDefaultEnumValue;