Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_layoutlayer.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 GetLayout: TAbstractLayoutNode;
28 procedure SetLayout(const Value: TAbstractLayoutNode);
29 public
30 { Create node fields and events. }
31 procedure CreateNode; override;
32 class function ClassX3DType: String; override;
33
34 strict private FEventAddChildren: TMFNodeEvent;
35 { }
36 public property EventAddChildren: TMFNodeEvent read FEventAddChildren;
37
38 strict private FEventRemoveChildren: TMFNodeEvent;
39 { }
40 public property EventRemoveChildren: TMFNodeEvent read FEventRemoveChildren;
41
42 strict private FFdChildren: TMFNode;
43 { Internal wrapper for property @code(Children). This wrapper API may change, we advise to access simpler @code(Children) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
44 public property FdChildren: TMFNode read FFdChildren;
45 { }
46 procedure SetChildren(const Value: array of TAbstractChildNode);
47
48 strict private FFdLayout: TSFNode;
49 { Internal wrapper for property @code(Layout). This wrapper API may change, we advise to access simpler @code(Layout) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
50 public property FdLayout: TSFNode read FFdLayout;
51 { }
52 property Layout: TAbstractLayoutNode read GetLayout write SetLayout;
53
54 {$endif read_interface}
55
56 {$ifdef read_implementation}
57
58 { TLayoutLayerNode ----------------------------------------------- }
59
60 procedure TLayoutLayerNode.SetChildren(const Value: array of TAbstractChildNode);
61 var
62 L: Integer;
63 A: array of TX3DNode;
64 begin
65 L := High(Value) + 1;
66 SetLength(A, L);
67 if L > 0 then
68 Move(Value[0], A[0], L * SizeOf(TAbstractChildNode));
69 FdChildren.Send(A);
70 end;
71
72 function TLayoutLayerNode.GetLayout: TAbstractLayoutNode;
73 begin
74 if FdLayout.Value is TAbstractLayoutNode then
75 Result := TAbstractLayoutNode(FdLayout.Value)
76 else
77 Result := nil;
78 end;
79
80 procedure TLayoutLayerNode.SetLayout(const Value: TAbstractLayoutNode);
81 begin
82 FdLayout.Send(Value);
83 end;
84
85 class function TLayoutLayerNode.ClassX3DType: String;
86 begin
87 Result := 'LayoutLayer';
88 end;
89
90 procedure TLayoutLayerNode.CreateNode;
91 begin
92 inherited;
93
94 FEventAddChildren := TMFNodeEvent.Create(Self, 'addChildren', true);
95 AddEvent(FEventAddChildren);
96
97 FEventRemoveChildren := TMFNodeEvent.Create(Self, 'removeChildren', true);
98 AddEvent(FEventRemoveChildren);
99
100 FFdChildren := TMFNode.Create(Self, True, 'children', [TAbstractChildNode]);
101 FdChildren.ChangeAlways := chVisibleNonGeometry;
102 AddField(FFdChildren);
103
104 FFdLayout := TSFNode.Create(Self, True, 'layout', [TAbstractLayoutNode]);
105 FdLayout.ChangeAlways := chVisibleNonGeometry;
106 AddField(FFdLayout);
107 end;
108
109 {$endif read_implementation}