本文整理汇总了C#中MonoDevelop.Components.Docking.DockItem.GetToolbar方法的典型用法代码示例。如果您正苦于以下问题:C# DockItem.GetToolbar方法的具体用法?C# DockItem.GetToolbar怎么用?C# DockItem.GetToolbar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoDevelop.Components.Docking.DockItem
的用法示例。
在下文中一共展示了DockItem.GetToolbar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DockItemContainer
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);
}
示例2: DockItemContainer
public DockItemContainer (DockFrame frame, DockItem item)
{
this.frame = frame;
this.item = item;
ResizeMode = Gtk.ResizeMode.Queue;
Spacing = 0;
title = new Gtk.Label ();
title.Xalign = 0;
title.Xpad = 3;
title.UseMarkup = true;
title.Ellipsize = Pango.EllipsizeMode.End;
btnDock = new Button (new Gtk.Image (pixAutoHide));
btnDock.Relief = ReliefStyle.None;
btnDock.CanFocus = false;
btnDock.WidthRequest = btnDock.HeightRequest = 17;
btnDock.Clicked += OnClickDock;
btnClose = new Button (new Gtk.Image (pixClose));
btnClose.TooltipText = Catalog.GetString ("Hide");
btnClose.Relief = ReliefStyle.None;
btnClose.CanFocus = false;
btnClose.WidthRequest = btnClose.HeightRequest = 17;
btnClose.Clicked += delegate {
item.Visible = false;
};
HBox box = new HBox (false, 0);
box.PackStart (title, true, true, 0);
box.PackEnd (btnClose, false, false, 0);
box.PackEnd (btnDock, false, false, 0);
headerAlign = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
headerAlign.TopPadding = headerAlign.BottomPadding = headerAlign.RightPadding = headerAlign.LeftPadding = 1;
headerAlign.Add (box);
header = new EventBox ();
header.Events |= Gdk.EventMask.KeyPressMask | Gdk.EventMask.KeyReleaseMask;
header.ButtonPressEvent += HeaderButtonPress;
header.ButtonReleaseEvent += HeaderButtonRelease;
header.MotionNotifyEvent += HeaderMotion;
header.KeyPressEvent += HeaderKeyPress;
header.KeyReleaseEvent += HeaderKeyRelease;
header.Add (headerAlign);
header.ExposeEvent += HeaderExpose;
header.Realized += delegate {
header.GdkWindow.Cursor = handCursor;
};
foreach (Widget w in new Widget [] { header, btnDock, btnClose }) {
w.EnterNotifyEvent += HeaderEnterNotify;
w.LeaveNotifyEvent += HeaderLeaveNotify;
}
PackStart (header, false, false, 0);
ShowAll ();
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);
PackStart (hbox, true, true, 0);
PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0);
UpdateBehavior ();
}