public override Status Layout(Area area) { if (this.marker == MarkerStart) { AbsolutePositionProps mAbsProps = propMgr.GetAbsolutePositionProps(); BorderAndPadding bap = propMgr.GetBorderAndPadding(); BackgroundProps bProps = propMgr.GetBackgroundProps(); MarginProps mProps = propMgr.GetMarginProps(); this.marker = 0; this.position = this.properties.GetProperty("position").GetEnum(); this.top = this.properties.GetProperty("top").GetLength().MValue(); this.bottom = this.properties.GetProperty("bottom").GetLength().MValue(); this.left = this.properties.GetProperty("left").GetLength().MValue(); this.right = this.properties.GetProperty("right").GetLength().MValue(); this.width = this.properties.GetProperty("width").GetLength().MValue(); this.height = this.properties.GetProperty("height").GetLength().MValue(); span = this.properties.GetSpanKind(); area.GetMyRefs().InitializeID(this.properties.GetId(), area); } AreaContainer container = (AreaContainer)area; if ((this.width == 0) && (this.height == 0)) { width = right - left; height = bottom - top; } this.areaContainer = new AreaContainer(propMgr.GetFontState(container.getFontInfo()), container.getXPosition() + left, container.GetYPosition() - top, width, height, position); areaContainer.setPage(area.getPage()); areaContainer.setBackground(propMgr.GetBackgroundProps()); areaContainer.setBorderAndPadding(propMgr.GetBorderAndPadding()); areaContainer.start(); areaContainer.setAbsoluteHeight(0); areaContainer.setIDReferences(area.getIDReferences()); int numChildren = this.children.Count; for (int i = this.marker; i < numChildren; i++) { FObj fo = (FObj)children[i]; Status status = fo.Layout(areaContainer); } areaContainer.end(); if (position == Position.ABSOLUTE) { areaContainer.SetHeight(height); } area.addChild(areaContainer); return(new Status(Status.OK)); }
public override Status Layout(Area area) { if (this.marker == MarkerStart) { AbsolutePositionProps mAbsProps = propMgr.GetAbsolutePositionProps(); BorderAndPadding bap = propMgr.GetBorderAndPadding(); BackgroundProps bProps = propMgr.GetBackgroundProps(); MarginProps mProps = propMgr.GetMarginProps(); this.marker = 0; this.position = this.properties.GetProperty("position").GetEnum(); this.top = this.properties.GetProperty("top").GetLength().MValue(); this.bottom = this.properties.GetProperty("bottom").GetLength().MValue(); this.left = this.properties.GetProperty("left").GetLength().MValue(); this.right = this.properties.GetProperty("right").GetLength().MValue(); this.width = this.properties.GetProperty("width").GetLength().MValue(); this.height = this.properties.GetProperty("height").GetLength().MValue(); span = this.properties.GetProperty("span").GetEnum(); string id = this.properties.GetProperty("id").GetString(); area.getIDReferences().InitializeID(id, area); } AreaContainer container; // Apply fix proposed by claytonrumley // on http://fonet.codeplex.com/workitem/4647 if (area is BlockArea) { container = ((BlockArea)area).getNearestAncestorAreaContainer(); } else { container = (AreaContainer)area; } if ((this.width == 0) && (this.height == 0)) { width = right - left; height = bottom - top; } this.areaContainer = new AreaContainer(propMgr.GetFontState(container.getFontInfo()), container.getXPosition() + left, container.GetYPosition() - top, width, height, position); areaContainer.setPage(area.getPage()); areaContainer.setBackground(propMgr.GetBackgroundProps()); areaContainer.setBorderAndPadding(propMgr.GetBorderAndPadding()); areaContainer.start(); areaContainer.setAbsoluteHeight(0); areaContainer.setIDReferences(area.getIDReferences()); int numChildren = this.children.Count; for (int i = this.marker; i < numChildren; i++) { FObj fo = (FObj)children[i]; Status status = fo.Layout(areaContainer); } areaContainer.end(); if (position == Position.ABSOLUTE) { areaContainer.SetHeight(height); } area.addChild(areaContainer); return(new Status(Status.OK)); }
public AbsolutePositionProps GetAbsolutePositionProps() { AbsolutePositionProps props = new AbsolutePositionProps(); return props; }
public AbsolutePositionProps GetAbsolutePositionProps() { AbsolutePositionProps props = new AbsolutePositionProps(); return(props); }