예제 #1
0
 public void ShowMenuBar(bool show)
 {
     if (show)
     {
         MenuBar.Show();
     }
     else
     {
         MenuBar.Hide();
     }
 }
예제 #2
0
 public void ToggleExtraWidgets(bool show)
 {
     if (GlRendererWidget != null)
     {
         if (show)
         {
             _menuBar.ShowAll();
             _footerBox.Show();
             _statusBar.Show();
         }
         else
         {
             _menuBar.Hide();
             _footerBox.Hide();
         }
     }
 }
예제 #3
0
        public void ToggleExtraWidgets(bool show)
        {
            if (_gLWidget != null)
            {
                if (show)
                {
                    _menuBar.ShowAll();
                    _footerBox.ShowAll();
                }
                else
                {
                    _menuBar.Hide();
                    _footerBox.Hide();
                }
            }

            bool fullScreenToggled = this.Window.State.HasFlag(Gdk.WindowState.Fullscreen);

            _fullScreen.Label = fullScreenToggled ? "Exit Fullscreen" : "Enter Fullscreen";
        }
예제 #4
0
        public void CreateMacMenu(MenuBar mainMenu)
        {
            //enable the global key handler for keyboard shortcuts
            IgeMacMenu.GlobalKeyHandlerEnabled = false;

            //Tell the IGE library to use your GTK menu as the Mac main menu
            IgeMacMenu.MenuBar = mainMenu;

            //tell IGE which menu item should be used for the app menu's quit item
            MenuItem miQ = (MenuItem)this.GetWidget("/menubar/FileAction/Quit");

            IgeMacMenu.QuitMenuItem = miQ;

            //add a new group to the app menu, and add some items to it
            var appGroup = IgeMacMenu.AddAppMenuGroup();

            MenuItem miA = (MenuItem)this.GetWidget("/menubar/Help/About");

            appGroup.AddMenuItem(
                miA,
                MainClass.Languages.Translate("menu_about").Replace("_", "")
                );

            MenuItem miP = (MenuItem)this.GetWidget("/menubar/ToolsAction/idepreferences");

            appGroup.AddMenuItem(
                miP,
                MainClass.Languages.Translate("menu_preferences").Replace("_", "")
                );

            appGroup.AddMenuItem(
                miQ,
                MainClass.Languages.Translate("menu_quit").Replace("_", "")
                );
            //hide the menu bar so it no longer displays within the window
            mainMenu.Hide();
        }