public StyleEditor() { list.Name = "listEditor1"; list.DataSource = GuiEnvironment.Theme; list.ReadOnly = false; list.List.SelectionChanged += ListItemSelect; details.EditMode = EditModes.ByClick; var smap = new GroupBoxItem(map) { Row = 1 }; smap.Add(new GroupBoxItem() { Widget = details, Text = "Detail", FillWidth = true, Width = 230, Height = 60 }); smap.Add(new GroupBoxItem() { Widget = preview, Text = "Preview", FillWidth = true, Width = 230, Height = 60 }); map.Add(new GroupBoxItem() { Widget = list, Text = "Slyles", FillHeight = true, FillWidth = true }); map.Add(smap); Name = "StyleEditor"; Text = "Style Editor"; PackStart(map, true, true); Localize(); }
public void Add(GroupBoxItem item) { if (item.Map == null) { items.Add(item); } if (item.Count == 0) { if (item.Widget != null && item.Widget.Parent != this) { if (!Children.Contains(item.Widget)) { base.AddChild(item.Widget); } } } else { item.GroupBox = this; if (item.GroupBox != null && item.GroupBox != this) { if (!Children.Contains(item.GroupBox)) { base.AddChild(item.GroupBox); } } else { item.CalcHeight = CalcHeight; foreach (var sitem in item) { Add(sitem); } } } }