Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_text.inc

raw
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 GetFontStyle: TAbstractFontStyleNode;
28 procedure SetFontStyle(const Value: TAbstractFontStyleNode);
29 function GetMaxExtent: Single;
30 procedure SetMaxExtent(const Value: Single);
31 function GetMaxDisplayChars: Integer;
32 procedure SetMaxDisplayChars(const Value: Integer);
33 function GetTexCoord: TX3DNode;
34 procedure SetTexCoord(const Value: TX3DNode);
35 public
36 { Create node fields and events. }
37 procedure CreateNode; override;
38 class function ClassX3DType: String; override;
39
40 strict private FFdFontStyle: TSFNode;
41 { Internal wrapper for property @code(FontStyle). This wrapper API may change, we advise to access simpler @code(FontStyle) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
42 public property FdFontStyle: TSFNode read FFdFontStyle;
43 { }
44 property FontStyle: TAbstractFontStyleNode read GetFontStyle write SetFontStyle;
45
46 strict private FFdLength: TMFFloat;
47 { Internal wrapper for property @code(Length). This wrapper API may change, we advise to access simpler @code(Length) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdLength: TMFFloat read FFdLength;
49 { }
50 procedure SetLength(const Value: array of Single); overload;
51 { }
52 procedure SetLength(const Value: TSingleList); overload;
53
54 strict private FFdMaxExtent: TSFFloat;
55 { Internal wrapper for property @code(MaxExtent). This wrapper API may change, we advise to access simpler @code(MaxExtent) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
56 public property FdMaxExtent: TSFFloat read FFdMaxExtent;
57 { }
58 property MaxExtent: Single read GetMaxExtent write SetMaxExtent;
59
60 strict private FFdMaxDisplayChars: TSFInt32;
61 { Internal wrapper for property @code(MaxDisplayChars). This wrapper API may change, we advise to access simpler @code(MaxDisplayChars) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
62 public property FdMaxDisplayChars: TSFInt32 read FFdMaxDisplayChars;
63 { }
64 property MaxDisplayChars: Integer read GetMaxDisplayChars write SetMaxDisplayChars;
65
66 strict private FFdString: TMFString;
67 { 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). }
68 public property FdString: TMFString read FFdString;
69 { }
70 procedure SetText(const Value: array of string); overload;
71 { }
72 procedure SetText(const Value: TCastleStringList); overload;
73
74 strict private FEventLineBounds: TMFVec2fEvent;
75 { }
76 public property EventLineBounds: TMFVec2fEvent read FEventLineBounds;
77
78 strict private FEventOrigin: TSFVec3fEvent;
79 { }
80 public property EventOrigin: TSFVec3fEvent read FEventOrigin;
81
82 strict private FEventTextBounds: TSFVec2fEvent;
83 { }
84 public property EventTextBounds: TSFVec2fEvent read FEventTextBounds;
85
86 strict private FFdSolid: TSFBool;
87 { Internal wrapper for property @code(Solid). This wrapper API may change, we advise to access simpler @code(Solid) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
88 public property FdSolid: TSFBool read FFdSolid;
89
90 strict private FFdTexCoord: TSFNode;
91 { Internal wrapper for property @code(TexCoord). This wrapper API may change, we advise to access simpler @code(TexCoord) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
92 public property FdTexCoord: TSFNode read FFdTexCoord;
93 { }
94 property TexCoord: TX3DNode read GetTexCoord write SetTexCoord;
95
96 {$endif read_interface}
97
98 {$ifdef read_implementation}
99
100 { TTextNode ----------------------------------------------- }
101
102 function TTextNode.GetFontStyle: TAbstractFontStyleNode;
103 begin
104 if FdFontStyle.Value is TAbstractFontStyleNode then
105 Result := TAbstractFontStyleNode(FdFontStyle.Value)
106 else
107 Result := nil;
108 end;
109
110 procedure TTextNode.SetFontStyle(const Value: TAbstractFontStyleNode);
111 begin
112 FdFontStyle.Send(Value);
113 end;
114
115 procedure TTextNode.SetLength(const Value: array of Single);
116 begin
117 FdLength.Send(Value);
118 end;
119
120 procedure TTextNode.SetLength(const Value: TSingleList);
121 begin
122 FdLength.Send(Value);
123 end;
124
125 function TTextNode.GetMaxExtent: Single;
126 begin
127 Result := FdMaxExtent.Value;
128 end;
129
130 procedure TTextNode.SetMaxExtent(const Value: Single);
131 begin
132 FdMaxExtent.Send(Value);
133 end;
134
135 function TTextNode.GetMaxDisplayChars: Integer;
136 begin
137 Result := FdMaxDisplayChars.Value;
138 end;
139
140 procedure TTextNode.SetMaxDisplayChars(const Value: Integer);
141 begin
142 FdMaxDisplayChars.Send(Value);
143 end;
144
145 procedure TTextNode.SetText(const Value: array of string);
146 begin
147 FdString.Send(Value);
148 end;
149
150 procedure TTextNode.SetText(const Value: TCastleStringList);
151 begin
152 FdString.Send(Value);
153 end;
154
155 function TTextNode.GetTexCoord: TX3DNode;
156 begin
157 if FdTexCoord.Value is TX3DNode then
158 Result := TX3DNode(FdTexCoord.Value)
159 else
160 Result := nil;
161 end;
162
163 procedure TTextNode.SetTexCoord(const Value: TX3DNode);
164 begin
165 FdTexCoord.Send(Value);
166 end;
167
168 class function TTextNode.ClassX3DType: String;
169 begin
170 Result := 'Text';
171 end;
172
173 procedure TTextNode.CreateNode;
174 begin
175 inherited;
176
177 FFdFontStyle := TSFNode.Create(Self, True, 'fontStyle', [TAbstractFontStyleNode]);
178 FdFontStyle.ChangeAlways := chGeometryFontChanged;
179 AddField(FFdFontStyle);
180
181 FFdLength := TMFFloat.Create(Self, True, 'length', []);
182 FdLength.ChangeAlways := chGeometry;
183 AddField(FFdLength);
184
185 FFdMaxExtent := TSFFloat.Create(Self, True, 'maxExtent', 0.0);
186 FdMaxExtent.ChangeAlways := chGeometry;
187 FdMaxExtent.MustBeNonnegative := true;
188 AddField(FFdMaxExtent);
189
190 FFdMaxDisplayChars := TSFInt32.Create(Self, True, 'maxDisplayChars', -1);
191 FdMaxDisplayChars.ChangeAlways := chGeometry;
192 AddField(FFdMaxDisplayChars);
193
194 FFdString := TMFString.Create(Self, True, 'string', []);
195 FdString.ChangeAlways := chGeometry;
196 AddField(FFdString);
197
198 FEventLineBounds := TMFVec2fEvent.Create(Self, 'lineBounds', false);
199 AddEvent(FEventLineBounds);
200
201 FEventOrigin := TSFVec3fEvent.Create(Self, 'origin', false);
202 AddEvent(FEventOrigin);
203
204 FEventTextBounds := TSFVec2fEvent.Create(Self, 'textBounds', false);
205 AddEvent(FEventTextBounds);
206
207 FFdSolid := TSFBool.Create(Self, False, 'solid', false);
208 FdSolid.ChangeAlways := chGeometry;
209 AddField(FFdSolid);
210
211 FFdTexCoord := TSFNode.Create(Self, True, 'texCoord', [TTextureCoordinateGeneratorNode, TProjectedTextureCoordinateNode, TMultiGeneratedTextureCoordinateNode]);
212 FdTexCoord.ChangeAlways := chGeometry;
213 AddField(FFdTexCoord);
214 end;
215
216 {$endif read_implementation}