100 lines
2.8 KiB
Plaintext
100 lines
2.8 KiB
Plaintext
type View3D = class(OpenXmlElement)
|
|
public
|
|
function Create();overload;
|
|
function Create(_node: XmlNode);overload;
|
|
function Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: View3D);override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property RotX read ReadXmlChildRotX;
|
|
property RotY read ReadXmlChildRotY;
|
|
property RAngAx read ReadXmlChildRAngAx;
|
|
function ReadXmlChildRotX();
|
|
function ReadXmlChildRotY();
|
|
function ReadXmlChildRAngAx();
|
|
|
|
public
|
|
// Children
|
|
XmlChildRotX: PureVal;
|
|
XmlChildRotY: PureVal;
|
|
XmlChildRAngAx: PureVal;
|
|
|
|
end;
|
|
|
|
function View3D.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "c", "view3D");
|
|
end;
|
|
|
|
function View3D.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function View3D.Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
class(OpenXmlElement).Create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function View3D.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "rotX": array(0, makeweakref(thisFunction(ReadXmlChildRotX))),
|
|
pre + "rotY": array(1, makeweakref(thisFunction(ReadXmlChildRotY))),
|
|
pre + "rAngAx": array(2, makeweakref(thisFunction(ReadXmlChildRAngAx))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function View3D.Copy(_obj: View3D);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlChildRotX) then
|
|
{self.}RotX.Copy(_obj.XmlChildRotX);
|
|
if not ifnil(_obj.XmlChildRotY) then
|
|
{self.}RotY.Copy(_obj.XmlChildRotY);
|
|
if not ifnil(_obj.XmlChildRAngAx) then
|
|
{self.}RAngAx.Copy(_obj.XmlChildRAngAx);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function View3D.ReadXmlChildRotX();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildRotX) then
|
|
begin
|
|
{self.}XmlChildRotX := new PureVal(self, {self.}Prefix, "rotX");
|
|
container_.Set({self.}XmlChildRotX);
|
|
end
|
|
return {self.}XmlChildRotX;
|
|
end;
|
|
|
|
function View3D.ReadXmlChildRotY();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildRotY) then
|
|
begin
|
|
{self.}XmlChildRotY := new PureVal(self, {self.}Prefix, "rotY");
|
|
container_.Set({self.}XmlChildRotY);
|
|
end
|
|
return {self.}XmlChildRotY;
|
|
end;
|
|
|
|
function View3D.ReadXmlChildRAngAx();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildRAngAx) then
|
|
begin
|
|
{self.}XmlChildRAngAx := new PureVal(self, {self.}Prefix, "rAngAx");
|
|
container_.Set({self.}XmlChildRAngAx);
|
|
end
|
|
return {self.}XmlChildRAngAx;
|
|
end;
|