public GetToolbar ( DockPositionType position ) : MonoDevelop.Components.Docking.DockItemToolbar | ||
position | DockPositionType | |
return | MonoDevelop.Components.Docking.DockItemToolbar |
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); }
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); }
public DockItemContainer(DockFrame frame, DockItem item) { this.item = item; item.LabelChanged += UpdateAccessibilityLabel; mainBox = new VBox(); mainBox.Accessible.SetShouldIgnore(false); UpdateAccessibilityLabel(null, null); Add(mainBox); mainBox.ResizeMode = Gtk.ResizeMode.Queue; mainBox.Spacing = 0; ShowAll(); mainBox.PackStart(item.GetToolbar(DockPositionType.Top).Container, false, false, 0); HBox hbox = new HBox(); hbox.Accessible.SetTitle("Hbox"); hbox.Show(); hbox.PackStart(item.GetToolbar(DockPositionType.Left).Container, false, false, 0); contentBox = new HBox(); hbox.Accessible.SetTitle("Content"); contentBox.Show(); hbox.PackStart(contentBox, true, true, 0); hbox.PackStart(item.GetToolbar(DockPositionType.Right).Container, false, false, 0); mainBox.PackStart(hbox, true, true, 0); mainBox.PackStart(item.GetToolbar(DockPositionType.Bottom).Container, false, false, 0); }
void UpdateVisualStyle() { if (VisualStyle != null) { if (widget != null) { SetTreeStyle(widget); } item.GetToolbar(PositionType.Top).SetStyle(VisualStyle); item.GetToolbar(PositionType.Left).SetStyle(VisualStyle); item.GetToolbar(PositionType.Right).SetStyle(VisualStyle); item.GetToolbar(PositionType.Bottom).SetStyle(VisualStyle); } }
void UpdateVisualStyle() { if (VisualStyle != null) { if (widget != null) { SetTreeStyle(widget); } item.GetToolbar(DockPositionType.Top).SetStyle(VisualStyle); item.GetToolbar(DockPositionType.Left).SetStyle(VisualStyle); item.GetToolbar(DockPositionType.Right).SetStyle(VisualStyle); item.GetToolbar(DockPositionType.Bottom).SetStyle(VisualStyle); if (VisualStyle.TabStyle == DockTabStyle.Normal) { ModifyBg(StateType.Normal, VisualStyle.PadBackgroundColor.Value.ToGdkColor()); } else { ModifyBg(StateType.Normal, Style.Background(StateType.Normal)); } } }
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 (); }
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(); }