protected virtual void Build() { global::Stetic.Gui.Initialize (this); // Widget MainWindow this.UIManager = new global::Gtk.UIManager (); global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default"); this.FiguresAction = new global::Gtk.Action ("FiguresAction", global::Mono.Unix.Catalog.GetString ("Figures"), null, null); this.FiguresAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Figures"); w1.Add (this.FiguresAction, null); this.AddClassFigureAction = new global::Gtk.Action ("AddClassFigureAction", global::Mono.Unix.Catalog.GetString ("Add Class Figure"), null, null); this.AddClassFigureAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add Class Figure"); w1.Add (this.AddClassFigureAction, null); this.AddStackFigureAction = new global::Gtk.Action ("AddStackFigureAction", global::Mono.Unix.Catalog.GetString ("Add StackFigure"), null, null); this.AddStackFigureAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add StackFigure"); w1.Add (this.AddStackFigureAction, null); this.AddMemberGroupAction = new global::Gtk.Action ("AddMemberGroupAction", global::Mono.Unix.Catalog.GetString ("Add MemberGroup"), null, null); this.AddMemberGroupAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add MemberGroup"); w1.Add (this.AddMemberGroupAction, null); this.AddSimpleTextFigureAction = new global::Gtk.Action ("AddSimpleTextFigureAction", global::Mono.Unix.Catalog.GetString ("Add SimpleTextFigure"), null, null); this.AddSimpleTextFigureAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add SimpleTextFigure"); w1.Add (this.AddSimpleTextFigureAction, null); this.UIManager.InsertActionGroup (w1, 0); this.AddAccelGroup (this.UIManager.AccelGroup); this.Name = "MainWindow"; this.Title = global::Mono.Unix.Catalog.GetString ("MainWindow"); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); // Container child 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'><menu name='FiguresAction' action='FiguresAction'><menuitem name='AddClassFigureAction' action='AddClassFigureAction'/><menuitem name='AddStackFigureAction' action='AddStackFigureAction'/><menuitem name='AddMemberGroupAction' action='AddMemberGroupAction'/><menuitem name='AddSimpleTextFigureAction' action='AddSimpleTextFigureAction'/></menu></menubar></ui>"); this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox1.Add (this.menubar1); 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.mhdcanvas = new global::MonoHotDraw.SteticComponent (); this.mhdcanvas.Events = ((global::Gdk.EventMask)(256)); this.mhdcanvas.Name = "mhdcanvas"; this.vbox1.Add (this.mhdcanvas); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.mhdcanvas])); w3.Position = 1; this.Add (this.vbox1); if ((this.Child != null)) { this.Child.ShowAll (); } this.DefaultWidth = 400; this.DefaultHeight = 300; this.Show (); this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); this.AddClassFigureAction.Activated += new global::System.EventHandler (this.OnAddClassFigureActionActivated); this.AddStackFigureAction.Activated += new global::System.EventHandler (this.OnAddStackFigureActionActivated); this.AddMemberGroupAction.Activated += new global::System.EventHandler (this.OnAddMemberGroupActionActivated); this.AddSimpleTextFigureAction.Activated += new global::System.EventHandler (this.OnAddSimpleTextFigureActionActivated); }
protected virtual void Build () { global::Stetic.Gui.Initialize (this); // Widget TraceLab.UI.GTK.ExperimentCanvasWidget global::Stetic.BinContainer.Attach (this); this.Name = "TraceLab.UI.GTK.ExperimentCanvasWidget"; // Container child TraceLab.UI.GTK.ExperimentCanvasWidget.Gtk.Container+ContainerChild this.hbox2 = new global::Gtk.HBox (); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild this.vbox2 = new global::Gtk.VBox (); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild this.experimentCrumbs = new global::TraceLab.UI.GTK.Crumbs (); this.experimentCrumbs.Events = ((global::Gdk.EventMask)(256)); this.experimentCrumbs.Name = "experimentCrumbs"; this.experimentCrumbs.Radius = 5; this.experimentCrumbs.Spacing = 11; this.experimentCrumbs.Xoffset = 12; this.experimentCrumbs.Yoffset = 6; this.vbox2.Add (this.experimentCrumbs); global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.experimentCrumbs])); w1.Position = 0; w1.Expand = false; w1.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.experimentCanvas = new global::MonoHotDraw.SteticComponent (); this.experimentCanvas.Events = ((global::Gdk.EventMask)(256)); this.experimentCanvas.Name = "experimentCanvas"; this.vbox2.Add (this.experimentCanvas); global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.experimentCanvas])); w2.Position = 1; this.hbox2.Add (this.vbox2); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vbox2])); w3.Position = 0; // Container child hbox2.Gtk.Box+BoxChild this.vbox1 = new global::Gtk.VBox (); this.vbox1.Name = "vbox1"; this.vbox1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild this.zoomScale = new global::Gtk.VScale (null); this.zoomScale.HeightRequest = 300; this.zoomScale.CanFocus = true; this.zoomScale.Name = "zoomScale"; this.zoomScale.Inverted = true; this.zoomScale.Adjustment.Lower = 0.1D; this.zoomScale.Adjustment.Upper = 3D; this.zoomScale.Adjustment.PageIncrement = 0.1D; this.zoomScale.Adjustment.StepIncrement = 0.01D; this.zoomScale.Adjustment.Value = 1D; this.zoomScale.DrawValue = true; this.zoomScale.Digits = 2; this.zoomScale.ValuePos = ((global::Gtk.PositionType)(3)); this.vbox1.Add (this.zoomScale); global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.zoomScale])); w4.Position = 0; w4.Expand = false; w4.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.scaleToOriginalSizeButton = new global::Gtk.Button (); this.scaleToOriginalSizeButton.TooltipMarkup = "Zoom to orginal 1:1 scale"; this.scaleToOriginalSizeButton.CanFocus = true; this.scaleToOriginalSizeButton.Name = "scaleToOriginalSizeButton"; // Container child scaleToOriginalSizeButton.Gtk.Container+ContainerChild global::Gtk.Alignment w5 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w6 = new global::Gtk.HBox (); w6.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w7 = new global::Gtk.Image (); w7.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-zoom-100", global::Gtk.IconSize.Menu); w6.Add (w7); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w9 = new global::Gtk.Label (); w6.Add (w9); w5.Add (w6); this.scaleToOriginalSizeButton.Add (w5); this.vbox1.Add (this.scaleToOriginalSizeButton); global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.scaleToOriginalSizeButton])); w13.Position = 1; w13.Expand = false; w13.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.zoomToFitButton = new global::Gtk.Button (); this.zoomToFitButton.TooltipMarkup = "Zoom to fit"; this.zoomToFitButton.CanFocus = true; this.zoomToFitButton.Name = "zoomToFitButton"; // Container child zoomToFitButton.Gtk.Container+ContainerChild global::Gtk.Alignment w14 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w15 = new global::Gtk.HBox (); w15.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w16 = new global::Gtk.Image (); w16.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-zoom-fit", global::Gtk.IconSize.Menu); w15.Add (w16); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w18 = new global::Gtk.Label (); w15.Add (w18); w14.Add (w15); this.zoomToFitButton.Add (w14); this.vbox1.Add (this.zoomToFitButton); global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.zoomToFitButton])); w22.Position = 2; w22.Expand = false; w22.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hseparator1 = new global::Gtk.HSeparator (); this.hseparator1.Name = "hseparator1"; this.vbox1.Add (this.hseparator1); global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); w23.Position = 3; w23.Expand = false; w23.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.selectionToolButton = new global::Gtk.ToggleButton (); this.selectionToolButton.CanFocus = true; this.selectionToolButton.Name = "selectionToolButton"; this.selectionToolButton.UseUnderline = true; this.selectionToolButton.Active = true; // Container child selectionToolButton.Gtk.Container+ContainerChild global::Gtk.Alignment w24 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w25 = new global::Gtk.HBox (); w25.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w26 = new global::Gtk.Image (); w26.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("TraceLab.UI.GTK.Resources.arrowcursor_icon.png"); w25.Add (w26); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w28 = new global::Gtk.Label (); w25.Add (w28); w24.Add (w25); this.selectionToolButton.Add (w24); this.vbox1.Add (this.selectionToolButton); global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.selectionToolButton])); w32.Position = 4; w32.Expand = false; w32.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.panToolButton = new global::Gtk.ToggleButton (); this.panToolButton.CanFocus = true; this.panToolButton.Name = "panToolButton"; this.panToolButton.UseUnderline = true; // Container child panToolButton.Gtk.Container+ContainerChild global::Gtk.Alignment w33 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w34 = new global::Gtk.HBox (); w34.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w35 = new global::Gtk.Image (); w35.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("TraceLab.UI.GTK.Resources.cursor-grab-open.png"); w34.Add (w35); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w37 = new global::Gtk.Label (); w34.Add (w37); w33.Add (w34); this.panToolButton.Add (w33); this.vbox1.Add (this.panToolButton); global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.panToolButton])); w41.Position = 5; w41.Expand = false; w41.Fill = false; this.hbox2.Add (this.vbox1); global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vbox1])); w42.Position = 1; w42.Expand = false; w42.Fill = false; this.Add (this.hbox2); if ((this.Child != null)) { this.Child.ShowAll (); } this.Hide (); this.zoomScale.ValueChanged += new global::System.EventHandler (this.ZoomValueChanged); this.scaleToOriginalSizeButton.Clicked += new global::System.EventHandler (this.ZoomToOriginal); this.zoomToFitButton.Clicked += new global::System.EventHandler (this.ZoomToFit); this.selectionToolButton.Toggled += new global::System.EventHandler (this.SelectionToolButtonToggled); this.panToolButton.Toggled += new global::System.EventHandler (this.PanToolButtonToggled); }
protected virtual void Build() { global::Stetic.Gui.Initialize(this); // Widget TraceLab.UI.GTK.ExperimentCanvasWidget global::Stetic.BinContainer.Attach(this); this.Name = "TraceLab.UI.GTK.ExperimentCanvasWidget"; // Container child TraceLab.UI.GTK.ExperimentCanvasWidget.Gtk.Container+ContainerChild this.hbox2 = new global::Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild this.experimentCrumbs = new global::TraceLab.UI.GTK.Crumbs(); this.experimentCrumbs.Events = ((global::Gdk.EventMask)(256)); this.experimentCrumbs.Name = "experimentCrumbs"; this.experimentCrumbs.Radius = 5; this.experimentCrumbs.Spacing = 11; this.experimentCrumbs.Xoffset = 12; this.experimentCrumbs.Yoffset = 6; this.vbox2.Add(this.experimentCrumbs); global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.experimentCrumbs])); w1.Position = 0; w1.Expand = false; w1.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.experimentCanvas = new global::MonoHotDraw.SteticComponent(); this.experimentCanvas.Events = ((global::Gdk.EventMask)(256)); this.experimentCanvas.Name = "experimentCanvas"; this.vbox2.Add(this.experimentCanvas); global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.experimentCanvas])); w2.Position = 1; this.hbox2.Add(this.vbox2); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vbox2])); w3.Position = 0; // Container child hbox2.Gtk.Box+BoxChild this.vbox1 = new global::Gtk.VBox(); this.vbox1.Name = "vbox1"; this.vbox1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild this.zoomScale = new global::Gtk.VScale(null); this.zoomScale.HeightRequest = 300; this.zoomScale.CanFocus = true; this.zoomScale.Name = "zoomScale"; this.zoomScale.Inverted = true; this.zoomScale.Adjustment.Lower = 0.1D; this.zoomScale.Adjustment.Upper = 3D; this.zoomScale.Adjustment.PageIncrement = 0.1D; this.zoomScale.Adjustment.StepIncrement = 0.01D; this.zoomScale.Adjustment.Value = 1D; this.zoomScale.DrawValue = true; this.zoomScale.Digits = 2; this.zoomScale.ValuePos = ((global::Gtk.PositionType)(3)); this.vbox1.Add(this.zoomScale); global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.zoomScale])); w4.Position = 0; w4.Expand = false; w4.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.scaleToOriginalSizeButton = new global::Gtk.Button(); this.scaleToOriginalSizeButton.TooltipMarkup = "Zoom to orginal 1:1 scale"; this.scaleToOriginalSizeButton.CanFocus = true; this.scaleToOriginalSizeButton.Name = "scaleToOriginalSizeButton"; // Container child scaleToOriginalSizeButton.Gtk.Container+ContainerChild global::Gtk.Alignment w5 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w6 = new global::Gtk.HBox(); w6.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w7 = new global::Gtk.Image(); w7.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-zoom-100", global::Gtk.IconSize.Menu); w6.Add(w7); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w9 = new global::Gtk.Label(); w6.Add(w9); w5.Add(w6); this.scaleToOriginalSizeButton.Add(w5); this.vbox1.Add(this.scaleToOriginalSizeButton); global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.scaleToOriginalSizeButton])); w13.Position = 1; w13.Expand = false; w13.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.zoomToFitButton = new global::Gtk.Button(); this.zoomToFitButton.TooltipMarkup = "Zoom to fit"; this.zoomToFitButton.CanFocus = true; this.zoomToFitButton.Name = "zoomToFitButton"; // Container child zoomToFitButton.Gtk.Container+ContainerChild global::Gtk.Alignment w14 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w15 = new global::Gtk.HBox(); w15.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w16 = new global::Gtk.Image(); w16.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-zoom-fit", global::Gtk.IconSize.Menu); w15.Add(w16); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w18 = new global::Gtk.Label(); w15.Add(w18); w14.Add(w15); this.zoomToFitButton.Add(w14); this.vbox1.Add(this.zoomToFitButton); global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.zoomToFitButton])); w22.Position = 2; w22.Expand = false; w22.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hseparator1 = new global::Gtk.HSeparator(); this.hseparator1.Name = "hseparator1"; this.vbox1.Add(this.hseparator1); global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); w23.Position = 3; w23.Expand = false; w23.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.selectionToolButton = new global::Gtk.ToggleButton(); this.selectionToolButton.CanFocus = true; this.selectionToolButton.Name = "selectionToolButton"; this.selectionToolButton.UseUnderline = true; this.selectionToolButton.Active = true; // Container child selectionToolButton.Gtk.Container+ContainerChild global::Gtk.Alignment w24 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w25 = new global::Gtk.HBox(); w25.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w26 = new global::Gtk.Image(); w26.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("TraceLab.UI.GTK.Resources.arrowcursor_icon.png"); w25.Add(w26); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w28 = new global::Gtk.Label(); w25.Add(w28); w24.Add(w25); this.selectionToolButton.Add(w24); this.vbox1.Add(this.selectionToolButton); global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.selectionToolButton])); w32.Position = 4; w32.Expand = false; w32.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.panToolButton = new global::Gtk.ToggleButton(); this.panToolButton.CanFocus = true; this.panToolButton.Name = "panToolButton"; this.panToolButton.UseUnderline = true; // Container child panToolButton.Gtk.Container+ContainerChild global::Gtk.Alignment w33 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild global::Gtk.HBox w34 = new global::Gtk.HBox(); w34.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Image w35 = new global::Gtk.Image(); w35.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("TraceLab.UI.GTK.Resources.cursor-grab-open.png"); w34.Add(w35); // Container child GtkHBox.Gtk.Container+ContainerChild global::Gtk.Label w37 = new global::Gtk.Label(); w34.Add(w37); w33.Add(w34); this.panToolButton.Add(w33); this.vbox1.Add(this.panToolButton); global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.panToolButton])); w41.Position = 5; w41.Expand = false; w41.Fill = false; this.hbox2.Add(this.vbox1); global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vbox1])); w42.Position = 1; w42.Expand = false; w42.Fill = false; this.Add(this.hbox2); if ((this.Child != null)) { this.Child.ShowAll(); } this.Hide(); this.zoomScale.ValueChanged += new global::System.EventHandler(this.ZoomValueChanged); this.scaleToOriginalSizeButton.Clicked += new global::System.EventHandler(this.ZoomToOriginal); this.zoomToFitButton.Clicked += new global::System.EventHandler(this.ZoomToFit); this.selectionToolButton.Toggled += new global::System.EventHandler(this.SelectionToolButtonToggled); this.panToolButton.Toggled += new global::System.EventHandler(this.PanToolButtonToggled); }