public void Dispose()
 {
     left.Dispose();
     right.Dispose();
     top.Dispose();
     bottom.Dispose();
     documentArea.Dispose();
     Gui.Instance.destroyWidget(windowTargetWidget);
     Gui.Instance.destroyWidget(leftContainerWidget);
     Gui.Instance.destroyWidget(rightContainerWidget);
     Gui.Instance.destroyWidget(topContainerWidget);
     Gui.Instance.destroyWidget(bottomContainerWidget);
 }
 /// <summary>
 /// This is a helper method to promote a child to a parent container. It
 /// will swap the child with the formerParent's location and then
 /// dispose the formerParent.
 /// </summary>
 /// <param name="child">The child to promote.</param>
 /// <param name="formerParent">The former parent of child that will be replaced.</param>
 internal override void promoteChild(MDIContainerBase child, MDILayoutContainer formerParent)
 {
     swapAndRemove(child, formerParent);
     formerParent.Dispose();
     invalidate();
 }