/usr/src/castle-game-engine-5.0.0/x3d/x3d_layout.inc is in castle-game-engine-src 5.0.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | {
Copyright 2008-2014 Michalis Kamburelis.
This file is part of "Castle Game Engine".
"Castle Game Engine" is free software; see the file COPYING.txt,
included in this distribution, for details about the copyright.
"Castle Game Engine" is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----------------------------------------------------------------------------
}
{$ifdef read_interface}
{ }
TAbstractLayoutNode = class(TAbstractChildNode)
public
procedure CreateNode; override;
end;
TLayoutNode = class(TAbstractLayoutNode)
public
procedure CreateNode; override;
class function ClassNodeTypeName: string; override;
class function URNMatching(const URN: string): boolean; override;
private FFdAlign: TMFString;
public property FdAlign: TMFString read FFdAlign;
private FFdOffset: TMFFloat;
public property FdOffset: TMFFloat read FFdOffset;
private FFdOffsetUnits: TMFString;
public property FdOffsetUnits: TMFString read FFdOffsetUnits;
private FFdScaleMode: TMFString;
public property FdScaleMode: TMFString read FFdScaleMode;
private FFdSize: TMFFloat;
public property FdSize: TMFFloat read FFdSize;
private FFdSizeUnits: TMFString;
public property FdSizeUnits: TMFString read FFdSizeUnits;
end;
TLayoutGroupNode = class(TAbstractX3DGroupingNode)
public
procedure CreateNode; override;
class function ClassNodeTypeName: string; override;
class function URNMatching(const URN: string): boolean; override;
private FFdLayout: TSFNode;
public property FdLayout: TSFNode read FFdLayout;
private FFdViewport: TSFNode;
public property FdViewport: TSFNode read FFdViewport;
end;
TLayoutLayerNode = class(TAbstractLayerNode)
public
procedure CreateNode; override;
class function ClassNodeTypeName: string; override;
class function URNMatching(const URN: string): boolean; override;
{ Event in } { }
private FEventAddChildren: TMFNodeEvent;
public property EventAddChildren: TMFNodeEvent read FEventAddChildren;
{ Event in } { }
private FEventRemoveChildren: TMFNodeEvent;
public property EventRemoveChildren: TMFNodeEvent read FEventRemoveChildren;
private FFdChildren: TMFNode;
public property FdChildren: TMFNode read FFdChildren;
private FFdLayout: TSFNode;
public property FdLayout: TSFNode read FFdLayout;
end;
TScreenFontStyleNode = class(TAbstractFontStyleNode)
public
procedure CreateNode; override;
class function ClassNodeTypeName: string; override;
class function URNMatching(const URN: string): boolean; override;
private FFdFamily: TMFString;
public property FdFamily: TMFString read FFdFamily;
private FFdHorizontal: TSFBool;
public property FdHorizontal: TSFBool read FFdHorizontal;
private FFdJustify: TMFString;
public property FdJustify: TMFString read FFdJustify;
private FFdLanguage: TSFString;
public property FdLanguage: TSFString read FFdLanguage;
private FFdLeftToRight: TSFBool;
public property FdLeftToRight: TSFBool read FFdLeftToRight;
private FFdPointSize: TSFFloat;
public property FdPointSize: TSFFloat read FFdPointSize;
private FFdSpacing: TSFFloat;
public property FdSpacing: TSFFloat read FFdSpacing;
private FFdStyle: TSFString;
public property FdStyle: TSFString read FFdStyle;
private FFdTopToBottom: TSFBool;
public property FdTopToBottom: TSFBool read FFdTopToBottom;
end;
TScreenGroupNode = class(TAbstractX3DGroupingNode)
public
procedure CreateNode; override;
class function ClassNodeTypeName: string; override;
class function URNMatching(const URN: string): boolean; override;
end;
{$endif read_interface}
{$ifdef read_implementation}
procedure TAbstractLayoutNode.CreateNode;
begin
inherited;
DefaultContainerField := 'children';
end;
procedure TLayoutNode.CreateNode;
begin
inherited;
FFdAlign := TMFString.Create(Self, 'align', ['CENTER','CENTER']);
Fields.Add(FFdAlign);
{ X3D specification comment: ["LEFT"|"CENTER"|"RIGHT","BOTTOM"|"CENTER"|"TOP"] }
FFdOffset := TMFFloat.Create(Self, 'offset', [0,0]);
Fields.Add(FFdOffset);
{ X3D specification comment: (-Inf,Inf) }
FFdOffsetUnits := TMFString.Create(Self, 'offsetUnits', ['WORLD','WORLD']);
Fields.Add(FFdOffsetUnits);
{ X3D specification comment: ["WORLD","FRACTION","PIXEL"] }
FFdScaleMode := TMFString.Create(Self, 'scaleMode', ['NONE','NONE']);
Fields.Add(FFdScaleMode);
{ X3D specification comment: ["NONE","FRACTION","STRETCH","PIXEL"] }
FFdSize := TMFFloat.Create(Self, 'size', [1,1]);
Fields.Add(FFdSize);
{ X3D specification comment: (0,Inf) }
FFdSizeUnits := TMFString.Create(Self, 'sizeUnits', ['WORLD','WORLD']);
Fields.Add(FFdSizeUnits);
{ X3D specification comment: ["WORLD","FRACTION","PIXEL"] }
DefaultContainerField := 'children';
end;
class function TLayoutNode.ClassNodeTypeName: string;
begin
Result := 'Layout';
end;
class function TLayoutNode.URNMatching(const URN: string): boolean;
begin
Result := (inherited URNMatching(URN)) or
(URN = URNX3DNodes + ClassNodeTypeName);
end;
procedure TLayoutGroupNode.CreateNode;
begin
inherited;
FFdLayout := TSFNode.Create(Self, 'layout', [TAbstractLayoutNode]);
Fields.Add(FFdLayout);
FFdViewport := TSFNode.Create(Self, 'viewport', [TAbstractViewportNode]);
Fields.Add(FFdViewport);
DefaultContainerField := 'children';
end;
class function TLayoutGroupNode.ClassNodeTypeName: string;
begin
Result := 'LayoutGroup';
end;
class function TLayoutGroupNode.URNMatching(const URN: string): boolean;
begin
Result := (inherited URNMatching(URN)) or
(URN = URNX3DNodes + ClassNodeTypeName);
end;
procedure TLayoutLayerNode.CreateNode;
begin
inherited;
FEventAddChildren := TMFNodeEvent.Create(Self, 'addChildren', true);
Events.Add(FEventAddChildren);
FEventRemoveChildren := TMFNodeEvent.Create(Self, 'removeChildren', true);
Events.Add(FEventRemoveChildren);
FFdChildren := TMFNode.Create(Self, 'children', [TAbstractChildNode]);
Fields.Add(FFdChildren);
FFdLayout := TSFNode.Create(Self, 'layout', [TAbstractLayoutNode]);
Fields.Add(FFdLayout);
end;
class function TLayoutLayerNode.ClassNodeTypeName: string;
begin
Result := 'LayoutLayer';
end;
class function TLayoutLayerNode.URNMatching(const URN: string): boolean;
begin
Result := (inherited URNMatching(URN)) or
(URN = URNX3DNodes + ClassNodeTypeName);
end;
procedure TScreenFontStyleNode.CreateNode;
begin
inherited;
FFdFamily := TMFString.Create(Self, 'family', ['SERIF']);
FFdFamily.Exposed := false;
Fields.Add(FFdFamily);
FFdHorizontal := TSFBool.Create(Self, 'horizontal', true);
FFdHorizontal.Exposed := false;
Fields.Add(FFdHorizontal);
FFdJustify := TMFString.Create(Self, 'justify', ['BEGIN']);
FFdJustify.Exposed := false;
Fields.Add(FFdJustify);
{ X3D specification comment: ["BEGIN","END","FIRST","MIDDLE",""] }
FFdLanguage := TSFString.Create(Self, 'language', '');
FFdLanguage.Exposed := false;
Fields.Add(FFdLanguage);
FFdLeftToRight := TSFBool.Create(Self, 'leftToRight', true);
FFdLeftToRight.Exposed := false;
Fields.Add(FFdLeftToRight);
FFdPointSize := TSFFloat.Create(Self, 'pointSize', 12.0);
FFdPointSize.Exposed := false;
Fields.Add(FFdPointSize);
{ X3D specification comment: (0,Inf) }
FFdSpacing := TSFFloat.Create(Self, 'spacing', 1.0);
FFdSpacing.Exposed := false;
Fields.Add(FFdSpacing);
{ X3D specification comment: [0,Inf) }
FFdStyle := TSFString.Create(Self, 'style', 'PLAIN');
FFdStyle.Exposed := false;
Fields.Add(FFdStyle);
{ X3D specification comment: ["PLAIN"|"BOLD"|"ITALIC"|"BOLDITALIC"|""] }
FFdTopToBottom := TSFBool.Create(Self, 'topToBottom', true);
FFdTopToBottom.Exposed := false;
Fields.Add(FFdTopToBottom);
end;
class function TScreenFontStyleNode.ClassNodeTypeName: string;
begin
Result := 'ScreenFontStyle';
end;
class function TScreenFontStyleNode.URNMatching(const URN: string): boolean;
begin
Result := (inherited URNMatching(URN)) or
(URN = URNX3DNodes + ClassNodeTypeName);
end;
procedure TScreenGroupNode.CreateNode;
begin
inherited;
DefaultContainerField := 'children';
end;
class function TScreenGroupNode.ClassNodeTypeName: string;
begin
Result := 'ScreenGroup';
end;
class function TScreenGroupNode.URNMatching(const URN: string): boolean;
begin
Result := (inherited URNMatching(URN)) or
(URN = URNX3DNodes + ClassNodeTypeName);
end;
procedure RegisterLayoutNodes;
begin
NodesManager.RegisterNodeClasses([
TLayoutNode,
TLayoutGroupNode,
TLayoutLayerNode,
TScreenFontStyleNode,
TScreenGroupNode
]);
end;
{$endif read_implementation}
|