public override Layout DoPageBreak() { using (new TraceContextPusher(_generator, _traceContext)) { // We never split a photo row, so on a page break we always move all // of our content into a copy of ourself, and return that copy. This // leaves ourself empty, and the base class implementation will then // remove us from our container. PhotoRowLayout copy = new PhotoRowLayout(this); copy._photoRow = this._photoRow; copy._captionRow = this._captionRow; this.RemoveSubLayout(_photoRow); this.RemoveSubLayout(_captionRow); copy.AddSubLayout(_photoRow); copy.AddSubLayout(_captionRow); // Empty ourself _subLayouts.Clear(); _photoRow = null; _captionRow = null; return(copy); } }
private void RenderTableRow(TableRowLayout layout, ITable table) { ITableRow row = table.AddRow((s.TableRowStyle)layout.Style, layout.TrackingInfo); foreach (TableCellLayout cell in layout.SubLayouts) { RenderTableCell(cell, row); } }
private void RenderTableRowLayout(TableRowLayout layout, Page page) { TableRowStyle style = (TableRowStyle)layout.Style; if (style.BackColor != null) { page.AddPath(layout.Bounds.Points, 0, null, Convert.Color(style.BackColor)); } foreach (TableCellLayout cell in layout.Cells) { RenderTableCellLayout(cell, page); } }
public PhotoRowLayout( int numCells, Generator generator, int lineNumber, int linePosition) : base(generator, lineNumber, linePosition) { _numCells = numCells; _photoRow = new TableRowLayout(generator, null, _trackingInfo.LineNumber, _trackingInfo.LinePosition); _captionRow = new TableRowLayout(generator, null, _trackingInfo.LineNumber, _trackingInfo.LinePosition); AddSubLayout(_photoRow); AddSubLayout(_captionRow); // A photo row layout doesn't have its own conditions because it's not // defined in the design file. Any conditions governing the inclusion // of a photo are evaluated in the photo table layout when it loads // its content. So static conditions are implicitly satisfied here. _staticConditionsSatisfied = true; }
/// <summary> /// Copy constructor used during layout expansion and page break handling. /// </summary> public TableRowLayout(TableRowLayout src) : base(src) { _style = src._style; }
protected override void Clear() { base.Clear(); _photoRow = null; _captionRow = null; }