protected override void AdjustLayoutRowsAfterGhostTrigger(int rowCount) { // Get the relevant LexSenseLayouter (either "this" or its parent). Either way, // its rows have already been adjusted but following senses (if any) need to have // their rows adjusted. var senseLayouter = ParentLayouter; Debug.Assert(senseLayouter is LexSenseLayouter); senseLayouter.LastRow = LastRow; Layouter parentEntryLayouter = senseLayouter; while (parentEntryLayouter.ParentLayouter != null) { parentEntryLayouter = parentEntryLayouter.ParentLayouter; } Debug.Assert(parentEntryLayouter is LexEntryLayouter); int first = parentEntryLayouter.ChildLayouts.IndexOf(senseLayouter); Debug.Assert(first >= 0); for (int i = first + 1; i < parentEntryLayouter.ChildLayouts.Count; ++i) { var layouter = parentEntryLayouter.ChildLayouts[i]; layouter.FirstRow = layouter.FirstRow + rowCount; layouter.LastRow = layouter.LastRow + rowCount; } // REVIEW: do we need to adjust rows for LexExampleSentenceLayouts? I don't think they're ever used, // since example sentences cannot be deleted and enabling the delete button is the only use of these // row numbers. }
private static void WriteLayouterRows(Layouter layouter, string indent) { Debug.WriteLine("{0}Layout: this={1}, FirstRow={2}, LastRow={3}", indent, layouter, layouter.FirstRow, layouter.LastRow); foreach (var child in layouter.ChildLayouts) { WriteLayouterRows(child, indent + " "); } }
protected static int AddChildrenWidgets(Layouter layouter, PalasoDataObject po, int row) { return(layouter.AddWidgets(po, row)); }