本文整理汇总了C#中Gtk.MenuItem.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.MenuItem.Add方法的具体用法?C# Gtk.MenuItem.Add怎么用?C# Gtk.MenuItem.Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.MenuItem
的用法示例。
在下文中一共展示了Gtk.MenuItem.Add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
protected virtual void Build()
{
global::Stetic.Gui.Initialize(this);
// Widget OpenGraal.LevelEditor.MainWindow
this.UIManager = new global::Gtk.UIManager();
global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default");
this.UIManager.InsertActionGroup(w1, 0);
this.AddAccelGroup(this.UIManager.AccelGroup);
this.Name = "OpenGraal.LevelEditor.MainWindow";
this.Title = global::Mono.Unix.Catalog.GetString("MainWindow");
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
// Container child OpenGraal.LevelEditor.MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new global::Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
this.UIManager.AddUiFromString("<ui><menubar name=\'menubar1\'/></ui>");
this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.MenuItem fileMenu = new Gtk.MenuItem ("File");
Gtk.ImageMenuItem fileMenuNew = new Gtk.ImageMenuItem (Gtk.Stock.New);
fileMenu.Add (fileMenuNew);
menubar1.Append (fileMenu);
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hpaned1 = new global::Gtk.HPaned();
this.hpaned1.CanFocus = true;
this.hpaned1.Name = "hpaned1";
this.hpaned1.Position = 597;
// Container child hpaned1.Gtk.Paned+PanedChild
this._levelScrollPane = new global::Gtk.ScrolledWindow();
this._levelScrollPane.CanFocus = true;
this._levelScrollPane.Name = "levelScrollPane";
this._levelScrollPane.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child _levelScrollPane.Gtk.Container+ContainerChild
global::Gtk.Viewport w3 = new global::Gtk.Viewport();
w3.ShadowType = ((global::Gtk.ShadowType)(0));
// Container child GtkViewport.Gtk.Container+ContainerChild
this.levelDrawPane = new global::Gtk.Image();
this.levelDrawPane.Name = "levelDrawPane";
_levelEventBox = new Gtk.EventBox ();
_levelEventBox.Add (levelDrawPane);
w3.Add(_levelEventBox);
this._levelScrollPane.Add(w3);
this.hpaned1.Add(this._levelScrollPane);
_levelEventBox.ButtonPressEvent += new Gtk.ButtonPressEventHandler (onLevelClick);
_levelEventBox.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler (onLevelRelease);
_levelEventBox.MotionNotifyEvent += new Gtk.MotionNotifyEventHandler (onLevelMove);
global::Gtk.Paned.PanedChild w6 = ((global::Gtk.Paned.PanedChild)(this.hpaned1[this._levelScrollPane]));
w6.Resize = false;
// Container child hpaned1.Gtk.Paned+PanedChild
this.notebook1 = new global::Gtk.Notebook();
this.notebook1.CanFocus = true;
this.notebook1.Name = "notebook1";
this.notebook1.CurrentPage = 0;
// Container child notebook1.Gtk.Notebook+NotebookChild
this._tilesetScrollPane = new global::Gtk.ScrolledWindow();
this._tilesetScrollPane.CanFocus = true;
this._tilesetScrollPane.Name = "tilesetScrollPane";
this._tilesetScrollPane.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child scrolledwindow2.Gtk.Container+ContainerChild
global::Gtk.Viewport w7 = new global::Gtk.Viewport();
w7.ShadowType = ((global::Gtk.ShadowType)(0));
// Container child GtkViewport1.Gtk.Container+ContainerChild
this.tilesetDrawPane = new global::Gtk.Image();
this.tilesetDrawPane.Name = "tilesetDrawPane";
this._tilesetEventBox = new global::Gtk.EventBox();
this._tilesetEventBox.Add(tilesetDrawPane);
this._tilesetEventBox.ButtonPressEvent += new Gtk.ButtonPressEventHandler (onTilesetClick);
this._tilesetEventBox.MotionNotifyEvent += new Gtk.MotionNotifyEventHandler (onTilesetDrag);
this._tilesetEventBox.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler (onTilesetRelease);
w7.Add(this._tilesetEventBox);
this._tilesetScrollPane.Add(w7);
this.notebook1.Add(this._tilesetScrollPane);
// Notebook tab
this.tilesetLbl = new global::Gtk.Label();
this.tilesetLbl.Name = "tilesetLbl";
this.tilesetLbl.LabelProp = global::Mono.Unix.Catalog.GetString("Tileset");
this.notebook1.SetTabLabel(this._tilesetScrollPane, this.tilesetLbl);
this.tilesetLbl.ShowAll();
// Notebook tab
global::Gtk.Label w11 = new global::Gtk.Label();
w11.Visible = true;
this.notebook1.Add(w11);
this.layersLbl = new global::Gtk.Label();
this.layersLbl.Name = "layersLbl";
this.layersLbl.LabelProp = global::Mono.Unix.Catalog.GetString("Layers");
//.........这里部分代码省略.........