コード例 #1
0
        /// <summary>
        /// Tunes the middle dock item or the data visualizer.
        /// </summary>
        private void TuneMiddleDockItem()
        {
            // Attach the comboBox first.
            vbMiddle.PackStart(comboBox, false, false, 0);
            ScrolledWindow scroll = new ScrolledWindow();

            // Attach the treeView to the scroll bar.
            scroll.AddWithViewport(treeView);
            // Attach the scrollBar to the box.
            vbMiddle.PackStart(scroll, true, true, 0);

            // Set up DrawingArea.
            drawingArea = new DrawingArea();
            drawingArea.SetSizeRequest(800, 500);
            ScrolledWindow scrollDA = new ScrolledWindow();

            Gtk.VBox vBoxDA     = new Gtk.VBox();
            Viewport viewPortDA = new Viewport();

            viewPortDA.Add(drawingArea);
            scrollDA.Add(viewPortDA);
            vBoxDA.PackStart(scrollDA, true, true, 0);

            // Add Paned container in order to make the two boxes resizable
            Gtk.VPaned splitter = new Gtk.VPaned();
            splitter.Pack1(vBoxDA, true, true);
            splitter.Pack2(vbMiddle, true, true);
            splitter.Position = 400;
            splitter.ShowAll();

            nbMiddleDock.AppendPage(splitter, new Gtk.Label("Schema Visualizer"));
            nbMiddleDock.ShowAll();

            schemaV = new SchemaVisualizer(drawingArea);

            // Get the selected shape.
            SelectionModel selectionModel = schemaV.Selection;

            selectionModel.ModelChanged += HandleSelectionModelChanged;
        }
コード例 #2
0
ファイル: ChatWindow.cs プロジェクト: vrosnet/logopathy
        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);
        }
コード例 #3
0
ファイル: ChatWindow.cs プロジェクト: vrosnet/logopathy
        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);
        }