public void AddPage(BaseContextPage page) { Hyena.Log.DebugFormat("Adding context page {0}", page.Id); // TODO delay adding the page.Widget until the page is first activated, // that way we don't even create those objects unless used var frame = new Hyena.Widgets.RoundedFrame(); frame.Add(page.Widget); frame.Show(); // TODO implement DnD? /*if (page is ITrackContextPage) { * Gtk.Drag.DestSet (frame, DestDefaults.Highlight | DestDefaults.Motion, * new TargetEntry [] { Banshee.Gui.DragDrop.DragDropTarget.UriList }, * Gdk.DragAction.Default); * frame.DragDataReceived += delegate(object o, DragDataReceivedArgs args) { * }; * }*/ page.Widget.Show(); notebook.AppendPage(frame, null); pane_pages[page] = frame; // Setup the tab-like button that switches the notebook to this page var tab_image = new Image(IconThemeUtils.LoadIcon(22, page.IconNames)); var toggle_button = new RadioButton(radio_group) { Child = tab_image, DrawIndicator = false, Relief = ReliefStyle.None }; TooltipSetter.Set(tooltip_host, toggle_button, page.Name); toggle_button.Clicked += (s, e) => { if (pane_pages.ContainsKey(page)) { if (page.State == ContextState.Loaded) { notebook.CurrentPage = notebook.PageNum(pane_pages[page]); } SetActivePage(page); } }; toggle_button.ShowAll(); vbox.PackStart(toggle_button, false, false, 0); pane_tabs[page] = toggle_button; pages.Add(page); if (initialized && pages.Count == 1) { SetActivePage(page); toggle_button.Active = true; } UpdateVisibility(); }
public void AddWithFrame (Widget widget) { RoundedFrame frame = new RoundedFrame (); frame.Add (widget); frame.Show (); Add (frame); ProbeAdjustable (widget); }
public void AddWithFrame(Widget widget) { RoundedFrame frame = new RoundedFrame(); frame.Add(widget); frame.Show(); Add(frame); ProbeAdjustable(widget); }
private void Layout() { Reset(); container = new VPaned(); frame = new Hyena.Widgets.RoundedFrame(); frame.SetFillColor(new Cairo.Color(0, 0, 0)); frame.DrawBorder = false; frame.Add(filter_view); filter_view.Show(); frame.Show(); container.Pack1(frame, false, false); main_expander.Activated += OnExpander; main_expander.SizeRequested += HandleSizeRequested; container.Pack2(main_expander, true, false); container.Position = 175; PersistentPaneController.Control(container, ControllerName(-1)); ShowPack(); }
public void AddPage (BaseContextPage page) { Hyena.Log.DebugFormat ("Adding context page {0}", page.Id); // TODO delay adding the page.Widget until the page is first activated, // that way we don't even create those objects unless used var frame = new Hyena.Widgets.RoundedFrame (); frame.Add (page.Widget); frame.Show (); // TODO implement DnD? /*if (page is ITrackContextPage) { Gtk.Drag.DestSet (frame, DestDefaults.Highlight | DestDefaults.Motion, new TargetEntry [] { Banshee.Gui.DragDrop.DragDropTarget.UriList }, Gdk.DragAction.Default); frame.DragDataReceived += delegate(object o, DragDataReceivedArgs args) { }; }*/ page.Widget.Show (); notebook.AppendPage (frame, null); pane_pages[page] = frame; // Setup the tab-like button that switches the notebook to this page var tab_image = new Image (IconThemeUtils.LoadIcon (22, page.IconNames)); var toggle_button = new RadioButton (radio_group) { Child = tab_image, DrawIndicator = false, Relief = ReliefStyle.None }; TooltipSetter.Set (tooltip_host, toggle_button, page.Name); toggle_button.Clicked += (s, e) => { if (pane_pages.ContainsKey (page)) { if (page.State == ContextState.Loaded) { notebook.CurrentPage = notebook.PageNum (pane_pages[page]); } SetActivePage (page); } }; toggle_button.ShowAll (); vbox.PackStart (toggle_button, false, false, 0); pane_tabs[page] = toggle_button; pages.Add (page); if (initialized && pages.Count == 1) { SetActivePage (page); toggle_button.Active = true; } UpdateVisibility (); }
private void Layout() { Reset (); container = new VPaned (); frame = new Hyena.Widgets.RoundedFrame (); frame.SetFillColor (new Cairo.Color (0, 0, 0)); frame.DrawBorder = false; frame.Add (filter_view); filter_view.Show(); frame.Show (); container.Pack1 (frame, false, false); main_expander.Activated += OnExpander; main_expander.SizeRequested += HandleSizeRequested; container.Pack2 (main_expander, true, false); container.Position = 175; PersistentPaneController.Control (container, ControllerName (-1)); ShowPack (); }