Esempio n. 1
0
        private static void SetupEditMenu(Screen screen, MenuBar menuBar)
        {
            var menu = new Menu(screen);
            menu.Text = "Edit";

            AddMenuItem(menu, "Cut");
            AddMenuItem(menu, "Copy");
            menu.AddSeparator();
            AddMenuItem(menu, "Paste");

            menuBar.Menus.Add(menu);
        }
Esempio n. 2
0
        internal static MenuBar SetupMenuBar(Screen screen)
        {
            var menuBar = new MenuBar(screen);
            menuBar.Left = 0;
            menuBar.Top = 0;
            menuBar.Width = screen.Width;

            SetupFileMenu(screen, menuBar);
            SetupEditMenu(screen, menuBar);
            SetupViewMenu(screen, menuBar);

            return menuBar;
        }
Esempio n. 3
0
        private static void SetupFileMenu(Screen screen, MenuBar menuBar)
        {
            var menu = new Menu(screen);
            menu.Text = "File";

            AddMenuItem(menu, "New");
            AddMenuItem(menu, "Open");
            menu.AddSeparator();
            AddMenuItem(menu, "Save");
            menu.AddSeparator();
            AddMenuItem(menu, "Close");

            menuBar.Menus.Add(menu);
        }
Esempio n. 4
0
        private static void SetupViewMenu(Screen screen, MenuBar menuBar)
        {
            var menu = new Menu(screen);
            menu.Text = "Animals";

            AddMenuItem(menu, "Dog");
            AddMenuItem(menu, "Cat");
            menu.AddSeparator();
            AddMenuItem(menu, "Mouse");
            menu.AddSeparator();
            AddMenuItem(menu, "Monkey");
            menu.AddSeparator();
            AddMenuItem(menu, "Horse");
            menu.AddSeparator();
            AddMenuItem(menu, "Hummingbird hawk-moth");

            menuBar.Menus.Add(menu);
        }