public static void AddItemGroup(EditorToolbarGroup itemGroup, EditorToolbarOrientation orientation)
 {
     if (orientation == EditorToolbarOrientation.Left)
     {
         leftGroups.Add(itemGroup);
     }
     else if (orientation == EditorToolbarOrientation.Right)
     {
         rightGroups.Add(itemGroup);
     }
 }
 public static void AddItem(EditorToolbarItem item, EditorToolbarOrientation orientation)
 {
     if (orientation == EditorToolbarOrientation.Left)
     {
         leftGroups.Add(EditorToolbarGroup.CreateGroup(item));
     }
     else if (orientation == EditorToolbarOrientation.Right)
     {
         rightGroups.Add(EditorToolbarGroup.CreateGroup(item));
     }
 }
 private static float GetGroupWidth(EditorToolbarGroup itemGroup)
 {
     return((from item in itemGroup.Items select GetItemWidth(item)).ToArray().Sum());
 }