Ejemplo n.º 1
0
        public void CreateMainMenu(Gtk.MenuBar menu)
        {
            // File menu
            ImageMenuItem file = (ImageMenuItem)menu.Children[0];

            file.Submenu = new Menu();
            File.CreateMainMenu((Menu)file.Submenu);

            //Edit menu
            ImageMenuItem edit = (ImageMenuItem)menu.Children[1];

            edit.Submenu = new Menu();
            Edit.CreateMainMenu((Menu)edit.Submenu);

            // View menu
            ImageMenuItem view = (ImageMenuItem)menu.Children[2];

            View.CreateMainMenu((Menu)view.Submenu);

            // Image menu
            ImageMenuItem image = (ImageMenuItem)menu.Children[3];

            image.Submenu = new Menu();
            Image.CreateMainMenu((Menu)image.Submenu);

            //Layers menu
            ImageMenuItem layer = (ImageMenuItem)menu.Children[4];

            layer.Submenu = new Menu();
            Layers.CreateMainMenu((Menu)layer.Submenu);

            //Adjustments menu
            ImageMenuItem adj = (ImageMenuItem)menu.Children[5];

            adj.Submenu = new Menu();
            Adjustments.CreateMainMenu((Menu)adj.Submenu);

            // Effects menu
            ImageMenuItem eff = (ImageMenuItem)menu.Children[6];

            eff.Submenu = new Menu();
            Effects.CreateMainMenu((Menu)eff.Submenu);

            // Window menu
            ImageMenuItem window = (ImageMenuItem)menu.Children[7];

            window.Submenu = new Menu();
            Window.CreateMainMenu((Menu)window.Submenu);

            //Help menu
            ImageMenuItem help = (ImageMenuItem)menu.Children[8];

            help.Submenu = new Menu();
            Help.CreateMainMenu((Menu)help.Submenu);
        }