Exemplo n.º 1
0
        void IPlugin.Init(object context)
        {
            morphose = context as IDataMorphose;

            morphose.GetModel().ModelChanged += HandleModelChanged;

            // Left dock item.
            TuneLeftDockItem();
            AddDockItem("Tools", nbLeftDock);

            // Attaching the Visualizer in the DockFrame.
            AddDockItem("Visualizer", nbMiddleDock);
            TuneMiddleDockItem();

            // Right dock item.
            TuneRightDockItem();
            AddDockItem("Actions", vbRight);
        }
Exemplo n.º 2
0
        void IPlugin.Init(object context)
        {
            morphose = context as IDataMorphose;

            Gtk.MenuBar mainMenuBar = morphose.GetMainMenu();

            Gtk.MenuItem fileMenu = null;

            // Find the File menu if present
            foreach (Gtk.Widget w in mainMenuBar.Children)
            {
                if (w.Name == "FileAction")
                {
                    fileMenu = w as Gtk.MenuItem;
                    break;
                }
            }

            // If not present - create it
            if (fileMenu == null)
            {
                Gtk.Menu menu = new Gtk.Menu();
                fileMenu         = new Gtk.MenuItem("File");
                fileMenu.Submenu = menu;
                mainMenuBar.Append(fileMenu);
            }

            // Setting up the Import and Export menu item in File menu
            Gtk.MenuItem import = new Gtk.MenuItem("Import");
            import.Activated += OnImportActivated;
            (fileMenu.Submenu as Gtk.Menu).Prepend(import);


            Gtk.MenuItem export = new Gtk.MenuItem("Export");
            export.Activated += OnExportActivated;
            (fileMenu.Submenu as Gtk.Menu).Prepend(export);
        }