| 1 |
{ -*- buffer-read-only: t -*- |
| 2 |
|
| 3 |
Copyright 2015-2024 Michalis Kamburelis. |
| 4 |
|
| 5 |
This file is part of "Castle Game Engine". |
| 6 |
|
| 7 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 8 |
included in this distribution, for details about the copyright. |
| 9 |
|
| 10 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
|
| 14 |
---------------------------------------------------------------------------- |
| 15 |
} |
| 16 |
|
| 17 |
{ Automatically generated node properties. |
| 18 |
|
| 19 |
Do not edit this file manually! |
| 20 |
To add new properties: |
| 21 |
- add them to the text files in tools/internal/x3d-nodes-to-pascal/nodes-specification/ , |
| 22 |
- and regenerate include files by running x3d-nodes-to-pascal } |
| 23 |
|
| 24 |
{$ifdef read_interface} |
| 25 |
|
| 26 |
strict private |
| 27 |
function GetSpacing: Single; |
| 28 |
procedure SetSpacing(const Value: Single); |
| 29 |
public |
| 30 |
{ Create node fields and events. } |
| 31 |
procedure CreateNode; override; |
| 32 |
class function ClassX3DType: String; override; |
| 33 |
class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override; |
| 34 |
|
| 35 |
strict private FFdString: TMFString; |
| 36 |
{ Internal wrapper for property @code(Text). This wrapper API may change, we advise to access simpler @code(Text) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 37 |
public property FdString: TMFString read FFdString; |
| 38 |
{ } |
| 39 |
procedure SetText(const Value: array of string); overload; |
| 40 |
{ } |
| 41 |
procedure SetText(const Value: TCastleStringList); overload; |
| 42 |
|
| 43 |
strict private FFdSpacing: TSFFloat; |
| 44 |
{ Internal wrapper for property @code(Spacing). This wrapper API may change, we advise to access simpler @code(Spacing) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 45 |
public property FdSpacing: TSFFloat read FFdSpacing; |
| 46 |
{ } |
| 47 |
property Spacing: Single read GetSpacing write SetSpacing; |
| 48 |
|
| 49 |
strict private FFdJustification: TSFEnum; |
| 50 |
{ Internal wrapper for property @code(Justification). This wrapper API may change, we advise to access simpler @code(Justification) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 51 |
public property FdJustification: TSFEnum read FFdJustification; |
| 52 |
|
| 53 |
strict private FFdWidth: TMFFloat; |
| 54 |
{ Internal wrapper for property @code(Width). This wrapper API may change, we advise to access simpler @code(Width) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 55 |
public property FdWidth: TMFFloat read FFdWidth; |
| 56 |
{ } |
| 57 |
procedure SetWidth(const Value: array of Single); overload; |
| 58 |
{ } |
| 59 |
procedure SetWidth(const Value: TSingleList); overload; |
| 60 |
|
| 61 |
{$endif read_interface} |
| 62 |
|
| 63 |
{$ifdef read_implementation} |
| 64 |
|
| 65 |
{ TAsciiTextNode_1 ----------------------------------------------- } |
| 66 |
|
| 67 |
procedure TAsciiTextNode_1.SetText(const Value: array of string); |
| 68 |
begin |
| 69 |
FdString.Send(Value); |
| 70 |
end; |
| 71 |
|
| 72 |
procedure TAsciiTextNode_1.SetText(const Value: TCastleStringList); |
| 73 |
begin |
| 74 |
FdString.Send(Value); |
| 75 |
end; |
| 76 |
|
| 77 |
function TAsciiTextNode_1.GetSpacing: Single; |
| 78 |
begin |
| 79 |
Result := FdSpacing.Value; |
| 80 |
end; |
| 81 |
|
| 82 |
procedure TAsciiTextNode_1.SetSpacing(const Value: Single); |
| 83 |
begin |
| 84 |
FdSpacing.Send(Value); |
| 85 |
end; |
| 86 |
|
| 87 |
procedure TAsciiTextNode_1.SetWidth(const Value: array of Single); |
| 88 |
begin |
| 89 |
FdWidth.Send(Value); |
| 90 |
end; |
| 91 |
|
| 92 |
procedure TAsciiTextNode_1.SetWidth(const Value: TSingleList); |
| 93 |
begin |
| 94 |
FdWidth.Send(Value); |
| 95 |
end; |
| 96 |
|
| 97 |
class function TAsciiTextNode_1.ForVRMLVersion(const Version: TX3DVersion): Boolean; |
| 98 |
begin |
| 99 |
Result := Version.Major <= 1; // parse this node only in VRML 1.0 and Inventor files |
| 100 |
end; |
| 101 |
|
| 102 |
class function TAsciiTextNode_1.ClassX3DType: String; |
| 103 |
begin |
| 104 |
Result := 'AsciiText'; |
| 105 |
end; |
| 106 |
|
| 107 |
procedure TAsciiTextNode_1.CreateNode; |
| 108 |
begin |
| 109 |
inherited; |
| 110 |
|
| 111 |
FFdString := TMFString.Create(Self, True, 'string', ['']); |
| 112 |
FdString.ChangeAlways := chGeometry; |
| 113 |
AddField(FFdString); |
| 114 |
|
| 115 |
FFdSpacing := TSFFloat.Create(Self, True, 'spacing', 1); |
| 116 |
FdSpacing.ChangeAlways := chGeometry; |
| 117 |
AddField(FFdSpacing); |
| 118 |
|
| 119 |
FFdJustification := TSFEnum.Create(Self, True, 'justification', @JustificationNames1, Ord(High(JustificationNames1)) + 1, JUSTIFICATION_LEFT); |
| 120 |
FdJustification.ChangeAlways := chGeometry; |
| 121 |
AddField(FFdJustification); |
| 122 |
|
| 123 |
FFdWidth := TMFFloat.Create(Self, True, 'width', [0]); |
| 124 |
FdWidth.ChangeAlways := chGeometry; |
| 125 |
AddField(FFdWidth); |
| 126 |
end; |
| 127 |
|
| 128 |
{$endif read_implementation} |