MonoDevelop.Components.Docking.DockItem.GetToolbar C# (CSharp) Method

GetToolbar() public method

public GetToolbar ( DockPositionType position ) : MonoDevelop.Components.Docking.DockItemToolbar
position DockPositionType
return MonoDevelop.Components.Docking.DockItemToolbar
		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 ();
			}
		}
		

Usage Example

		public DockItemContainer (DockFrame frame, DockItem item)
		{
			this.item = item;

			mainBox = new VBox ();
			Add (mainBox);

			mainBox.ResizeMode = Gtk.ResizeMode.Queue;
			mainBox.Spacing = 0;
			
			ShowAll ();
			
			mainBox.PackStart (item.GetToolbar (PositionType.Top).Container, false, false, 0);
			
			HBox hbox = new HBox ();
			hbox.Show ();
			hbox.PackStart (item.GetToolbar (PositionType.Left).Container, false, false, 0);
			
			contentBox = new HBox ();
			contentBox.Show ();
			hbox.PackStart (contentBox, true, true, 0);
			
			hbox.PackStart (item.GetToolbar (PositionType.Right).Container, false, false, 0);
			
			mainBox.PackStart (hbox, true, true, 0);
			
			mainBox.PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0);
		}
All Usage Examples Of MonoDevelop.Components.Docking.DockItem::GetToolbar