public ForceTotalsRow(Page page, Shape forceTotalsShape) : base(page, false)
        {
            Shape = forceTotalsShape;

            UsedSizingPolicy |= SizingPolicy.ShrinkYIfNeeded | SizingPolicy.ExpandXIfNeeded;
            LayoutManager     = new InlineLayout(this);
            MarginBottom      = 0.4;

            Array        ident  = forceTotalsShape.ContainerProperties.GetMemberShapes((int)VisContainerFlags.visContainerFlagsExcludeNested);
            List <Shape> shapes = new List <int>((int[])ident).Select(i => page.Shapes.ItemFromID[i]).ToList();

            if (Children.Count == 0)
            {
                foreach (Shape shape in shapes)
                {
                    if (ForceTotalComponent.IsForceTotalComponent(shape.Name))
                    {
                        Children.Add(new ForceTotalComponent(page, shape));
                    }
                    else if (shape.CellExistsU[VisioFormulas.Cell_RationallyType, (short)VisExistsFlags.visExistsAnywhere] == Constants.CellExists)
                    {
                        VisioShape toAdd = new VisioShape(page)
                        {
                            Shape = shape
                        };
                        Children.Add(toAdd);
                    }
                }
            }
        }
 public override void AddToTree(Shape s, bool allowAddOfSubpart)
 {
     if (ForceTotalComponent.IsForceTotalComponent(s.Name))
     {
         ForceTotalComponent com = new ForceTotalComponent(Page, s);
         if ((2 + com.Index) > Children.Count)
         {
             Children.Add(com);
         }
         else
         {
             Children.Insert(2 + com.Index, com);
         }
     }
 }