public DockItemToolbar GetToolbar(DockPositionType position) { switch (position) { case DockPositionType.Top: if (toolbarTop == null) { toolbarTop = new DockItemToolbar(this, DockPositionType.Top); } return(toolbarTop); case DockPositionType.Bottom: if (toolbarBottom == null) { toolbarBottom = new DockItemToolbar(this, DockPositionType.Bottom); } return(toolbarBottom); case DockPositionType.Left: if (toolbarLeft == null) { toolbarLeft = new DockItemToolbar(this, DockPositionType.Left); } return(toolbarLeft); case DockPositionType.Right: if (toolbarRight == null) { toolbarRight = new DockItemToolbar(this, DockPositionType.Right); } return(toolbarRight); default: throw new ArgumentException(); } }
internal DockItemToolbar(DockItem parentItem, DockPositionType position) { this.parentItem = parentItem; topFrame = new CustomFrame(); topFrame.SetPadding(3, 3, 3, 3); /* switch (position) { * case PositionType.Top: * frame.SetMargins (0, 0, 1, 1); * frame.SetPadding (0, 2, 2, 0); * break; * case PositionType.Bottom: * frame.SetMargins (0, 1, 1, 1); * frame.SetPadding (2, 2, 2, 0); * break; * case PositionType.Left: * frame.SetMargins (0, 1, 1, 0); * frame.SetPadding (0, 0, 2, 2); * break; * case PositionType.Right: * frame.SetMargins (0, 1, 0, 1); * frame.SetPadding (0, 0, 2, 2); * break; * }*/ this.position = position; if (position == DockPositionType.Top || position == DockPositionType.Bottom) { box = new HBox(false, 3); } else { box = new VBox(false, 3); } box.Show(); // frame = box; frame = topFrame; topFrame.Add(box); // topFrame.GradientBackround = true; box.Accessible.SetShouldIgnore(false); box.Accessible.Role = Atk.Role.ToolBar; UpdateAccessibilityLabel(); }
internal DockItemToolbar (DockItem parentItem, DockPositionType position) { this.parentItem = parentItem; topFrame = new CustomFrame (); topFrame.SetPadding (3,3,3,3); /* switch (position) { case PositionType.Top: frame.SetMargins (0, 0, 1, 1); frame.SetPadding (0, 2, 2, 0); break; case PositionType.Bottom: frame.SetMargins (0, 1, 1, 1); frame.SetPadding (2, 2, 2, 0); break; case PositionType.Left: frame.SetMargins (0, 1, 1, 0); frame.SetPadding (0, 0, 2, 2); break; case PositionType.Right: frame.SetMargins (0, 1, 0, 1); frame.SetPadding (0, 0, 2, 2); break; }*/ this.position = position; if (position == DockPositionType.Top || position == DockPositionType.Bottom) box = new HBox (false, 3); else box = new VBox (false, 3); box.Show (); // frame = box; frame = topFrame; topFrame.Add (box); // topFrame.GradientBackround = true; }
public DockItemToolbar GetToolbar (DockPositionType position) { switch (position) { case DockPositionType.Top: if (toolbarTop == null) toolbarTop = new DockItemToolbar (this, DockPositionType.Top); return toolbarTop; case DockPositionType.Bottom: if (toolbarBottom == null) toolbarBottom = new DockItemToolbar (this, DockPositionType.Bottom); return toolbarBottom; case DockPositionType.Left: if (toolbarLeft == null) toolbarLeft = new DockItemToolbar (this, DockPositionType.Left); return toolbarLeft; case DockPositionType.Right: if (toolbarRight == null) toolbarRight = new DockItemToolbar (this, DockPositionType.Right); return toolbarRight; default: throw new ArgumentException (); } }
public DockItemToolbar GetToolbar(DockPositionType position) { return(Item.GetToolbar(position)); }
public DockItemToolbar GetToolbar (DockPositionType position) { return Item.GetToolbar (position); }