private Relayout ( SourceChangeDetails details, LayoutCallbacks lcb ) : void | ||
details | SourceChangeDetails | |
lcb | LayoutCallbacks | |
return | void |
/// <summary> /// Redo the layout of the paragraph given the Source changes indicated in the given details. /// </summary> /// <param name="details"></param> private void Relayout(SourceChangeDetails details) { // We would prefer to keep both sources intact, but we can't just do Source = details.NewSource, // because there is currently no way to change the Source of existing segments we may want to reuse. Source.Copyfrom(details.NewSource); var oldHeight = Height; var oldWidth = Width; using (var gh = Root.Site.DrawingInfo) { // Enhance JohnT: margins: need to adjust MaxWidth for margins and padding of containing boxes. var info = new LayoutInfo(ChildTransformFromRootTransform(gh.Transform), Root.LastLayoutInfo.MaxWidth, gh.VwGraphics, Root.LastLayoutInfo.RendererFactory); var builder = new ParaBuilder(this, info); using (var lcb = new LayoutCallbacks(Root)) { builder.Relayout(details, lcb); if (Height != oldHeight || Width != oldWidth) { RelayoutParents(gh); } } } }
/// <summary> /// Redo the layout of the paragraph given the Source changes indicated in the given details. /// </summary> /// <param name="details"></param> private void Relayout(SourceChangeDetails details) { // We would prefer to keep both sources intact, but we can't just do Source = details.NewSource, // because there is currently no way to change the Source of existing segments we may want to reuse. Source.Copyfrom(details.NewSource); var oldHeight = Height; var oldWidth = Width; using (var gh = Root.Site.DrawingInfo) { // Enhance JohnT: margins: need to adjust MaxWidth for margins and padding of containing boxes. var info = new LayoutInfo(ChildTransformFromRootTransform(gh.Transform), Root.LastLayoutInfo.MaxWidth, gh.VwGraphics, Root.LastLayoutInfo.RendererFactory); var builder = new ParaBuilder(this, info); using (var lcb = new LayoutCallbacks(Root)) { builder.Relayout(details, lcb); if (Height != oldHeight || Width != oldWidth) RelayoutParents(gh); } } }