示例#1
0
		void AddActionUI ()
		{
			ActionEntry[] actions = new ActionEntry[]
			{
				new ActionEntry ("FileMenu", null, "_File", null, null, null),
				new ActionEntry ("Quit", Stock.Quit, "_Quit", "<control>Q", "Quit", new EventHandler (QuitActivated)),
				new ActionEntry ("HelpMenu", null, "_Help", null, null, null),
				new ActionEntry ("About", null, "_About IlContrast...", "<control>A", "About IlContrast", new EventHandler (AboutActivated)),
			};

			ActionGroup group = new ActionGroup ("group");
			group.Add (actions);

			UIManager uim = new UIManager ();
			uim.InsertActionGroup (group, (int) uim.NewMergeId ());
			uim.AddUiFromString (uiInfo);
			main_vbox.PackStart (uim.GetWidget ("/MenuBar"), false, true, 0);
			//main_vbox.PackStart (uim.GetWidget ("/ToolBar"), false, true, 0);
		}