private PersistentPaneController(Paned pane, string @namespace, string key, int fallback) { this.@namespace = @namespace; this.key = key; this.fallback = fallback; Paned = pane; }
private static void Control (Paned pane, string @namespace, string key, int defaultValue) { string dict_key = String.Format ("{0}.{1}", @namespace, key); if (controllers.ContainsKey (dict_key)) { controllers[dict_key].Paned = pane; } else { controllers.Add (dict_key, new PersistentPaneController (pane, @namespace, key, defaultValue)); } }
static bool MoveHandle_cb(IntPtr inst, int scroll) { try { Paned __obj = GLib.Object.GetObject(inst, false) as Paned; bool __result; __result = __obj.OnMoveHandle((Gtk.ScrollType)scroll); return(__result); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call does not return. throw e; } }
static bool CancelPosition_cb(IntPtr inst) { try { Paned __obj = GLib.Object.GetObject(inst, false) as Paned; bool __result; __result = __obj.OnCancelPosition(); return(__result); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call does not return. throw e; } }
public DockFrame() { paned1 = new Gtk.Paned(Orientation.Horizontal); paned1.Name = "paned1"; paned1.Expand = true; box2 = new Gtk.Box(Orientation.Vertical, 0); box2.Name = "box2"; //box2.Expand = true; box1 = new Gtk.Box(Orientation.Vertical, 0); box1.Name = "box1"; //box1.Expand = true; dock1 = new DockContainer(this); dock2 = new DockContainer(this); dock1.Name = "dock1"; dock2.Name = "dock2"; dock1.Expand = true; dock2.Expand = true; box1.PackEnd(dock1, true, true, 0); box2.PackEnd(dock2, true, true, 0); dock1.Expand = true; dock2.Expand = true; items = new List <DockItemContainer>(100); lastposition = new Dictionary <string, DockFramePosition>(100); paned1.Add1(box1); paned1.Add2(box2); paned1.Position = 400; dock1.OnItemAdded += HandleDock1Added; dock1.OnPageAdded += HandleDock1Added; dock2.OnItemAdded += HandleDock2Added; dock2.OnPageAdded += HandleDock2Added; this.Add(paned1); }
Frame CreatePaneOptions (Paned paned, string frameLabel, string label1, string label2) { Frame frame = new Frame (frameLabel); frame.BorderWidth = 4; Table table = new Table (3, 2, true); frame.Add (table); Label label = new Label (label1); table.Attach (label, 0, 1, 0, 1); CheckButton check = new CheckButton ("_Resize"); table.Attach (check, 0, 1, 1, 2); check.Toggled += new EventHandler (ToggleResize); children[check] = paned.Child1; check = new CheckButton ("_Shrink"); table.Attach (check, 0, 1, 2, 3); check.Active = true; check.Toggled += new EventHandler (ToggleShrink); children[check] = paned.Child1; label = new Label (label2); table.Attach (label, 1, 2, 0, 1); check = new CheckButton ("_Resize"); table.Attach (check, 1, 2, 1, 2); check.Active = true; check.Toggled += new EventHandler (ToggleResize); children[check] = paned.Child2; check = new CheckButton ("_Shrink"); table.Attach (check, 1, 2, 2, 3); check.Active = true; check.Toggled += new EventHandler (ToggleShrink); children[check] = paned.Child2; return frame; }
public ChatWindow() : base(Gtk.WindowType.Toplevel) { this.Title = "#gnome-hackers on irc.gimp.net - Logopathy"; this.DeleteEvent += OnDeleteEvent; this.Table = new Gtk.Table(5, 5, false); this.Add(this.Table); this.ActionGroup = new Gtk.ActionGroup("General"); SetUpActionGroup(); UiManager = new Gtk.UIManager(); UiManager.InsertActionGroup(this.ActionGroup, 0); AddAccelGroup(UiManager.AccelGroup); SetUpUiManager(); this.MenuBar = UiManager.GetWidget("/MenuBar"); this.Table.Attach(this.MenuBar, 0, 5, 0, 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0); MainPaned = new Gtk.HPaned(); this.Table.Attach(MainPaned, 0, 5, 1, 2); LeftSidebar = new Gtk.VPaned(); MainPaned.Pack1(LeftSidebar, true, true); ServerView = new Logopathy.Gui.ServerListView(); ServerViewSW = new Gtk.ScrolledWindow(new Gtk.Adjustment(0, 0, 0, 0, 0, 0), new Gtk.Adjustment(0, 0, 0, 0, 0, 0)); ServerViewSW.Add(ServerView); LeftSidebar.Pack1(ServerViewSW, true, true); UserView = new Logopathy.Gui.UserView(); UserViewSW = new Gtk.ScrolledWindow(new Gtk.Adjustment(0, 0, 0, 0, 0, 0), new Gtk.Adjustment(0, 0, 0, 0, 0, 0)); UserViewSW.Add(UserView); LeftSidebar.Pack2(UserViewSW, true, true); ChatNotebook = new Logopathy.Gui.ChatNotebook(new TpServer()); MainPaned.Pack2(ChatNotebook, true, true); }
public void Unsplit () { if (splitContainer == null) return; double vadjustment = mainsw.Vadjustment.Value; double hadjustment = mainsw.Hadjustment.Value; splitContainer.Remove (mainsw); if (this.textEditor == lastActiveEditor) { secondsw.Destroy (); secondsw = null; splittedTextEditor = null; } else { this.mainsw.Destroy (); this.mainsw = secondsw; vadjustment = secondsw.Vadjustment.Value; hadjustment = secondsw.Hadjustment.Value; splitContainer.Remove (secondsw); lastActiveEditor = this.textEditor = splittedTextEditor; splittedTextEditor = null; } vbox.Remove (splitContainer); splitContainer.Destroy (); splitContainer = null; RecreateMainSw (); vbox.PackStart (mainsw, true, true, 0); vbox.ShowAll (); mainsw.Vadjustment.Value = vadjustment; mainsw.Hadjustment.Value = hadjustment; }
public void Split (bool vSplit) { double vadjustment = this.mainsw.Vadjustment.Value; double hadjustment = this.mainsw.Hadjustment.Value; if (splitContainer != null) Unsplit (); vbox.Remove (this.mainsw); RecreateMainSw (); this.splitContainer = vSplit ? (Gtk.Paned)new VPaned () : (Gtk.Paned)new HPaned (); splitContainer.Add1 (mainsw); this.splitContainer.ButtonPressEvent += delegate(object sender, ButtonPressEventArgs args) { if (args.Event.Type == Gdk.EventType.TwoButtonPress && args.RetVal == null) { Unsplit (); } }; secondsw = new DecoratedScrolledWindow (this); this.splittedTextEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view, this.textEditor.Options, textEditor.Document); this.splittedTextEditor.Extension = textEditor.Extension; this.splittedTextEditorContainer = new TextEditorContainer (this.splittedTextEditor); secondsw.SetTextEditor (this.splittedTextEditorContainer); splitContainer.Add2 (secondsw); vbox.PackStart (splitContainer, true, true, 0); this.splitContainer.Position = (vSplit ? vbox.Allocation.Height : vbox.Allocation.Width) / 2 - 1; vbox.ShowAll (); secondsw.Vadjustment.Value = mainsw.Vadjustment.Value = vadjustment; secondsw.Hadjustment.Value = mainsw.Hadjustment.Value = hadjustment; }
public static void Control(Paned pane, string name) { Control (pane, String.Format ("{0}.{1}", NamespacePrefix, name), "position", pane.Position); }
public DockFrame() { paned1 = new Gtk.Paned(Orientation.Horizontal); paned1.Name ="paned1"; paned1.Expand = true; box2 = new Gtk.Box(Orientation.Vertical,0); box2.Name ="box2"; //box2.Expand = true; box1 = new Gtk.Box(Orientation.Vertical,0); box1.Name ="box1"; //box1.Expand = true; dock1 = new DockContainer(this); dock2 = new DockContainer(this); dock1.Name = "dock1"; dock2.Name = "dock2"; dock1.Expand = true; dock2.Expand = true; box1.PackEnd(dock1,true,true,0); box2.PackEnd(dock2,true,true,0); dock1.Expand = true; dock2.Expand = true; items = new List<DockItemContainer>(100); lastposition = new Dictionary<string, DockFramePosition>(100); paned1.Add1(box1); paned1.Add2(box2); paned1.Position = 400; dock1.OnItemAdded += HandleDock1Added; dock1.OnPageAdded += HandleDock1Added; dock2.OnItemAdded += HandleDock2Added; dock2.OnPageAdded += HandleDock2Added; this.Add(paned1); }
public Browser() : base(WindowType.Toplevel) { Title = "Summa"; IconName = "summa"; action_group = new Gtk.ActionGroup("general"); factory = new IconFactory(); factory.AddDefault(); DestroyEvent += CloseWindow; DeleteEvent += CloseWindow; SetUpActionGroup(); uimanager = new UIManager(); uimanager.InsertActionGroup(action_group, 0); AddAccelGroup(uimanager.AccelGroup); SetUpUimanager(); table = new Table(5, 5, false); Add(table); menubar = uimanager.GetWidget("/MenuBar"); table.Attach(menubar, 0, 5, 0, 1, AttachOptions.Fill, AttachOptions.Fill, 0, 0); toolbar = uimanager.GetWidget("/ToolBar"); table.Attach(toolbar, 0, 5, 1, 2, AttachOptions.Fill, AttachOptions.Fill, 0, 0); main_paned = new HPaned(); table.Attach(main_paned, 0, 5, 2, 3); left_paned = new VPaned(); main_paned.Pack1(left_paned, true, true); TagView = new TagView(); TagView.CursorChanged += new EventHandler(TagviewChanged); TagView_swin = new ScrolledWindow(new Adjustment(0, 0, 0, 0, 0, 0), new Adjustment(0, 0, 0, 0, 0, 0)); TagView_swin.Add(TagView); TagView_swin.ShadowType = ShadowType.In; TagView_swin.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); left_paned.Pack1(TagView_swin, true, true); FeedView = new FeedView(); FeedView.CursorChanged += new EventHandler(FeedviewChanged); FeedView_swin = new ScrolledWindow(new Adjustment(0, 0, 0, 0, 0, 0), new Adjustment(0, 0, 0, 0, 0, 0)); FeedView_swin.Add(FeedView); FeedView_swin.ShadowType = ShadowType.In; FeedView_swin.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); left_paned.Pack2(FeedView_swin, true, true); if ( Config.WidescreenView ) { right_paned = new HPaned(); } else { right_paned = new VPaned(); } main_paned.Pack2(right_paned, true, true); ItemView = new ItemView(); ItemView.CursorChanged += new EventHandler(ItemviewChanged); ItemView_swin = new ScrolledWindow(new Adjustment(0, 0, 0, 0, 0, 0), new Adjustment(0, 0, 0, 0, 0, 0)); ItemView_swin.Add(ItemView); ItemView_swin.ShadowType = ShadowType.In; ItemView_swin.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); right_paned.Pack1(ItemView_swin, true, true); ItemNotebook = new ItemNotebook(); right_paned.Pack2(ItemNotebook, true, true); StatusBar = new NotificationBar(); table.Attach(StatusBar, 0, 5, 3, 4, AttachOptions.Fill, AttachOptions.Fill, 0, 0); UpdateFromConfig(); FeedView.Populate("All"); Database.ItemChanged += OnItemChanged; Database.ItemAdded += OnItemAdded; Notifier.ViewChanged += OnViewChanged; }
private void OnViewChanged(object obj, EventArgs args) { right_paned.Remove(ItemView_swin); right_paned.Remove(ItemNotebook); main_paned.Remove(right_paned); if ( Config.WidescreenView ) { right_paned = new HPaned(); } else { right_paned = new VPaned(); } main_paned.Pack2(right_paned, true, true); right_paned.Add1(ItemView_swin); right_paned.Add2(ItemNotebook); ShowAll(); }
public void Unsplit () { if (splitContainer == null) return; double vadjustment = mainsw.Vadjustment.Value; double hadjustment = mainsw.Hadjustment.Value; splitContainer.Remove (mainsw); secondsw.Destroy (); secondsw = null; splittedTextEditor = null; vbox.Remove (splitContainer); splitContainer.Destroy (); splitContainer = null; RecreateMainSw (); vbox.PackStart (mainsw, true, true, 0); vbox.ShowAll (); mainsw.Vadjustment.Value = vadjustment; mainsw.Hadjustment.Value = hadjustment; }
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 static void Control (Paned pane, string name) { Control (pane, String.Format ("interface.panes.{0}", name), "position", pane.Position); }
public void Split (bool vSplit) { double vadjustment = this.mainsw.Vadjustment.Value; double hadjustment = this.mainsw.Hadjustment.Value; if (splitContainer != null) Unsplit (); vbox.Remove (this.mainsw); RecreateMainSw (); this.splitContainer = vSplit ? (Gtk.Paned)new VPaned () : (Gtk.Paned)new HPaned (); splitContainer.Add1 (mainsw); this.splitContainer.ButtonPressEvent += delegate(object sender, ButtonPressEventArgs args) { if (args.Event.Type == Gdk.EventType.TwoButtonPress && args.RetVal == null) { Unsplit (); } }; secondsw = new DecoratedScrolledWindow (this); splittedTextEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view, textEditor.Options, textEditor.Document); splittedTextEditor.TextArea.FocusInEvent += (o, s) => { lastActiveEditor = (ExtensibleTextEditor)((TextArea)o).GetTextEditorData ().Parent; view.FireCompletionContextChanged (); }; splittedTextEditor.TextArea.FocusOutEvent += delegate { if (!textEditor.TextArea.HasFocus) OnLostFocus (); }; splittedTextEditor.Extension = textEditor.Extension; if (textEditor.GetTextEditorData ().HasIndentationTracker) splittedTextEditor.GetTextEditorData ().IndentationTracker = textEditor.GetTextEditorData ().IndentationTracker; splittedTextEditor.Document.BracketMatcher = textEditor.Document.BracketMatcher; secondsw.SetTextEditor (splittedTextEditor); splitContainer.Add2 (secondsw); vbox.PackStart (splitContainer, true, true, 0); splitContainer.Position = (vSplit ? vbox.Allocation.Height : vbox.Allocation.Width) / 2 - 1; vbox.ShowAll (); secondsw.Vadjustment.Value = mainsw.Vadjustment.Value = vadjustment; secondsw.Hadjustment.Value = mainsw.Hadjustment.Value = hadjustment; }
public static void Control(Paned pane, SchemaEntry<int> entry) { Control (pane, entry.Namespace, entry.Key, entry.DefaultValue); }