comparison gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs @ 28:9440eef124b0

Closes #69: Add "export" UI * Add base menu for exports (will be populated automatically once exports are plugins) * Add menu item for "Basic HTML"
author IBBoard <dev@ibboard.co.uk>
date Tue, 01 Sep 2009 19:10:13 +0000
parents 01ddadfa9653
children 2e5448a662b6
comparison
equal deleted inserted replaced
27:83c8945edac2 28:9440eef124b0
56 private Gtk.Action redoActionButton; 56 private Gtk.Action redoActionButton;
57 57
58 private Gtk.Action goDown; 58 private Gtk.Action goDown;
59 59
60 private Gtk.Action add; 60 private Gtk.Action add;
61
62 private Gtk.Action miExportArmy;
63
64 private Gtk.Action miExportAsBasicHtml;
61 65
62 private Gtk.VBox vbox1; 66 private Gtk.VBox vbox1;
63 67
64 private Gtk.MenuBar menubar1; 68 private Gtk.MenuBar menubar1;
65 69
146 w1.Add(this.redoActionButton, null); 150 w1.Add(this.redoActionButton, null);
147 this.goDown = new Gtk.Action("goDown", null, null, null); 151 this.goDown = new Gtk.Action("goDown", null, null, null);
148 w1.Add(this.goDown, null); 152 w1.Add(this.goDown, null);
149 this.add = new Gtk.Action("add", null, null, "gtk-add"); 153 this.add = new Gtk.Action("add", null, null, "gtk-add");
150 w1.Add(this.add, null); 154 w1.Add(this.add, null);
155 this.miExportArmy = new Gtk.Action("miExportArmy", Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert");
156 this.miExportArmy.ShortLabel = Mono.Unix.Catalog.GetString("Export army");
157 w1.Add(this.miExportArmy, null);
158 this.miExportAsBasicHtml = new Gtk.Action("miExportAsBasicHtml", Mono.Unix.Catalog.GetString("Basic HTML"), null, null);
159 this.miExportAsBasicHtml.ShortLabel = Mono.Unix.Catalog.GetString("Basic HTML");
160 w1.Add(this.miExportAsBasicHtml, null);
151 this.UIManager.InsertActionGroup(w1, 0); 161 this.UIManager.InsertActionGroup(w1, 0);
152 this.AddAccelGroup(this.UIManager.AccelGroup); 162 this.AddAccelGroup(this.UIManager.AccelGroup);
153 this.Name = "IBBoard.WarFoundry.GTK.FrmMainWindow"; 163 this.Name = "IBBoard.WarFoundry.GTK.FrmMainWindow";
154 this.Title = Mono.Unix.Catalog.GetString("MainWindow"); 164 this.Title = Mono.Unix.Catalog.GetString("MainWindow");
155 this.Icon = Gdk.Pixbuf.LoadFromResource("App.ico"); 165 this.Icon = Gdk.Pixbuf.LoadFromResource("App.ico");
156 // Container child IBBoard.WarFoundry.GTK.FrmMainWindow.Gtk.Container+ContainerChild 166 // Container child IBBoard.WarFoundry.GTK.FrmMainWindow.Gtk.Container+ContainerChild
157 this.vbox1 = new Gtk.VBox(); 167 this.vbox1 = new Gtk.VBox();
158 this.vbox1.Name = "vbox1"; 168 this.vbox1.Name = "vbox1";
159 // Container child vbox1.Gtk.Box+BoxChild 169 // Container child vbox1.Gtk.Box+BoxChild
160 this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miCreateArmy' action='miCreateArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='miChangeGameSystem' action='miChangeGameSystem'/><separator/><menuitem name='miReloadFiles' action='miReloadFiles'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/><menuitem name='miDebugInformation' action='miDebugInformation'/></menu></menubar></ui>"); 170 this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miCreateArmy' action='miCreateArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmy' action='miExportArmy'><menuitem name='miExportAsBasicHtml' action='miExportAsBasicHtml'/></menu><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='miChangeGameSystem' action='miChangeGameSystem'/><separator/><menuitem name='miReloadFiles' action='miReloadFiles'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/><menuitem name='miDebugInformation' action='miDebugInformation'/></menu></menubar></ui>");
161 this.menubar1 = ((Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); 171 this.menubar1 = ((Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
162 this.menubar1.Name = "menubar1"; 172 this.menubar1.Name = "menubar1";
163 this.vbox1.Add(this.menubar1); 173 this.vbox1.Add(this.menubar1);
164 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); 174 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
165 w2.Position = 0; 175 w2.Position = 0;
225 this.newArmyButton.Activated += new System.EventHandler(this.newTBButtonActivated); 235 this.newArmyButton.Activated += new System.EventHandler(this.newTBButtonActivated);
226 this.openArmyButton.Activated += new System.EventHandler(this.openTBButtonActivated); 236 this.openArmyButton.Activated += new System.EventHandler(this.openTBButtonActivated);
227 this.saveArmyButton.Activated += new System.EventHandler(this.saveTBButtonActivated); 237 this.saveArmyButton.Activated += new System.EventHandler(this.saveTBButtonActivated);
228 this.undoActionButton.Activated += new System.EventHandler(this.undoTBButtonActivated); 238 this.undoActionButton.Activated += new System.EventHandler(this.undoTBButtonActivated);
229 this.redoActionButton.Activated += new System.EventHandler(this.redoTBButtonActivated); 239 this.redoActionButton.Activated += new System.EventHandler(this.redoTBButtonActivated);
240 this.miExportAsBasicHtml.Activated += new System.EventHandler(this.OnMiExportAsBasicHtmlActivated);
230 this.treeUnits.RowActivated += new Gtk.RowActivatedHandler(this.ArmyRowActivated); 241 this.treeUnits.RowActivated += new Gtk.RowActivatedHandler(this.ArmyRowActivated);
231 } 242 }
232 } 243 }
233 } 244 }