/// <summary> /// Copy the <see cref="P:Northwoods.Go.GoMultiTextNode.ListGroup" /> and all of the ports. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { GoMultiTextNode goMultiTextNode = (GoMultiTextNode)newgroup; base.CopyChildren(newgroup, env); goMultiTextNode.myLeftPorts = new List <GoObject>(); goMultiTextNode.myRightPorts = new List <GoObject>(); goMultiTextNode.myListGroup = (GoListGroup)env[myListGroup]; goMultiTextNode.myTopPort = (GoObject)env[myTopPort]; goMultiTextNode.myBottomPort = (GoObject)env[myBottomPort]; checked { for (int i = 0; i < myLeftPorts.Count; i++) { GoObject key = myLeftPorts[i]; GoObject item = (GoObject)env[key]; goMultiTextNode.myLeftPorts.Add(item); } for (int j = 0; j < myRightPorts.Count; j++) { GoObject key2 = myRightPorts[j]; GoObject item2 = (GoObject)env[key2]; goMultiTextNode.myRightPorts.Add(item2); } } }
/// <summary> /// Copying a GoControl does not copy any view to Control mappings. /// </summary> /// <param name="env"></param> /// <returns>The copied GoControl.</returns> public override GoObject CopyObject(GoCopyDictionary env) { GoControl obj = (GoControl)base.CopyObject(env); obj.myEditedObject = (GoObject)env[myEditedObject]; obj.myMap = null; return(obj); }
/// <summary> /// Copy the <see cref="P:Northwoods.Go.GoBoxNode.Port" /> and <see cref="P:Northwoods.Go.GoBoxNode.Body" />. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { base.CopyChildren(newgroup, env); GoBoxNode obj = (GoBoxNode)newgroup; obj.myPort = (GoPort)env[myPort]; obj.myBody = (GoObject)env[myBody]; }
/// <summary> /// Make sure the <see cref="P:Northwoods.Go.GoBalloon.Anchor" /> is the copied object, and update the /// background polygon's shape appropriately. /// </summary> /// <param name="env"></param> /// <param name="newobj"></param> public override void CopyObjectDelayed(GoCopyDictionary env, GoObject newobj) { base.CopyObjectDelayed(env, newobj); GoBalloon obj = (GoBalloon)newobj; obj.myAnchor = (env[myAnchor] as GoObject); obj.UpdateRoute(); }
/// <summary> /// Make copies of the background and the text object. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { base.CopyChildren(newgroup, env); GoComment obj = (GoComment)newgroup; obj.myPartID = -1; obj.myBack = (GoObject)env[myBack]; obj.myLabel = (GoText)env[myLabel]; }
/// <summary> /// Make copies of the icon, label and port. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> /// <remarks> /// Remember to override this to copy any objects you add to this class. /// </remarks> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { base.CopyChildren(newgroup, env); GoIconicNode obj = (GoIconicNode)newgroup; obj.myIcon = (GoObject)env[myIcon]; obj.myLabel = (GoText)env[myLabel]; obj.myPort = (GoPort)env[myPort]; }
/// <summary> /// Make copies of the shape, label and port. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { base.CopyChildren(newgroup, env); GoBasicNode obj = (GoBasicNode)newgroup; obj.myShape = (GoShape)env[myShape]; obj.myPort = (GoPort)env[myPort]; obj.myLabel = (GoText)env[myLabel]; }
/// <summary> /// Make sure any internal state is copied correctly. /// </summary> /// <param name="env"></param> /// <returns></returns> public override GoObject CopyObject(GoCopyDictionary env) { GoParallelogram goParallelogram = (GoParallelogram)base.CopyObject(env); if (goParallelogram != null) { goParallelogram.myPoints = (PointF[])myPoints.Clone(); } return(goParallelogram); }
/// <summary> /// Make sure cached information is not copied. /// </summary> /// <param name="env"></param> /// <returns></returns> public override GoObject CopyObject(GoCopyDictionary env) { GoNode goNode = (GoNode)base.CopyObject(env); if (goNode != null) { goNode.myPartID = -1; } return(goNode); }
/// <summary> /// Make sure the cloned polygon does not share any data references with the /// original polygon. /// </summary> /// <param name="env"></param> /// <returns></returns> public override GoObject CopyObject(GoCopyDictionary env) { GoPolygon goPolygon = (GoPolygon)base.CopyObject(env); if (goPolygon != null) { goPolygon.myPoints = (PointF[])myPoints.Clone(); } return(goPolygon); }
/// <summary> /// The <see cref="P:Northwoods.Go.GoBalloon.Anchor" /> object may or may not be copied; /// let <see cref="M:Northwoods.Go.GoBalloon.CopyObjectDelayed(Northwoods.Go.GoCopyDictionary,Northwoods.Go.GoObject)" /> handle it. /// </summary> /// <param name="env"></param> /// <returns></returns> public override GoObject CopyObject(GoCopyDictionary env) { GoBalloon obj = (GoBalloon)base.CopyObject(env); if (obj != null) { env.Delayeds.Add(this); } return(obj); }
/// <summary> /// Make sure the cloned trapezoid does not share any internal data references with the /// original one. /// </summary> /// <param name="env"></param> /// <returns></returns> public override GoObject CopyObject(GoCopyDictionary env) { GoTrapezoid goTrapezoid = (GoTrapezoid)base.CopyObject(env); if (goTrapezoid != null) { goTrapezoid.myPoints = (PointF[])myPoints.Clone(); } return(goTrapezoid); }
/// <summary> /// </summary> /// <param name="env"></param> /// <returns></returns> public override GoObject CopyObject(GoCopyDictionary env) { GoTriangle goTriangle = (GoTriangle)base.CopyObject(env); if (goTriangle != null) { goTriangle.myPoints = (PointF[])myPoints.Clone(); } return(goTriangle); }
/// <summary> /// Copy the <see cref="P:Northwoods.Go.GoButton.Background" />, <see cref="P:Northwoods.Go.GoButton.Label" />, and <see cref="P:Northwoods.Go.GoButton.Icon" />. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { base.CopyChildren(newgroup, env); GoButton obj = (GoButton)newgroup; obj.InternalFlags = (base.InternalFlags & -33554433); obj.myBack = (GoObject)env[myBack]; obj.myIcon = (GoObject)env[myIcon]; obj.myLabel = (GoText)env[myLabel]; obj.myActionEvent = null; }
/// <summary> /// Copy the background, text label, and the four ports. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> /// <remarks> /// Remember to override this to copy any objects you add to this class. /// </remarks> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { base.CopyChildren(newgroup, env); GoTextNode obj = (GoTextNode)newgroup; obj.myBack = (GoObject)env[myBack]; obj.myLabel = (GoText)env[myLabel]; obj.myTopPort = (GoPort)env[myTopPort]; obj.myRightPort = (GoPort)env[myRightPort]; obj.myBottomPort = (GoPort)env[myBottomPort]; obj.myLeftPort = (GoPort)env[myLeftPort]; }
/// <summary> /// Don't copy internally cached information. /// </summary> /// <param name="env"></param> /// <returns></returns> public override GoObject CopyObject(GoCopyDictionary env) { GoBoxPort goBoxPort = (GoBoxPort)base.CopyObject(env); if (goBoxPort != null) { goBoxPort.mySortedLinks = null; goBoxPort.myRespreading = false; goBoxPort.myReSort = false; } return(goBoxPort); }
/// <summary> /// Update the internal reference fields when this object is copied. /// </summary> /// <param name="newgroup"></param> /// <param name="env"></param> protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) { base.CopyChildren(newgroup, env); GoSheet obj = (GoSheet)newgroup; obj.myPaper = (GoRectangle)env[myPaper]; obj.myBackgroundImage = (GoImage)env[myBackgroundImage]; obj.myGrid = (GoGrid)env[myGrid]; obj.myLeft = (GoRectangle)env[myLeft]; obj.myRight = (GoRectangle)env[myRight]; obj.myTop = (GoRectangle)env[myTop]; obj.myBottom = (GoRectangle)env[myBottom]; }
/// <summary> /// Copy the port's label too, and make sure its <see cref="P:Northwoods.Go.GoGeneralNodePortLabel.Port" /> /// property points to the copied port. /// </summary> /// <param name="env"></param> public override GoObject CopyObject(GoCopyDictionary env) { GoGeneralNodePort goGeneralNodePort = (GoGeneralNodePort)base.CopyObject(env); if (goGeneralNodePort != null && myPortLabel != null) { goGeneralNodePort.myPortLabel = (GoGeneralNodePortLabel)env.Copy(myPortLabel); if (goGeneralNodePort.myPortLabel != null) { goGeneralNodePort.myPortLabel.Port = goGeneralNodePort; } } return(goGeneralNodePort); }
/// <summary> /// We never expect to copy handles. /// </summary> public override GoObject CopyObject(GoCopyDictionary env) { return(null); }