protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget CardLib.CardRow Stetic.BinContainer.Attach(this); this.HeightRequest = 108; this.Name = "CardLib.CardRow"; // Container child CardLib.CardRow.Gtk.Container+ContainerChild this.eventbox1 = new Gtk.EventBox(); this.eventbox1.Events = ((Gdk.EventMask)(4)); this.eventbox1.Name = "eventbox1"; this.eventbox1.BorderWidth = ((uint)(5)); // Container child eventbox1.Gtk.Container+ContainerChild this.drawingarea1 = new Gtk.DrawingArea(); this.drawingarea1.HeightRequest = 98; this.drawingarea1.Name = "drawingarea1"; this.eventbox1.Add(this.drawingarea1); this.Add(this.eventbox1); if ((this.Child != null)) { this.Child.ShowAll(); } this.Hide(); this.eventbox1.MotionNotifyEvent += new Gtk.MotionNotifyEventHandler(this.OnEventbox1MotionNotifyEvent); this.eventbox1.LeaveNotifyEvent += new Gtk.LeaveNotifyEventHandler(this.OnEventbox1LeaveNotifyEvent); this.eventbox1.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnEventbox1ButtonPressEvent); this.drawingarea1.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingarea1ExposeEvent); }
protected override void OnKeyDown(Gtk.DrawingArea canvas, Gtk.KeyPressEventArgs args) { if (!EditEngine.HandleKeyDown(canvas, args)) { base.OnKeyDown(canvas, args); } }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; if (args.Event.Button == 1) { button_down = 1; } else if (args.Event.Button == 3) { button_down = 3; } if (!doc.Workspace.PointInCanvas(point)) { return; } var color = GetColorFromPoint(point); if (button_down == 1) { PintaCore.Palette.PrimaryColor = color; } else if (button_down == 3) { PintaCore.Palette.SecondaryColor = color; } }
private void Build() { var swScroll = new Gtk.ScrolledWindow(); // Drawing area this.drawingArea = new Gtk.DrawingArea(); this.drawingArea.ExposeEvent += (o, args) => this.OnExposeDrawingArea(); // Layout swScroll.AddWithViewport( this.drawingArea ); this.VBox.PackStart( swScroll, true, true, 5 ); this.AddButton( Gtk.Stock.Close, Gtk.ResponseType.Close ); // Polish this.WindowPosition = Gtk.WindowPosition.CenterOnParent; this.Resize( 320, 200 ); this.SetGeometryHints( this, new Gdk.Geometry() { MinWidth = 320, MinHeight = 200 }, Gdk.WindowHints.MinSize ); }
protected override void OnKeyUp(Gtk.DrawingArea canvas, Gtk.KeyReleaseEventArgs args) { if (!EditEngine.HandleKeyUp(canvas, args)) { base.OnKeyUp(canvas, args); } }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; if (is_dragging || is_rotating) { return; } original_point = point; if (!doc.Workspace.PointInCanvas(point)) { return; } if (args.Event.Button == GtkExtensions.MouseRightButton) { is_rotating = true; } else { is_dragging = true; } OnStartTransform(); }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; double x = point.X; double y = point.Y; doc.ToolLayer.Hidden = true; if (mouseDown == 1 || mouseDown == 3) //left or right { if (args.Event.Button == 1) //left { if (Math.Abs(shape_origin.X - x) <= tolerance && Math.Abs(shape_origin.Y - y) <= tolerance) { doc.Workspace.ZoomIn(); doc.Workspace.RecenterView(x, y); } else { doc.Workspace.ZoomToRectangle(PointsToRectangle(shape_origin, point)); } } else { doc.Workspace.ZoomOut(); doc.Workspace.RecenterView(x, y); } } mouseDown = 0; is_drawing = false; SetCursor(cursorZoom); //restore regular cursor }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { is_dragging = false; is_rotating = false; OnFinishTransform(); }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; double x = point.X; double y = point.Y; current_point = point; doc.ToolLayer.Hidden = true; DrawShape(Utility.PointsToRectangle(shape_origin, new PointD(x, y), args.Event.IsShiftPressed()), doc.CurrentLayer, args.Event.IsShiftPressed()); Gdk.Rectangle r = GetRectangleFromPoints(shape_origin, new PointD(x, y)); doc.Workspace.Invalidate(last_dirty.ToGdkRectangle()); is_drawing = false; if (surface_modified) { doc.History.PushNewItem(CreateHistoryItem()); } else if (undo_surface != null) { (undo_surface as IDisposable).Dispose(); } surface_modified = false; }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { // If we are already drawing, ignore any additional mouse down events if (is_drawing) { return; } Document doc = PintaCore.Workspace.ActiveDocument; shape_origin = point; current_point = point; is_drawing = true; if (args.Event.Button == 1) { outline_color = PintaCore.Palette.PrimaryColor; fill_color = PintaCore.Palette.SecondaryColor; } else { outline_color = PintaCore.Palette.SecondaryColor; fill_color = PintaCore.Palette.PrimaryColor; } doc.ToolLayer.Clear(); doc.ToolLayer.Hidden = false; surface_modified = false; undo_surface = doc.CurrentLayer.Surface.Clone(); }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; if (args.Event.Button == 1) { button_down = 1; } else if (args.Event.Button == 3) { button_down = 3; } if (!doc.Workspace.PointInCanvas(point)) { return; } Color color = doc.CurrentLayer.Surface.GetPixel((int)point.X, (int)point.Y); if (button_down == 1) { PintaCore.Palette.PrimaryColor = color; } else if (button_down == 3) { PintaCore.Palette.SecondaryColor = color; } }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { // If we are already tracking, ignore any additional mouse down events if (mouseDown > 0) { return; } shape_origin = point; switch (args.Event.Button) { case 1: //left SetCursor(cursorZoomIn); break; case 2: //midle SetCursor(cursorZoomPan); break; case 3: //right SetCursor(cursorZoomOut); break; } mouseDown = args.Event.Button; }
// nothing = replace // Ctrl = union // RMB = exclude // Ctrl+RMB = xor protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; //SetCursor (Cursors.WaitCursor); if (args.Event.IsControlPressed() && args.Event.Button == 1) { this.combineMode = CombineMode.Union; } else if (args.Event.IsControlPressed() && args.Event.Button == 3) { this.combineMode = CombineMode.Xor; } else if (args.Event.Button == 3) { this.combineMode = CombineMode.Exclude; } else { this.combineMode = CombineMode.Replace; } base.OnMouseDown(canvas, args, point); doc.ShowSelection = true; }
protected override void OnKeyUp(Gtk.DrawingArea canvas, Gtk.KeyReleaseEventArgs args) { base.OnKeyUp(canvas, args); if (args.Event.Key == Key.Control_L || args.Event.Key == Key.Control_R) { SetCursor(DefaultCursor); } }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; combine_mode = PintaCore.Workspace.SelectionHandler.DetermineCombineMode(args); base.OnMouseDown(canvas, args, point); doc.ShowSelection = true; }
public Clock() { this.Build (); SetTime (); drawingArea = new Gtk.DrawingArea (); drawingArea.ExposeEvent += OnExpose; Add (drawingArea); ShowAll (); }
public Clock() { this.Build(); SetTime(); drawingArea = new Gtk.DrawingArea(); drawingArea.ExposeEvent += OnExpose; Add(drawingArea); ShowAll(); }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; Point pos = new Point((int)point.X, (int)point.Y); // Don't do anything if we're outside the canvas if (pos.X < 0 || pos.X >= doc.ImageSize.Width) { return; } if (pos.Y < 0 || pos.Y >= doc.ImageSize.Height) { return; } base.OnMouseDown(canvas, args, point); Gdk.Region currentRegion = Gdk.Region.Rectangle(doc.GetSelectedBounds(true)); // See if the mouse click is valid if (!currentRegion.PointIn(pos.X, pos.Y) && limitToSelection) { currentRegion.Dispose(); currentRegion = null; return; } ImageSurface surface = doc.CurrentUserLayer.Surface; ImageSurface stencil_surface = new ImageSurface(Format.Argb32, (int)surface.Width, (int)surface.Height); IBitVector2D stencilBuffer = new BitVector2DSurfaceAdapter(stencil_surface); int tol = (int)(Tolerance * Tolerance * 256); Rectangle boundingBox; if (IsContinguousMode) { FillStencilFromPoint(surface, stencilBuffer, pos, tol, out boundingBox, currentRegion, limitToSelection); } else { FillStencilByColor(surface, stencilBuffer, surface.GetColorBgra(pos.X, pos.Y), tol, out boundingBox, currentRegion, LimitToSelection); } stencil = stencilBuffer; OnFillRegionComputed(stencilBuffer); // If a derived tool is only going to use the stencil, // don't waste time building the polygon set if (CalculatePolygonSet) { Point[][] polygonSet = stencilBuffer.CreatePolygonSet(boundingBox, 0, 0); OnFillRegionComputed(polygonSet); } }
protected override void OnKeyDown(Gtk.DrawingArea canvas, Gtk.KeyPressEventArgs args) { base.OnKeyDown(canvas, args); //note that this WONT work if user presses control key and THEN selects the tool! if (args.Event.Key == Key.Control_L || args.Event.Key == Key.Control_R) { Gdk.Pixbuf icon = PintaCore.Resources.GetIcon("Cursor.CloneStampSetSource.png"); Gdk.Cursor setSourceCursor = new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, icon, 6, 11); SetCursor(setSourceCursor); } }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { is_dragging = false; if (hist != null) { PintaCore.History.PushNewItem(hist); } hist = null; }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; if (!tracking || args.Event.Button != button) { return; } tracking = false; doc.History.PushNewItem(new SimpleHistoryItem(Icon, Name, undo_surface, doc.CurrentUserLayerIndex)); }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, PointD point) { button_down = 0; if ((int)tool_select.SelectedItem.Tag == 1) { PintaCore.Tools.SetCurrentTool(PintaCore.Tools.PreviousTool); } else if ((int)tool_select.SelectedItem.Tag == 2) { PintaCore.Tools.SetCurrentTool(Catalog.GetString("Pencil")); } }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, PointD point) { if (args.Event.Button == 1) { fill_color = PintaCore.Palette.PrimaryColor; } else { fill_color = PintaCore.Palette.SecondaryColor; } base.OnMouseDown(canvas, args, point); }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { if (!is_dragging && !is_rotating && !is_scaling) { return; } is_dragging = false; is_rotating = false; is_scaling = false; OnFinishTransform(transform); }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { // If we are already drawing, ignore any additional mouse down events if (is_dragging) { return; } origin_offset = point; is_dragging = true; hist = new SelectionHistoryItem(Icon, Name); hist.TakeSnapshot(); }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; // Protect against history corruption if (tracking) { return; } startpoint = point; tracking = true; button = args.Event.Button; undo_surface = doc.CurrentLayer.Surface.Clone(); }
private void OnExpose(object obj, Gtk.ExposeEventArgs args) { Gtk.DrawingArea area = (Gtk.DrawingArea)obj; Cairo.Context cr = Gdk.CairoHelper.Create(area.GdkWindow); int width, height; width = Allocation.Width; height = Allocation.Height; double radius = Math.Min(width, height) / 4; //draw face cr.Arc(width / 2, height / 2, radius, 0, 2 * Math.PI); cr.StrokePreserve(); cr.SetSourceRGB(0, 0, 0); cr.Fill(); //draw hands double hoursHandSize = 0.35 * radius; double minutesHandSize = 0.5 * radius; double secondsHandSize = 0.75 * radius; double x = width / 2; double y = height / 2; cr.LineWidth = 2 * cr.LineWidth; cr.SetSourceRGB(0, 255, 0); cr.MoveTo(x, y); cr.LineTo(x + hoursHandSize * Math.Cos(ToRadian(hoursHand)), y + hoursHandSize * Math.Sin(ToRadian(hoursHand))); cr.Stroke(); cr.MoveTo(x, y); cr.LineTo(x + minutesHandSize * Math.Cos(ToRadian(minutesHand)), y + minutesHandSize * Math.Sin(ToRadian(minutesHand))); cr.Stroke(); cr.LineWidth = 0.25 * cr.LineWidth; cr.SetSourceRGB(255, 0, 0); cr.MoveTo(x, y); cr.LineTo(x + secondsHandSize * Math.Cos(ToRadian(secondsHand)), y + secondsHandSize * Math.Sin(ToRadian(secondsHand))); cr.Stroke(); ((IDisposable)cr.Target).Dispose(); ((IDisposable)cr).Dispose(); }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, PointD point) { // If we are already panning, ignore any additional mouse down events if (active) { return; } Document doc = PintaCore.Workspace.ActiveDocument; // Don't scroll if the whole canvas fits (no scrollbars) if (!doc.Workspace.CanvasFitsInWindow) { active = true; } last_point = new PointD(args.Event.XRoot, args.Event.YRoot); }
/// <summary> /// Genera la vista que muestra el gráfico en la aplicación actualizando el <see cref="DrawingArea"></see> /// </summary> /// <returns>La vista que contiene el gráfico a mostrar</returns> private Gtk.HBox GraphicView() { var RightBox = new Gtk.VBox(false, 5); var ViewBox = new Gtk.HBox(false, 5); var Scrollable = new Gtk.ScrolledWindow(); // ------------------INICIALIZACION--------------------- var WeightButton = new Gtk.Button("WEIGHT"); WeightButton.Clicked += (o, args) => GraphicWeight(); var SizeButton = new Gtk.Button("SIZE"); SizeButton.Clicked += (o, args) => GraphicSize(); var TimeButton = new Gtk.Button("TIME"); TimeButton.Clicked += (o, args) => GraphicTime(); var DistButton = new Gtk.Button("DIST"); DistButton.Clicked += (o, args) => GraphicDist(); // -------------------COMPOSICION------------------------ DrawingArea = new Gtk.DrawingArea(); Scrollable.AddWithViewport(DrawingArea); // Fill Boxs. RightBox.Add(WeightButton); RightBox.Add(SizeButton); RightBox.Add(TimeButton); RightBox.Add(DistButton); // Compose main Box. ViewBox.Add(Scrollable); ViewBox.Add(RightBox); // Add main box to the window. return(ViewBox); }
protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point) { // If we are already drawing, ignore any additional mouse down events if (is_dragging) { return; } Document doc = PintaCore.Workspace.ActiveDocument; origin_offset = point; is_dragging = true; hist = new MovePixelsHistoryItem(Icon, Name, doc); hist.TakeSnapshot(!doc.ShowSelectionLayer); if (!doc.ShowSelectionLayer) { // Copy the selection to the temp layer doc.CreateSelectionLayer(); doc.ShowSelectionLayer = true; using (Cairo.Context g = new Cairo.Context(doc.SelectionLayer.Surface)) { g.AppendPath(doc.SelectionPath); g.FillRule = FillRule.EvenOdd; g.SetSource(doc.CurrentLayer.Surface); g.Clip(); g.Paint(); } Cairo.ImageSurface surf = doc.CurrentLayer.Surface; using (Cairo.Context g = new Cairo.Context(surf)) { g.AppendPath(doc.SelectionPath); g.FillRule = FillRule.EvenOdd; g.Operator = Cairo.Operator.Clear; g.Fill(); } } canvas.GdkWindow.Invalidate(); }
///<summary> /// Realize the area. ///</summary> public virtual void Realize() { Gtk.DrawingArea da = areaGroup.DrawingArea; backPixmap = da.GdkWindow; activeCursorGC = new Gdk.GC(da.GdkWindow); inactiveCursorGC = new Gdk.GC(da.GdkWindow); Gdk.Color col = new Gdk.Color(); Gdk.Color.Parse("red", ref col); activeCursorGC.RgbFgColor = col; Gdk.Color.Parse("gray", ref col); inactiveCursorGC.RgbFgColor = col; cursorGC = activeCursorGC; isAreaRealized = true; }
protected override void OnMouseUp(Gtk.DrawingArea canvas, Gtk.ButtonReleaseEventArgs args, Cairo.PointD point) { Document doc = PintaCore.Workspace.ActiveDocument; painting = false; using (Cairo.Context g = new Cairo.Context(doc.CurrentUserLayer.Surface)) { g.SetSource(doc.ToolLayer.Surface); g.Paint(); } base.OnMouseUp(canvas, args, point); offset = new Point(int.MinValue, int.MinValue); last_point = new Point(int.MinValue, int.MinValue); doc.ToolLayer.Clear(); doc.ToolLayer.Hidden = true; doc.Workspace.Invalidate(); }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget RoboWarX.GTK.ArenaWidget Stetic.BinContainer.Attach(this); this.Name = "RoboWarX.GTK.ArenaWidget"; // Container child RoboWarX.GTK.ArenaWidget.Gtk.Container+ContainerChild this.view = new Gtk.DrawingArea(); this.view.WidthRequest = 300; this.view.HeightRequest = 300; this.view.Name = "view"; this.Add(this.view); if ((this.Child != null)) { this.Child.ShowAll(); } this.Show(); this.Realized += new System.EventHandler(this.OnRealized); this.Unrealized += new System.EventHandler(this.OnUnrealized); this.view.ExposeEvent += new Gtk.ExposeEventHandler(this.OnViewExposeEvent); }
public SchemaVisualizer(Gtk.DrawingArea canvas) { this.canvas = canvas; canvas.AddEvents((int)Gdk.EventMask.ButtonPressMask); canvas.AddEvents((int)Gdk.EventMask.ButtonReleaseMask); canvas.AddEvents((int)Gdk.EventMask.PointerMotionMask); canvas.ButtonPressEvent += HandleDrawingArea1ButtonPressEvent; canvas.ButtonReleaseEvent += HandleDrawingArea1ButtonReleaseEvent; canvas.KeyPressEvent += HandleKeyPressEvent; canvas.KeyReleaseEvent += HandleKeyReleaseEvent; canvas.ExposeEvent += HandleDrawingArea1ExposeEvent; canvas.ConfigureEvent += HandleConfigureEvent; canvas.MotionNotifyEvent += HandleDrawingArea1MotionNotifyEvent; model.RegisterSubModel <ShapesModel>(scene); model.RegisterSubModel <SelectionModel>(selection); model.RegisterSubModel <InteractionStateModel>(interaction); model.ModelChanged += HandleModelChanged; view.Viewers.Add(typeof(SolidV.MVC.Model), new ModelViewer <Context>()); view.Viewers.Add(typeof(ShapesModel), new ShapeModelViewer()); view.Viewers.Add(typeof(RectangleShape), new RectangleShapeViewer()); view.Viewers.Add(typeof(EllipseShape), new EllipseShapeViewer()); view.Viewers.Add(typeof(ArrowShape), new ArrowShapeViewer()); view.Viewers.Add(typeof(TextBlockShape), new TextBlockShapeViewer()); view.Viewers.Add(typeof(SelectionModel), new SelectionModelViewer()); view.Viewers.Add(typeof(Glue), new GlueViewer()); view.Viewers.Add(typeof(InteractionStateModel), new InteractionStateModelViewer()); controller.SubControllers.Add(new ShapeSelectionController(model, view)); ChainController <Gdk.Event, Context, SolidV.MVC.Model> cc = new ChainController <Gdk.Event, Context, SolidV.MVC.Model>(); cc.SubControllers.Add(new ConnectorDragController(model, view)); cc.SubControllers.Add(new ShapeDragController(model, view)); controller.SubControllers.Add(cc); }
/// <summary> /// Build the UI /// </summary> private void Build() { var swScroll = new Gtk.ScrolledWindow(); this.drawingArea = new Gtk.DrawingArea(); this.drawingArea.SetSizeRequest( 640, 480 ); swScroll.AddWithViewport( this.drawingArea ); this.Add( swScroll ); // Polish this.SetGeometryHints( this, new Gdk.Geometry() { MinWidth = 500, MinHeight = 350 }, Gdk.WindowHints.MinSize ); // Events this.DeleteEvent += (o, args) => Gtk.Application.Quit(); this.drawingArea.ExposeEvent += (o, args) => this.OnExposed(); this.ShowAll(); }
public static void RegisterDrawingElements(Gtk.DrawingArea drawingArea) { MainDrawingArea = drawingArea; }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget HollyLibrary.HColorPickerWidget Stetic.BinContainer.Attach(this); this.Name = "HollyLibrary.HColorPickerWidget"; // Container child HollyLibrary.HColorPickerWidget.Gtk.Container+ContainerChild this.hbox1 = new Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild this.vbox2 = new Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild this.hbox2 = new Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 7; this.hbox2.BorderWidth = ((uint)(6)); // Container child hbox2.Gtk.Box+BoxChild this.ColorWell = new HollyLibrary.ColorPanel(); this.ColorWell.WidthRequest = 250; this.ColorWell.HeightRequest = 200; this.ColorWell.Name = "ColorWell"; this.hbox2.Add(this.ColorWell); Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox2[this.ColorWell])); w1.Position = 1; w1.Expand = false; w1.Fill = false; // Container child hbox2.Gtk.Box+BoxChild this.Slider = new HollyLibrary.VerticalColorSlider(); this.Slider.WidthRequest = 50; this.Slider.Name = "Slider"; this.hbox2.Add(this.Slider); Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox2[this.Slider])); w2.Position = 2; w2.Expand = false; w2.Fill = false; this.vbox2.Add(this.hbox2); Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox2])); w3.Position = 0; w3.Expand = false; w3.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.hbox3 = new Gtk.HBox(); this.hbox3.Name = "hbox3"; this.hbox3.Spacing = 6; // Container child hbox3.Gtk.Box+BoxChild this.ChkR1 = new Gtk.RadioButton("R:"); this.ChkR1.CanFocus = true; this.ChkR1.Name = "ChkR1"; this.ChkR1.Active = true; this.ChkR1.DrawIndicator = true; this.ChkR1.UseUnderline = true; this.ChkR1.Group = new GLib.SList(System.IntPtr.Zero); this.hbox3.Add(this.ChkR1); Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox3[this.ChkR1])); w4.Position = 0; // Container child hbox3.Gtk.Box+BoxChild this.TxtRed = new Gtk.SpinButton(0, 255, 1); this.TxtRed.CanFocus = true; this.TxtRed.Name = "TxtRed"; this.TxtRed.Adjustment.PageIncrement = 10; this.TxtRed.ClimbRate = 1; this.TxtRed.Numeric = true; this.hbox3.Add(this.TxtRed); Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox3[this.TxtRed])); w5.Position = 1; w5.Expand = false; w5.Fill = false; // Container child hbox3.Gtk.Box+BoxChild this.ChkG = new Gtk.RadioButton("G:"); this.ChkG.CanFocus = true; this.ChkG.Name = "ChkG"; this.ChkG.DrawIndicator = true; this.ChkG.UseUnderline = true; this.ChkG.Group = this.ChkR1.Group; this.hbox3.Add(this.ChkG); Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox3[this.ChkG])); w6.Position = 2; // Container child hbox3.Gtk.Box+BoxChild this.TxtGreen = new Gtk.SpinButton(0, 255, 1); this.TxtGreen.CanFocus = true; this.TxtGreen.Name = "TxtGreen"; this.TxtGreen.Adjustment.PageIncrement = 10; this.TxtGreen.ClimbRate = 1; this.TxtGreen.Numeric = true; this.hbox3.Add(this.TxtGreen); Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox3[this.TxtGreen])); w7.Position = 3; w7.Expand = false; w7.Fill = false; // Container child hbox3.Gtk.Box+BoxChild this.CkkB = new Gtk.RadioButton("B:"); this.CkkB.CanFocus = true; this.CkkB.Name = "CkkB"; this.CkkB.DrawIndicator = true; this.CkkB.UseUnderline = true; this.CkkB.Group = this.ChkR1.Group; this.hbox3.Add(this.CkkB); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox3[this.CkkB])); w8.Position = 4; // Container child hbox3.Gtk.Box+BoxChild this.TxtBlue = new Gtk.SpinButton(0, 255, 1); this.TxtBlue.CanFocus = true; this.TxtBlue.Name = "TxtBlue"; this.TxtBlue.Adjustment.PageIncrement = 10; this.TxtBlue.ClimbRate = 1; this.TxtBlue.Numeric = true; this.hbox3.Add(this.TxtBlue); Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox3[this.TxtBlue])); w9.Position = 5; w9.Expand = false; w9.Fill = false; this.vbox2.Add(this.hbox3); Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox3])); w10.Position = 1; w10.Expand = false; w10.Fill = false; this.hbox1.Add(this.vbox2); Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox2])); w11.Position = 0; // Container child hbox1.Gtk.Box+BoxChild this.vbox1 = new Gtk.VBox(); this.vbox1.Name = "vbox1"; this.vbox1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild this.frame1 = new Gtk.Frame(); this.frame1.Name = "frame1"; this.frame1.ShadowType = ((Gtk.ShadowType)(1)); // Container child frame1.Gtk.Container+ContainerChild this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment.Name = "GtkAlignment"; // Container child GtkAlignment.Gtk.Container+ContainerChild this.Preview = new Gtk.DrawingArea(); this.Preview.WidthRequest = 100; this.Preview.HeightRequest = 100; this.Preview.Name = "Preview"; this.GtkAlignment.Add(this.Preview); this.frame1.Add(this.GtkAlignment); this.GtkLabel3 = new Gtk.Label(); this.GtkLabel3.Name = "GtkLabel3"; this.GtkLabel3.LabelProp = "<b>Preview</b>"; this.GtkLabel3.UseMarkup = true; this.frame1.LabelWidget = this.GtkLabel3; this.vbox1.Add(this.frame1); Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1])); w14.Position = 0; w14.Expand = false; w14.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.table1 = new Gtk.Table(((uint)(4)), ((uint)(4)), false); this.table1.Name = "table1"; this.table1.RowSpacing = ((uint)(6)); this.table1.ColumnSpacing = ((uint)(6)); // Container child table1.Gtk.Table+TableChild this.chkB = new Gtk.RadioButton("B:"); this.chkB.CanFocus = true; this.chkB.Name = "chkB"; this.chkB.DrawIndicator = true; this.chkB.UseUnderline = true; this.chkB.Group = this.ChkR1.Group; this.table1.Add(this.chkB); Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(this.table1[this.chkB])); w15.TopAttach = ((uint)(2)); w15.BottomAttach = ((uint)(3)); w15.XOptions = ((Gtk.AttachOptions)(4)); w15.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.chkH = new Gtk.RadioButton("H:"); this.chkH.CanFocus = true; this.chkH.Name = "chkH"; this.chkH.DrawIndicator = true; this.chkH.UseUnderline = true; this.chkH.Group = this.ChkR1.Group; this.table1.Add(this.chkH); Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.table1[this.chkH])); w16.XOptions = ((Gtk.AttachOptions)(4)); w16.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.chkS = new Gtk.RadioButton("S:"); this.chkS.CanFocus = true; this.chkS.Name = "chkS"; this.chkS.DrawIndicator = true; this.chkS.UseUnderline = true; this.chkS.Group = this.ChkR1.Group; this.table1.Add(this.chkS); Gtk.Table.TableChild w17 = ((Gtk.Table.TableChild)(this.table1[this.chkS])); w17.TopAttach = ((uint)(1)); w17.BottomAttach = ((uint)(2)); w17.XOptions = ((Gtk.AttachOptions)(4)); w17.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.label2 = new Gtk.Label(); this.label2.Name = "label2"; this.label2.LabelProp = "K:"; this.table1.Add(this.label2); Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table1[this.label2])); w18.TopAttach = ((uint)(3)); w18.BottomAttach = ((uint)(4)); w18.LeftAttach = ((uint)(2)); w18.RightAttach = ((uint)(3)); w18.XOptions = ((Gtk.AttachOptions)(4)); w18.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.label5 = new Gtk.Label(); this.label5.Name = "label5"; this.label5.LabelProp = "C:"; this.table1.Add(this.label5); Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(this.table1[this.label5])); w19.LeftAttach = ((uint)(2)); w19.RightAttach = ((uint)(3)); w19.XOptions = ((Gtk.AttachOptions)(4)); w19.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.label6 = new Gtk.Label(); this.label6.Name = "label6"; this.label6.LabelProp = "M:"; this.table1.Add(this.label6); Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(this.table1[this.label6])); w20.TopAttach = ((uint)(1)); w20.BottomAttach = ((uint)(2)); w20.LeftAttach = ((uint)(2)); w20.RightAttach = ((uint)(3)); w20.XOptions = ((Gtk.AttachOptions)(4)); w20.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.label7 = new Gtk.Label(); this.label7.Name = "label7"; this.label7.LabelProp = "Y:"; this.table1.Add(this.label7); Gtk.Table.TableChild w21 = ((Gtk.Table.TableChild)(this.table1[this.label7])); w21.TopAttach = ((uint)(2)); w21.BottomAttach = ((uint)(3)); w21.LeftAttach = ((uint)(2)); w21.RightAttach = ((uint)(3)); w21.XOptions = ((Gtk.AttachOptions)(4)); w21.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.TxtB = new Gtk.SpinButton(0, 100, 1); this.TxtB.CanFocus = true; this.TxtB.Name = "TxtB"; this.TxtB.Adjustment.PageIncrement = 10; this.TxtB.ClimbRate = 1; this.TxtB.Numeric = true; this.table1.Add(this.TxtB); Gtk.Table.TableChild w22 = ((Gtk.Table.TableChild)(this.table1[this.TxtB])); w22.TopAttach = ((uint)(2)); w22.BottomAttach = ((uint)(3)); w22.LeftAttach = ((uint)(1)); w22.RightAttach = ((uint)(2)); w22.XOptions = ((Gtk.AttachOptions)(4)); w22.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.TxtC = new Gtk.SpinButton(0, 100, 1); this.TxtC.CanFocus = true; this.TxtC.Name = "TxtC"; this.TxtC.Adjustment.PageIncrement = 10; this.TxtC.ClimbRate = 1; this.TxtC.Numeric = true; this.table1.Add(this.TxtC); Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(this.table1[this.TxtC])); w23.LeftAttach = ((uint)(3)); w23.RightAttach = ((uint)(4)); w23.XOptions = ((Gtk.AttachOptions)(4)); w23.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.TxtH = new Gtk.SpinButton(0, 360, 1); this.TxtH.CanFocus = true; this.TxtH.Name = "TxtH"; this.TxtH.Adjustment.PageIncrement = 10; this.TxtH.ClimbRate = 1; this.TxtH.Numeric = true; this.table1.Add(this.TxtH); Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(this.table1[this.TxtH])); w24.LeftAttach = ((uint)(1)); w24.RightAttach = ((uint)(2)); w24.XOptions = ((Gtk.AttachOptions)(4)); w24.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.TxtK = new Gtk.SpinButton(0, 100, 1); this.TxtK.CanFocus = true; this.TxtK.Name = "TxtK"; this.TxtK.Adjustment.PageIncrement = 10; this.TxtK.ClimbRate = 1; this.TxtK.Numeric = true; this.TxtK.Value = 1; this.table1.Add(this.TxtK); Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.table1[this.TxtK])); w25.TopAttach = ((uint)(3)); w25.BottomAttach = ((uint)(4)); w25.LeftAttach = ((uint)(3)); w25.RightAttach = ((uint)(4)); w25.XOptions = ((Gtk.AttachOptions)(4)); w25.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.TxtM = new Gtk.SpinButton(0, 100, 1); this.TxtM.CanFocus = true; this.TxtM.Name = "TxtM"; this.TxtM.Adjustment.PageIncrement = 10; this.TxtM.ClimbRate = 1; this.TxtM.Numeric = true; this.table1.Add(this.TxtM); Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(this.table1[this.TxtM])); w26.TopAttach = ((uint)(1)); w26.BottomAttach = ((uint)(2)); w26.LeftAttach = ((uint)(3)); w26.RightAttach = ((uint)(4)); w26.XOptions = ((Gtk.AttachOptions)(4)); w26.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.TxtS = new Gtk.SpinButton(0, 100, 1); this.TxtS.CanFocus = true; this.TxtS.Name = "TxtS"; this.TxtS.Adjustment.PageIncrement = 10; this.TxtS.ClimbRate = 1; this.TxtS.Numeric = true; this.table1.Add(this.TxtS); Gtk.Table.TableChild w27 = ((Gtk.Table.TableChild)(this.table1[this.TxtS])); w27.TopAttach = ((uint)(1)); w27.BottomAttach = ((uint)(2)); w27.LeftAttach = ((uint)(1)); w27.RightAttach = ((uint)(2)); w27.XOptions = ((Gtk.AttachOptions)(4)); w27.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.TxtY = new Gtk.SpinButton(0, 100, 1); this.TxtY.CanFocus = true; this.TxtY.Name = "TxtY"; this.TxtY.Adjustment.PageIncrement = 10; this.TxtY.ClimbRate = 1; this.TxtY.Numeric = true; this.table1.Add(this.TxtY); Gtk.Table.TableChild w28 = ((Gtk.Table.TableChild)(this.table1[this.TxtY])); w28.TopAttach = ((uint)(2)); w28.BottomAttach = ((uint)(3)); w28.LeftAttach = ((uint)(3)); w28.RightAttach = ((uint)(4)); w28.XOptions = ((Gtk.AttachOptions)(4)); w28.YOptions = ((Gtk.AttachOptions)(4)); this.vbox1.Add(this.table1); Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.vbox1[this.table1])); w29.Position = 1; w29.Expand = false; w29.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox4 = new Gtk.HBox(); this.hbox4.Name = "hbox4"; this.hbox4.Spacing = 6; // Container child hbox4.Gtk.Box+BoxChild this.label1 = new Gtk.Label(); this.label1.Name = "label1"; this.label1.LabelProp = "#"; this.hbox4.Add(this.label1); Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.hbox4[this.label1])); w30.Position = 0; w30.Expand = false; w30.Fill = false; // Container child hbox4.Gtk.Box+BoxChild this.TxtHexa = new HollyLibrary.HRegExEntry(); this.TxtHexa.Events = ((Gdk.EventMask)(256)); this.TxtHexa.Name = "TxtHexa"; this.TxtHexa.RegularExpression = "^?[0-9A-F]{6}$"; this.TxtHexa.OkMessage = "Color hexa code is correct"; this.TxtHexa.ErrorMessage = "Error in color code !"; this.hbox4.Add(this.TxtHexa); Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.hbox4[this.TxtHexa])); w31.Position = 1; this.vbox1.Add(this.hbox4); Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox4])); w32.PackType = ((Gtk.PackType)(1)); w32.Position = 2; w32.Expand = false; w32.Fill = false; this.hbox1.Add(this.vbox1); Gtk.Box.BoxChild w33 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox1])); w33.Position = 1; this.Add(this.hbox1); if ((this.Child != null)) { this.Child.ShowAll(); } this.Hide(); this.ColorWell.Scroll += new System.EventHandler(this.OnColorWellScroll); this.Slider.Scroll += new System.EventHandler(this.OnSliderScroll); this.ChkR1.Toggled += new System.EventHandler(this.OnChkRToggled); this.TxtRed.ValueChanged += new System.EventHandler(this.OnTxtRedValueChanged); this.ChkG.Toggled += new System.EventHandler(this.OnChkGToggled); this.TxtGreen.ValueChanged += new System.EventHandler(this.OnTxtGreenValueChanged); this.CkkB.Toggled += new System.EventHandler(this.OnCkkBToggled); this.TxtBlue.ValueChanged += new System.EventHandler(this.OnTxtBlueValueChanged); this.Preview.ExposeEvent += new Gtk.ExposeEventHandler(this.OnPreviewExposeEvent); this.TxtY.ValueChanged += new System.EventHandler(this.OnTxtYValueChanged); this.TxtS.ValueChanged += new System.EventHandler(this.OnTxtSValueChanged); this.TxtM.ValueChanged += new System.EventHandler(this.OnTxtMValueChanged); this.TxtK.ValueChanged += new System.EventHandler(this.OnTxtKValueChanged); this.TxtH.ValueChanged += new System.EventHandler(this.OnTxtHValueChanged); this.TxtC.ValueChanged += new System.EventHandler(this.OnTxtCValueChanged); this.TxtB.ValueChanged += new System.EventHandler(this.OnTxtBValueChanged); this.chkS.Toggled += new System.EventHandler(this.OnChkSToggled); this.chkH.Toggled += new System.EventHandler(this.OnChkHToggled); this.chkB.Toggled += new System.EventHandler(this.OnChkBToggled); this.TxtHexa.Changed += new System.EventHandler(this.OnTxtHexaChanged); }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget LinuxGUITest.BalanceBoardInformation Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this); Gtk.UIManager w2 = new Gtk.UIManager(); Gtk.ActionGroup w3 = new Gtk.ActionGroup("Default"); this.BalanceBoardAction = new Gtk.Action("BalanceBoardAction", Mono.Unix.Catalog.GetString("BalanceBoard"), null, null); this.BalanceBoardAction.ShortLabel = Mono.Unix.Catalog.GetString("BalanceBoard"); w3.Add(this.BalanceBoardAction, null); this.DisconnectAction = new Gtk.Action("DisconnectAction", Mono.Unix.Catalog.GetString("Disconnect"), null, null); this.DisconnectAction.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect"); w3.Add(this.DisconnectAction, null); w2.InsertActionGroup(w3, 0); this.Name = "LinuxGUITest.BalanceBoardInformation"; // Container child LinuxGUITest.BalanceBoardInformation.Gtk.Container+ContainerChild this.vbox1 = new Gtk.VBox(); this.vbox1.Name = "vbox1"; this.vbox1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild w2.AddUiFromString("<ui><menubar name='menubar1'><menu action='BalanceBoardAction'><menuitem action='DisconnectAction'/></menu></menubar></ui>"); this.menubar1 = ((Gtk.MenuBar)(w2.GetWidget("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox1.Add(this.menubar1); Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); w4.Position = 0; w4.Expand = false; w4.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hseparator2 = new Gtk.HSeparator(); this.hseparator2.Name = "hseparator2"; this.vbox1.Add(this.hseparator2); Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox1[this.hseparator2])); w5.Position = 1; w5.Expand = false; w5.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox4 = new Gtk.HBox(); this.hbox4.Name = "hbox4"; this.hbox4.Spacing = 6; // Container child hbox4.Gtk.Box+BoxChild this.checkboxLed = new Gtk.CheckButton(); this.checkboxLed.CanFocus = true; this.checkboxLed.Name = "checkboxLed"; this.checkboxLed.Label = Mono.Unix.Catalog.GetString("Led"); this.checkboxLed.DrawIndicator = true; this.checkboxLed.UseUnderline = true; this.hbox4.Add(this.checkboxLed); Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox4[this.checkboxLed])); w6.Position = 0; // Container child hbox4.Gtk.Box+BoxChild this.lblButton = new Gtk.Label(); this.lblButton.Name = "lblButton"; this.lblButton.LabelProp = Mono.Unix.Catalog.GetString("Button"); this.hbox4.Add(this.lblButton); Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox4[this.lblButton])); w7.Position = 1; w7.Expand = false; w7.Fill = false; // Container child hbox4.Gtk.Box+BoxChild this.entryButton = new Gtk.Entry(); this.entryButton.CanFocus = true; this.entryButton.Name = "entryButton"; this.entryButton.IsEditable = false; this.entryButton.InvisibleChar = '●'; this.hbox4.Add(this.entryButton); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox4[this.entryButton])); w8.Position = 2; this.vbox1.Add(this.hbox4); Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox4])); w9.Position = 2; w9.Expand = false; w9.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.frame1 = new Gtk.Frame(); this.frame1.Name = "frame1"; this.frame1.ShadowType = ((Gtk.ShadowType)(0)); // Container child frame1.Gtk.Container+ContainerChild this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment.Name = "GtkAlignment"; this.GtkAlignment.LeftPadding = ((uint)(12)); // Container child GtkAlignment.Gtk.Container+ContainerChild this.vbox3 = new Gtk.VBox(); this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild this.table4 = new Gtk.Table(((uint)(2)), ((uint)(2)), false); this.table4.Name = "table4"; this.table4.RowSpacing = ((uint)(6)); this.table4.ColumnSpacing = ((uint)(6)); // Container child table4.Gtk.Table+TableChild this.entryBottomLeft = new Gtk.Entry(); this.entryBottomLeft.CanFocus = true; this.entryBottomLeft.Name = "entryBottomLeft"; this.entryBottomLeft.IsEditable = false; this.entryBottomLeft.InvisibleChar = '●'; this.table4.Add(this.entryBottomLeft); Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table4[this.entryBottomLeft])); w10.TopAttach = ((uint)(1)); w10.BottomAttach = ((uint)(2)); w10.YOptions = ((Gtk.AttachOptions)(4)); // Container child table4.Gtk.Table+TableChild this.entryBottomRight = new Gtk.Entry(); this.entryBottomRight.CanFocus = true; this.entryBottomRight.Name = "entryBottomRight"; this.entryBottomRight.IsEditable = false; this.entryBottomRight.InvisibleChar = '●'; this.table4.Add(this.entryBottomRight); Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table4[this.entryBottomRight])); w11.TopAttach = ((uint)(1)); w11.BottomAttach = ((uint)(2)); w11.LeftAttach = ((uint)(1)); w11.RightAttach = ((uint)(2)); w11.YOptions = ((Gtk.AttachOptions)(4)); // Container child table4.Gtk.Table+TableChild this.entryTopLeft = new Gtk.Entry(); this.entryTopLeft.CanFocus = true; this.entryTopLeft.Name = "entryTopLeft"; this.entryTopLeft.IsEditable = false; this.entryTopLeft.InvisibleChar = '●'; this.table4.Add(this.entryTopLeft); Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table4[this.entryTopLeft])); w12.YOptions = ((Gtk.AttachOptions)(4)); // Container child table4.Gtk.Table+TableChild this.entryTopRight = new Gtk.Entry(); this.entryTopRight.CanFocus = true; this.entryTopRight.Name = "entryTopRight"; this.entryTopRight.IsEditable = false; this.entryTopRight.InvisibleChar = '●'; this.table4.Add(this.entryTopRight); Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.table4[this.entryTopRight])); w13.LeftAttach = ((uint)(1)); w13.RightAttach = ((uint)(2)); w13.YOptions = ((Gtk.AttachOptions)(4)); this.vbox3.Add(this.table4); Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox3[this.table4])); w14.Position = 0; w14.Expand = false; w14.Fill = false; // Container child vbox3.Gtk.Box+BoxChild this.hbox3 = new Gtk.HBox(); this.hbox3.Name = "hbox3"; this.hbox3.Spacing = 6; // Container child hbox3.Gtk.Box+BoxChild this.lblTotalWeight = new Gtk.Label(); this.lblTotalWeight.Name = "lblTotalWeight"; this.lblTotalWeight.LabelProp = Mono.Unix.Catalog.GetString("Total Weight"); this.hbox3.Add(this.lblTotalWeight); Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox3[this.lblTotalWeight])); w15.Position = 0; w15.Expand = false; w15.Fill = false; // Container child hbox3.Gtk.Box+BoxChild this.entryTotalWeight = new Gtk.Entry(); this.entryTotalWeight.CanFocus = true; this.entryTotalWeight.Name = "entryTotalWeight"; this.entryTotalWeight.IsEditable = false; this.entryTotalWeight.InvisibleChar = '●'; this.hbox3.Add(this.entryTotalWeight); Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox3[this.entryTotalWeight])); w16.Position = 1; // Container child hbox3.Gtk.Box+BoxChild this.entryAverageWeight = new Gtk.Entry(); this.entryAverageWeight.CanFocus = true; this.entryAverageWeight.Name = "entryAverageWeight"; this.entryAverageWeight.IsEditable = false; this.entryAverageWeight.InvisibleChar = '●'; this.hbox3.Add(this.entryAverageWeight); Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.hbox3[this.entryAverageWeight])); w17.PackType = ((Gtk.PackType)(1)); w17.Position = 2; // Container child hbox3.Gtk.Box+BoxChild this.labelAverageWeight = new Gtk.Label(); this.labelAverageWeight.Name = "labelAverageWeight"; this.labelAverageWeight.LabelProp = Mono.Unix.Catalog.GetString("Average"); this.hbox3.Add(this.labelAverageWeight); Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.hbox3[this.labelAverageWeight])); w18.PackType = ((Gtk.PackType)(1)); w18.Position = 3; w18.Expand = false; w18.Fill = false; this.vbox3.Add(this.hbox3); Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3])); w19.Position = 1; w19.Expand = false; w19.Fill = false; this.GtkAlignment.Add(this.vbox3); this.frame1.Add(this.GtkAlignment); this.GtkLabel2 = new Gtk.Label(); this.GtkLabel2.Name = "GtkLabel2"; this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Weight Sensors</b>"); this.GtkLabel2.UseMarkup = true; this.frame1.LabelWidget = this.GtkLabel2; this.vbox1.Add(this.frame1); Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1])); w22.Position = 3; w22.Expand = false; w22.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.frame2 = new Gtk.Frame(); this.frame2.Name = "frame2"; this.frame2.ShadowType = ((Gtk.ShadowType)(0)); // Container child frame2.Gtk.Container+ContainerChild this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment1.Name = "GtkAlignment1"; this.GtkAlignment1.LeftPadding = ((uint)(12)); // Container child GtkAlignment1.Gtk.Container+ContainerChild this.drawingareaBalance = new Gtk.DrawingArea(); this.drawingareaBalance.Name = "drawingareaBalance"; this.GtkAlignment1.Add(this.drawingareaBalance); this.frame2.Add(this.GtkAlignment1); this.GtkLabel3 = new Gtk.Label(); this.GtkLabel3.Name = "GtkLabel3"; this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>Balance</b>"); this.GtkLabel3.UseMarkup = true; this.frame2.LabelWidget = this.GtkLabel3; this.vbox1.Add(this.frame2); Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2])); w25.Position = 4; // Container child vbox1.Gtk.Box+BoxChild this.hbox1 = new Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild this.btnUpdateBattery = new Gtk.Button(); this.btnUpdateBattery.CanFocus = true; this.btnUpdateBattery.Name = "btnUpdateBattery"; this.btnUpdateBattery.UseUnderline = true; this.btnUpdateBattery.Label = Mono.Unix.Catalog.GetString("Update Battery"); this.hbox1.Add(this.btnUpdateBattery); Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnUpdateBattery])); w26.Position = 0; w26.Expand = false; w26.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.progressbar1 = new Gtk.ProgressBar(); this.progressbar1.Name = "progressbar1"; this.hbox1.Add(this.progressbar1); Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.hbox1[this.progressbar1])); w27.Position = 1; this.vbox1.Add(this.hbox1); Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); w28.Position = 5; w28.Expand = false; w28.Fill = false; this.Add(this.vbox1); if ((this.Child != null)) { this.Child.ShowAll(); } w1.SetUiManager(w2); this.Show(); this.DisconnectAction.Activated += new System.EventHandler(this.OnDisconnectActionActivated); this.checkboxLed.Pressed += new System.EventHandler(this.OnCheckboxLedPressed); this.drawingareaBalance.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingareaBalanceExposeEvent); this.btnUpdateBattery.Pressed += new System.EventHandler(this.OnBtnUpdateBatteryPressed); }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget MainWindow this.Name = "MainWindow"; this.Title = Mono.Unix.Catalog.GetString("Chaotic Pendulum"); this.WindowPosition = ((Gtk.WindowPosition)(4)); // Container child MainWindow.Gtk.Container+ContainerChild this.hbox5 = new Gtk.HBox(); this.hbox5.Name = "hbox5"; this.hbox5.Spacing = 6; // Container child hbox5.Gtk.Box+BoxChild this.vbox7 = new Gtk.VBox(); this.vbox7.Name = "vbox7"; this.vbox7.Spacing = 6; // Container child vbox7.Gtk.Box+BoxChild this.frame2 = new Gtk.Frame(); this.frame2.Name = "frame2"; this.frame2.ShadowType = ((Gtk.ShadowType)(0)); // Container child frame2.Gtk.Container+ContainerChild this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment.Name = "GtkAlignment"; this.GtkAlignment.LeftPadding = ((uint)(12)); // Container child GtkAlignment.Gtk.Container+ContainerChild this.table3 = new Gtk.Table(((uint)(6)), ((uint)(2)), false); this.table3.Name = "table3"; this.table3.RowSpacing = ((uint)(6)); this.table3.ColumnSpacing = ((uint)(6)); // Container child table3.Gtk.Table+TableChild this.altitude1 = new Gtk.SpinButton(0.01, 10, 0.1); this.altitude1.CanFocus = true; this.altitude1.Name = "altitude1"; this.altitude1.Adjustment.PageIncrement = 1; this.altitude1.ClimbRate = 1; this.altitude1.Digits = ((uint)(2)); this.altitude1.Numeric = true; this.altitude1.Value = 0.2; this.table3.Add(this.altitude1); Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table3[this.altitude1])); w1.TopAttach = ((uint)(3)); w1.BottomAttach = ((uint)(4)); w1.LeftAttach = ((uint)(1)); w1.RightAttach = ((uint)(2)); w1.XOptions = ((Gtk.AttachOptions)(4)); w1.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.attractors = new Gtk.SpinButton(1, 23, 1); this.attractors.CanFocus = true; this.attractors.Name = "attractors"; this.attractors.Adjustment.PageIncrement = 5; this.attractors.ClimbRate = 1; this.attractors.Numeric = true; this.attractors.Value = 5; this.table3.Add(this.attractors); Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table3[this.attractors])); w2.LeftAttach = ((uint)(1)); w2.RightAttach = ((uint)(2)); w2.XOptions = ((Gtk.AttachOptions)(4)); w2.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.charge = new Gtk.SpinButton(0, 10, 0.1); this.charge.CanFocus = true; this.charge.Name = "charge"; this.charge.Adjustment.PageIncrement = 1; this.charge.ClimbRate = 1; this.charge.Digits = ((uint)(2)); this.charge.Numeric = true; this.charge.Value = 1; this.table3.Add(this.charge); Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table3[this.charge])); w3.TopAttach = ((uint)(1)); w3.BottomAttach = ((uint)(2)); w3.LeftAttach = ((uint)(1)); w3.RightAttach = ((uint)(2)); w3.XOptions = ((Gtk.AttachOptions)(4)); w3.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.drag = new Gtk.SpinButton(0, 10, 0.1); this.drag.CanFocus = true; this.drag.Name = "drag"; this.drag.Adjustment.PageIncrement = 1; this.drag.ClimbRate = 1; this.drag.Digits = ((uint)(2)); this.drag.Numeric = true; this.drag.Value = 0.5; this.table3.Add(this.drag); Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table3[this.drag])); w4.TopAttach = ((uint)(4)); w4.BottomAttach = ((uint)(5)); w4.LeftAttach = ((uint)(1)); w4.RightAttach = ((uint)(2)); w4.XOptions = ((Gtk.AttachOptions)(4)); w4.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.label10 = new Gtk.Label(); this.label10.Name = "label10"; this.label10.Xalign = 0F; this.label10.LabelProp = Mono.Unix.Catalog.GetString("Mass"); this.table3.Add(this.label10); Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table3[this.label10])); w5.TopAttach = ((uint)(2)); w5.BottomAttach = ((uint)(3)); w5.XOptions = ((Gtk.AttachOptions)(4)); w5.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.label11 = new Gtk.Label(); this.label11.Name = "label11"; this.label11.Xalign = 0F; this.label11.LabelProp = Mono.Unix.Catalog.GetString("Altitude"); this.table3.Add(this.label11); Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table3[this.label11])); w6.TopAttach = ((uint)(3)); w6.BottomAttach = ((uint)(4)); w6.XOptions = ((Gtk.AttachOptions)(4)); w6.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.label12 = new Gtk.Label(); this.label12.Name = "label12"; this.label12.Xalign = 0F; this.label12.LabelProp = Mono.Unix.Catalog.GetString("Drag"); this.table3.Add(this.label12); Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table3[this.label12])); w7.TopAttach = ((uint)(4)); w7.BottomAttach = ((uint)(5)); w7.XOptions = ((Gtk.AttachOptions)(4)); w7.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.label7 = new Gtk.Label(); this.label7.Name = "label7"; this.label7.Xalign = 0F; this.label7.LabelProp = Mono.Unix.Catalog.GetString("Attractors"); this.table3.Add(this.label7); Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table3[this.label7])); w8.XOptions = ((Gtk.AttachOptions)(4)); w8.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.label8 = new Gtk.Label(); this.label8.Name = "label8"; this.label8.Xalign = 0F; this.label8.LabelProp = Mono.Unix.Catalog.GetString("Step"); this.table3.Add(this.label8); Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table3[this.label8])); w9.TopAttach = ((uint)(5)); w9.BottomAttach = ((uint)(6)); w9.XOptions = ((Gtk.AttachOptions)(4)); w9.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.label9 = new Gtk.Label(); this.label9.Name = "label9"; this.label9.Xalign = 0F; this.label9.LabelProp = Mono.Unix.Catalog.GetString("Charge"); this.table3.Add(this.label9); Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table3[this.label9])); w10.TopAttach = ((uint)(1)); w10.BottomAttach = ((uint)(2)); w10.XOptions = ((Gtk.AttachOptions)(4)); w10.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.mass = new Gtk.SpinButton(0.01, 10, 0.1); this.mass.CanFocus = true; this.mass.Name = "mass"; this.mass.Adjustment.PageIncrement = 1; this.mass.ClimbRate = 1; this.mass.Digits = ((uint)(2)); this.mass.Numeric = true; this.mass.Value = 2; this.table3.Add(this.mass); Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table3[this.mass])); w11.TopAttach = ((uint)(2)); w11.BottomAttach = ((uint)(3)); w11.LeftAttach = ((uint)(1)); w11.RightAttach = ((uint)(2)); w11.XOptions = ((Gtk.AttachOptions)(4)); w11.YOptions = ((Gtk.AttachOptions)(4)); // Container child table3.Gtk.Table+TableChild this.step = new Gtk.SpinButton(0.01, 10, 0.01); this.step.CanFocus = true; this.step.Name = "step"; this.step.Adjustment.PageIncrement = 0.1; this.step.ClimbRate = 1; this.step.Digits = ((uint)(2)); this.step.Numeric = true; this.step.Value = 0.1; this.table3.Add(this.step); Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table3[this.step])); w12.TopAttach = ((uint)(5)); w12.BottomAttach = ((uint)(6)); w12.LeftAttach = ((uint)(1)); w12.RightAttach = ((uint)(2)); w12.XOptions = ((Gtk.AttachOptions)(4)); w12.YOptions = ((Gtk.AttachOptions)(4)); this.GtkAlignment.Add(this.table3); this.frame2.Add(this.GtkAlignment); this.GtkLabel1 = new Gtk.Label(); this.GtkLabel1.Name = "GtkLabel1"; this.GtkLabel1.LabelProp = Mono.Unix.Catalog.GetString("<b>Parameters</b>"); this.GtkLabel1.UseMarkup = true; this.frame2.LabelWidget = this.GtkLabel1; this.vbox7.Add(this.frame2); Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox7[this.frame2])); w15.Position = 0; w15.Expand = false; w15.Fill = false; w15.Padding = ((uint)(5)); // Container child vbox7.Gtk.Box+BoxChild this.hbuttonbox2 = new Gtk.HButtonBox(); this.hbuttonbox2.Name = "hbuttonbox2"; this.vbox7.Add(this.hbuttonbox2); Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.vbox7[this.hbuttonbox2])); w16.Position = 1; w16.Expand = false; w16.Fill = false; // Container child vbox7.Gtk.Box+BoxChild this.hbox3 = new Gtk.HBox(); this.hbox3.Name = "hbox3"; this.hbox3.Homogeneous = true; this.hbox3.Spacing = 6; // Container child hbox3.Gtk.Box+BoxChild this.stop = new Gtk.Button(); this.stop.CanFocus = true; this.stop.Name = "stop"; this.stop.UseUnderline = true; // Container child stop.Gtk.Container+ContainerChild Gtk.Alignment w17 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild Gtk.HBox w18 = new Gtk.HBox(); w18.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Image w19 = new Gtk.Image(); w19.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-stop", Gtk.IconSize.Menu, 16); w18.Add(w19); // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Label w21 = new Gtk.Label(); w21.LabelProp = Mono.Unix.Catalog.GetString("Stop"); w21.UseUnderline = true; w18.Add(w21); w17.Add(w18); this.stop.Add(w17); this.hbox3.Add(this.stop); Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.hbox3[this.stop])); w25.Position = 0; // Container child hbox3.Gtk.Box+BoxChild this.clear1 = new Gtk.Button(); this.clear1.CanFocus = true; this.clear1.Name = "clear1"; this.clear1.UseUnderline = true; // Container child clear1.Gtk.Container+ContainerChild Gtk.Alignment w26 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild Gtk.HBox w27 = new Gtk.HBox(); w27.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Image w28 = new Gtk.Image(); w28.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.Menu, 16); w27.Add(w28); // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Label w30 = new Gtk.Label(); w30.LabelProp = Mono.Unix.Catalog.GetString("Clear"); w30.UseUnderline = true; w27.Add(w30); w26.Add(w27); this.clear1.Add(w26); this.hbox3.Add(this.clear1); Gtk.Box.BoxChild w34 = ((Gtk.Box.BoxChild)(this.hbox3[this.clear1])); w34.Position = 1; this.vbox7.Add(this.hbox3); Gtk.Box.BoxChild w35 = ((Gtk.Box.BoxChild)(this.vbox7[this.hbox3])); w35.Position = 2; w35.Expand = false; w35.Fill = false; // Container child vbox7.Gtk.Box+BoxChild this.hbox2 = new Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild this.simulateAll = new Gtk.Button(); this.simulateAll.CanFocus = true; this.simulateAll.Name = "simulateAll"; this.simulateAll.UseUnderline = true; // Container child simulateAll.Gtk.Container+ContainerChild Gtk.Alignment w36 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild Gtk.HBox w37 = new Gtk.HBox(); w37.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Image w38 = new Gtk.Image(); w38.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-execute", Gtk.IconSize.Menu, 16); w37.Add(w38); // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Label w40 = new Gtk.Label(); w40.LabelProp = Mono.Unix.Catalog.GetString("Simulate All"); w40.UseUnderline = true; w37.Add(w40); w36.Add(w37); this.simulateAll.Add(w36); this.hbox2.Add(this.simulateAll); Gtk.Box.BoxChild w44 = ((Gtk.Box.BoxChild)(this.hbox2[this.simulateAll])); w44.Position = 0; w44.Expand = false; w44.Fill = false; // Container child hbox2.Gtk.Box+BoxChild this.progressbar2 = new Gtk.ProgressBar(); this.progressbar2.WidthRequest = 30; this.progressbar2.Name = "progressbar2"; this.progressbar2.Text = ""; this.hbox2.Add(this.progressbar2); Gtk.Box.BoxChild w45 = ((Gtk.Box.BoxChild)(this.hbox2[this.progressbar2])); w45.Position = 1; this.vbox7.Add(this.hbox2); Gtk.Box.BoxChild w46 = ((Gtk.Box.BoxChild)(this.vbox7[this.hbox2])); w46.Position = 3; w46.Expand = false; w46.Fill = false; this.hbox5.Add(this.vbox7); Gtk.Box.BoxChild w47 = ((Gtk.Box.BoxChild)(this.hbox5[this.vbox7])); w47.Position = 0; w47.Expand = false; w47.Fill = false; // Container child hbox5.Gtk.Box+BoxChild this.eventBox = new Gtk.EventBox(); this.eventBox.Name = "eventBox"; // Container child eventBox.Gtk.Container+ContainerChild this.drawingArea = new Gtk.DrawingArea(); this.drawingArea.WidthRequest = 300; this.drawingArea.HeightRequest = 300; this.drawingArea.Name = "drawingArea"; this.eventBox.Add(this.drawingArea); this.hbox5.Add(this.eventBox); Gtk.Box.BoxChild w49 = ((Gtk.Box.BoxChild)(this.hbox5[this.eventBox])); w49.Position = 1; this.Add(this.hbox5); if ((this.Child != null)) { this.Child.ShowAll(); } this.DefaultWidth = 456; this.DefaultHeight = 308; this.Show(); this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent); this.step.ValueChanged += new System.EventHandler(this.OnParameterValueChanged); this.mass.ValueChanged += new System.EventHandler(this.OnParameterValueChanged); this.drag.ValueChanged += new System.EventHandler(this.OnParameterValueChanged); this.charge.ValueChanged += new System.EventHandler(this.OnParameterValueChanged); this.attractors.ValueChanged += new System.EventHandler(this.OnAttractorsValueChanged); this.altitude1.ValueChanged += new System.EventHandler(this.OnParameterValueChanged); this.stop.Clicked += new System.EventHandler(this.OnStopClicked); this.clear1.Clicked += new System.EventHandler(this.OnClearClicked); this.eventBox.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(this.OnEventBoxButtonReleaseEvent); this.drawingArea.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingAreaExposeEvent); this.drawingArea.ConfigureEvent += new Gtk.ConfigureEventHandler(this.OnDrawingAreaConfigureEvent); }
protected virtual void Build() { Stetic.Gui.Initialize(); // Widget OpenGridServices.Manager.MainWindow Gtk.UIManager w1 = new Gtk.UIManager(); Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default"); this.Grid = new Gtk.Action("Grid", Mono.Unix.Catalog.GetString("Grid"), null, null); this.Grid.HideIfEmpty = false; this.Grid.ShortLabel = Mono.Unix.Catalog.GetString("Grid"); w2.Add(this.Grid, "<Alt><Mod2>g"); this.User = new Gtk.Action("User", Mono.Unix.Catalog.GetString("User"), null, null); this.User.HideIfEmpty = false; this.User.ShortLabel = Mono.Unix.Catalog.GetString("User"); w2.Add(this.User, null); this.Asset = new Gtk.Action("Asset", Mono.Unix.Catalog.GetString("Asset"), null, null); this.Asset.HideIfEmpty = false; this.Asset.ShortLabel = Mono.Unix.Catalog.GetString("Asset"); w2.Add(this.Asset, null); this.Region = new Gtk.Action("Region", Mono.Unix.Catalog.GetString("Region"), null, null); this.Region.ShortLabel = Mono.Unix.Catalog.GetString("Region"); w2.Add(this.Region, null); this.Services = new Gtk.Action("Services", Mono.Unix.Catalog.GetString("Services"), null, null); this.Services.ShortLabel = Mono.Unix.Catalog.GetString("Services"); w2.Add(this.Services, null); this.ConnectToGridserver = new Gtk.Action("ConnectToGridserver", Mono.Unix.Catalog.GetString("Connect to gridserver..."), null, "gtk-connect"); this.ConnectToGridserver.HideIfEmpty = false; this.ConnectToGridserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to gridserver"); w2.Add(this.ConnectToGridserver, null); this.RestartWholeGrid = new Gtk.Action("RestartWholeGrid", Mono.Unix.Catalog.GetString("Restart whole grid"), null, "gtk-refresh"); this.RestartWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Restart whole grid"); w2.Add(this.RestartWholeGrid, null); this.ShutdownWholeGrid = new Gtk.Action("ShutdownWholeGrid", Mono.Unix.Catalog.GetString("Shutdown whole grid"), null, "gtk-stop"); this.ShutdownWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown whole grid"); w2.Add(this.ShutdownWholeGrid, null); this.ExitGridManager = new Gtk.Action("ExitGridManager", Mono.Unix.Catalog.GetString("Exit grid manager"), null, "gtk-close"); this.ExitGridManager.ShortLabel = Mono.Unix.Catalog.GetString("Exit grid manager"); w2.Add(this.ExitGridManager, null); this.ConnectToUserserver = new Gtk.Action("ConnectToUserserver", Mono.Unix.Catalog.GetString("Connect to userserver"), null, "gtk-connect"); this.ConnectToUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to userserver"); w2.Add(this.ConnectToUserserver, null); this.AccountManagment = new Gtk.Action("AccountManagment", Mono.Unix.Catalog.GetString("Account managment"), null, "gtk-properties"); this.AccountManagment.ShortLabel = Mono.Unix.Catalog.GetString("Account managment"); w2.Add(this.AccountManagment, null); this.GlobalNotice = new Gtk.Action("GlobalNotice", Mono.Unix.Catalog.GetString("Global notice"), null, "gtk-network"); this.GlobalNotice.ShortLabel = Mono.Unix.Catalog.GetString("Global notice"); w2.Add(this.GlobalNotice, null); this.DisableAllLogins = new Gtk.Action("DisableAllLogins", Mono.Unix.Catalog.GetString("Disable all logins"), null, "gtk-no"); this.DisableAllLogins.ShortLabel = Mono.Unix.Catalog.GetString("Disable all logins"); w2.Add(this.DisableAllLogins, null); this.DisableNonGodUsersOnly = new Gtk.Action("DisableNonGodUsersOnly", Mono.Unix.Catalog.GetString("Disable non-god users only"), null, "gtk-no"); this.DisableNonGodUsersOnly.ShortLabel = Mono.Unix.Catalog.GetString("Disable non-god users only"); w2.Add(this.DisableNonGodUsersOnly, null); this.ShutdownUserServer = new Gtk.Action("ShutdownUserServer", Mono.Unix.Catalog.GetString("Shutdown user server"), null, "gtk-stop"); this.ShutdownUserServer.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown user server"); w2.Add(this.ShutdownUserServer, null); this.ShutdownGridserverOnly = new Gtk.Action("ShutdownGridserverOnly", Mono.Unix.Catalog.GetString("Shutdown gridserver only"), null, "gtk-stop"); this.ShutdownGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown gridserver only"); w2.Add(this.ShutdownGridserverOnly, null); this.RestartGridserverOnly = new Gtk.Action("RestartGridserverOnly", Mono.Unix.Catalog.GetString("Restart gridserver only"), null, "gtk-refresh"); this.RestartGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Restart gridserver only"); w2.Add(this.RestartGridserverOnly, null); this.DefaultLocalGridUserserver = new Gtk.Action("DefaultLocalGridUserserver", Mono.Unix.Catalog.GetString("Default local grid userserver"), null, null); this.DefaultLocalGridUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Default local grid userserver"); w2.Add(this.DefaultLocalGridUserserver, null); this.CustomUserserver = new Gtk.Action("CustomUserserver", Mono.Unix.Catalog.GetString("Custom userserver..."), null, null); this.CustomUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Custom userserver"); w2.Add(this.CustomUserserver, null); this.RemoteGridDefaultUserserver = new Gtk.Action("RemoteGridDefaultUserserver", Mono.Unix.Catalog.GetString("Remote grid default userserver..."), null, null); this.RemoteGridDefaultUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Remote grid default userserver"); w2.Add(this.RemoteGridDefaultUserserver, null); this.DisconnectFromGridServer = new Gtk.Action("DisconnectFromGridServer", Mono.Unix.Catalog.GetString("Disconnect from grid server"), null, "gtk-disconnect"); this.DisconnectFromGridServer.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect from grid server"); this.DisconnectFromGridServer.Visible = false; w2.Add(this.DisconnectFromGridServer, null); this.UploadAsset = new Gtk.Action("UploadAsset", Mono.Unix.Catalog.GetString("Upload asset"), null, null); this.UploadAsset.ShortLabel = Mono.Unix.Catalog.GetString("Upload asset"); w2.Add(this.UploadAsset, null); this.AssetManagement = new Gtk.Action("AssetManagement", Mono.Unix.Catalog.GetString("Asset management"), null, null); this.AssetManagement.ShortLabel = Mono.Unix.Catalog.GetString("Asset management"); w2.Add(this.AssetManagement, null); this.ConnectToAssetServer = new Gtk.Action("ConnectToAssetServer", Mono.Unix.Catalog.GetString("Connect to asset server"), null, null); this.ConnectToAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Connect to asset server"); w2.Add(this.ConnectToAssetServer, null); this.ConnectToDefaultAssetServerForGrid = new Gtk.Action("ConnectToDefaultAssetServerForGrid", Mono.Unix.Catalog.GetString("Connect to default asset server for grid"), null, null); this.ConnectToDefaultAssetServerForGrid.ShortLabel = Mono.Unix.Catalog.GetString("Connect to default asset server for grid"); w2.Add(this.ConnectToDefaultAssetServerForGrid, null); this.DefaultForLocalGrid = new Gtk.Action("DefaultForLocalGrid", Mono.Unix.Catalog.GetString("Default for local grid"), null, null); this.DefaultForLocalGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for local grid"); w2.Add(this.DefaultForLocalGrid, null); this.DefaultForRemoteGrid = new Gtk.Action("DefaultForRemoteGrid", Mono.Unix.Catalog.GetString("Default for remote grid..."), null, null); this.DefaultForRemoteGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for remote grid..."); w2.Add(this.DefaultForRemoteGrid, null); this.CustomAssetServer = new Gtk.Action("CustomAssetServer", Mono.Unix.Catalog.GetString("Custom asset server..."), null, null); this.CustomAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Custom asset server..."); w2.Add(this.CustomAssetServer, null); w1.InsertActionGroup(w2, 0); this.AddAccelGroup(w1.AccelGroup); this.WidthRequest = 800; this.HeightRequest = 600; this.Name = "OpenGridServices.Manager.MainWindow"; this.Title = Mono.Unix.Catalog.GetString("Open Grid Services Manager"); this.Icon = Gtk.IconTheme.Default.LoadIcon("gtk-network", 48, 0); // Container child OpenGridServices.Manager.MainWindow.Gtk.Container+ContainerChild this.vbox1 = new Gtk.VBox(); this.vbox1.Name = "vbox1"; // Container child vbox1.Gtk.Box+BoxChild w1.AddUiFromString("<ui><menubar name='menubar2'><menu action='Grid'><menuitem action='ConnectToGridserver'/><menuitem action='DisconnectFromGridServer'/><separator/><menuitem action='RestartWholeGrid'/><menuitem action='RestartGridserverOnly'/><separator/><menuitem action='ShutdownWholeGrid'/><menuitem action='ShutdownGridserverOnly'/><separator/><menuitem action='ExitGridManager'/></menu><menu action='User'><menu action='ConnectToUserserver'><menuitem action='DefaultLocalGridUserserver'/><menuitem action='CustomUserserver'/><menuitem action='RemoteGridDefaultUserserver'/></menu><separator/><menuitem action='AccountManagment'/><menuitem action='GlobalNotice'/><separator/><menuitem action='DisableAllLogins'/><menuitem action='DisableNonGodUsersOnly'/><separator/><menuitem action='ShutdownUserServer'/></menu><menu action='Asset'><menuitem action='UploadAsset'/><menuitem action='AssetManagement'/><menu action='ConnectToAssetServer'><menuitem action='DefaultForLocalGrid'/><menuitem action='DefaultForRemoteGrid'/><menuitem action='CustomAssetServer'/></menu></menu><menu action='Region'/><menu action='Services'/></menubar></ui>"); this.menubar2 = ((Gtk.MenuBar)(w1.GetWidget("/menubar2"))); this.menubar2.HeightRequest = 25; this.menubar2.Name = "menubar2"; this.vbox1.Add(this.menubar2); Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar2])); w3.Position = 0; w3.Expand = false; w3.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox1 = new Gtk.HBox(); this.hbox1.Name = "hbox1"; // Container child hbox1.Gtk.Box+BoxChild this.scrolledwindow1 = new Gtk.ScrolledWindow(); this.scrolledwindow1.CanFocus = true; this.scrolledwindow1.Name = "scrolledwindow1"; this.scrolledwindow1.VscrollbarPolicy = ((Gtk.PolicyType)(1)); this.scrolledwindow1.HscrollbarPolicy = ((Gtk.PolicyType)(1)); // Container child scrolledwindow1.Gtk.Container+ContainerChild Gtk.Viewport w4 = new Gtk.Viewport(); w4.Name = "GtkViewport"; w4.ShadowType = ((Gtk.ShadowType)(0)); // Container child GtkViewport.Gtk.Container+ContainerChild this.drawingarea1 = new Gtk.DrawingArea(); this.drawingarea1.Name = "drawingarea1"; w4.Add(this.drawingarea1); this.scrolledwindow1.Add(w4); this.hbox1.Add(this.scrolledwindow1); Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow1])); w7.Position = 1; // Container child hbox1.Gtk.Box+BoxChild this.treeview1 = new Gtk.TreeView(); this.treeview1.CanFocus = true; this.treeview1.Name = "treeview1"; this.hbox1.Add(this.treeview1); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox1[this.treeview1])); w8.Position = 2; this.vbox1.Add(this.hbox1); Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); w9.Position = 1; // Container child vbox1.Gtk.Box+BoxChild this.statusbar1 = new Gtk.Statusbar(); this.statusbar1.Name = "statusbar1"; this.statusbar1.Spacing = 5; this.vbox1.Add(this.statusbar1); Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); w10.PackType = ((Gtk.PackType)(1)); w10.Position = 2; w10.Expand = false; w10.Fill = false; this.Add(this.vbox1); if (this.Child != null) { this.Child.ShowAll(); } this.DefaultWidth = 800; this.DefaultHeight = 800; this.Show(); this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent); this.ConnectToGridserver.Activated += new System.EventHandler(this.ConnectToGridServerMenu); this.ExitGridManager.Activated += new System.EventHandler(this.QuitMenu); this.ShutdownGridserverOnly.Activated += new System.EventHandler(this.ShutdownGridserverMenu); this.RestartGridserverOnly.Activated += new System.EventHandler(this.RestartGridserverMenu); this.DisconnectFromGridServer.Activated += new System.EventHandler(this.DisconnectGridServerMenu); }
private void Rebuild(Gtk.Table table, uint[][][] positions, GedcomIndividualRecord activePerson, GedcomFamilyLink[] lst) { foreach (Gtk.Widget child in table.Children) { child.Destroy(); } table.Resize(1,1); uint xmax = 0; uint ymax = 0; for (int i = 0; i < positions.Length; i ++) { uint x = positions[i][0][0] + 1; uint y = positions[i][0][1] + 1; uint w = positions[i][0][2]; uint h = positions[i][0][3]; GedcomFamilyLink famLink = (GedcomFamilyLink)lst[i]; if (famLink == null) { PedigreeBox pw = new PedigreeBox(null, 0, null); if (i > 0 && lst[((i+1)/2)-1] != null) { GedcomFamilyLink missingFamLink = (GedcomFamilyLink)lst[((i+1)/2)-1]; // missing parent button pw.ForceMouseOver = true; } // FIXME: both conditions do the same thing, double checking // the gramps code it doesn't appear to be a mistake in porting if (positions[i][0][2] > 1) { table.Attach(pw,x, x+w, y, y+h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0); } else { table.Attach(pw,x, x+w, y, y+h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0); } xmax = (uint)Math.Max(xmax, x + w); ymax = (uint)Math.Max(ymax, y + h); } else { GedcomIndividualRecord indi = (GedcomIndividualRecord)_database[famLink.Indi]; if (_showImages && i < ((positions.Length - 1) / 2) && positions[i][0][3] > 1) { } PedigreeBox pw = new PedigreeBox(indi, positions[i][0][3], null); pw.SelectIndividual += PedigreeBox_SelectIndividual; if (positions[i][0][3] < 7) { pw.TooltipMarkup = pw.FormatPerson(11, true); } if (positions[i][0][2] > 1) { table.Attach(pw, x, x+w, y, y+h, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, 0); } else { table.Attach(pw, x, x+w, y, y+h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0); } xmax = (uint)Math.Max(xmax, x + w); ymax = (uint)Math.Max(ymax, y + h); } // connection lines if (positions[i].Length > 1) { // separate boxes for father and mother x = positions[i][1][0] + 1; y = positions[i][1][1] + 1; w = 1; h = positions[i][1][2]; Gtk.DrawingArea line = new Gtk.DrawingArea(); line.ExposeEvent += Line_Expose; bool rela = false; if (famLink != null && (famLink.Pedigree == PedegreeLinkageType.Birth || famLink.Pedigree == PedegreeLinkageType.Unknown)) { line.AddEvents((int)Gdk.EventMask.ButtonPressMask); rela = true; } Utility.Pair<int, bool> lineData = new Pair<int,bool>(); lineData.First = i * 2 + 1; lineData.Second = rela; _lines[line] = lineData; table.Attach(line, x, x + w, y, y + h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0); xmax = (uint)Math.Max(xmax, x + w); ymax = (uint)Math.Max(ymax, y + h); x = positions[i][2][0] + 1; y = positions[i][2][1] + 1; w = 1; h = positions[i][2][2]; line = new Gtk.DrawingArea(); line.ExposeEvent += Line_Expose; rela = false; if (famLink != null && (famLink.Pedigree == PedegreeLinkageType.Birth || famLink.Pedigree == PedegreeLinkageType.Unknown)) { line.AddEvents((int)Gdk.EventMask.ButtonPressMask); rela = true; } lineData = new Pair<int,bool>(); lineData.First = i * 2 + 2; lineData.Second = rela; _lines[line] = lineData; table.Attach(line, x, x + w, y, y + h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0); xmax = (uint)Math.Max(xmax, x + w); ymax = (uint)Math.Max(ymax, y + h); } // marriage data if (_showMarriageData && positions[i].Length > 3) { string text = string.Empty; if (famLink != null && (famLink.Pedigree == PedegreeLinkageType.Birth || famLink.Pedigree == PedegreeLinkageType.Unknown)) { text = "foo"; } Gtk.Label label = new Gtk.Label(text); label.Justify = Gtk.Justification.Left; label.LineWrap = true; label.SetAlignment(0.1F, 0.5F); x = positions[i][3][0] + 1; y = positions[i][3][1] + 1; w = positions[i][3][2]; h = positions[i][3][3]; table.Attach(label, x, x + w, y, y + h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0); } } // nav arrows if (lst[0] != null) { Gtk.Button arrowButton = new Gtk.Button(); arrowButton.Add(new Gtk.Arrow(Gtk.ArrowType.Left, Gtk.ShadowType.In)); arrowButton.Sensitive = (_dummyFam.Children.Count > 0); arrowButton.Clicked += ArrowButton_Click; if (arrowButton.Sensitive) { arrowButton.TooltipText = "Jump to child..."; } uint ymid = (uint)Math.Floor(ymax / 2.0F); table.Attach(arrowButton, 0, 1, ymid, ymid + 1, 0, 0, 0, 0); // father arrowButton = new Gtk.Button(); arrowButton.Add(new Gtk.Arrow(Gtk.ArrowType.Right, Gtk.ShadowType.In)); arrowButton.Sensitive = (lst[1] != null); arrowButton.Clicked += FatherButton_Click; if (arrowButton.Sensitive) { arrowButton.TooltipText = "Jump to father"; } ymid = (uint)Math.Floor(ymax / 4.0F); table.Attach(arrowButton, xmax, xmax + 1, ymid - 1, ymid + 2, 0, 0, 0, 0); // mother arrowButton = new Gtk.Button(); arrowButton.Add(new Gtk.Arrow(Gtk.ArrowType.Right, Gtk.ShadowType.In)); arrowButton.Sensitive = (lst[2] != null); arrowButton.Clicked += MotherButton_Click; if (arrowButton.Sensitive) { arrowButton.TooltipText = "Jump to mother"; } ymid = (uint)Math.Floor(ymax / 4.0F * 3); table.Attach(arrowButton, xmax, xmax + 1, ymid - 1, ymid + 2, 0, 0, 0, 0); // dummy widgets to allow pedigree to be centred Gtk.Label l = new Gtk.Label(string.Empty); table.Attach(l, 0, 1, 0, 1, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, 0); l = new Gtk.Label(string.Empty); table.Attach(l, xmax, xmax + 1, ymax, ymax + 1, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, 0); table.ShowAll(); } }
public static void Build(object obj, string id) { System.Collections.Hashtable bindings = new System.Collections.Hashtable(); if ((id == "sink.help")) { Gtk.Dialog cobj = ((Gtk.Dialog)(obj)); // Widget sink.help cobj.Title = "help"; cobj.WindowPosition = ((Gtk.WindowPosition)(4)); cobj.HasSeparator = false; cobj.Events = ((Gdk.EventMask)(256)); cobj.Name = "sink.help"; // Internal child sink.help.VBox Gtk.VBox w1 = cobj.VBox; w1.BorderWidth = ((uint)(2)); w1.Events = ((Gdk.EventMask)(256)); w1.Name = "dialog_VBox"; // Container child dialog_VBox.Gtk.Box+BoxChild Gtk.VBox w2 = new Gtk.VBox(); w2.Events = ((Gdk.EventMask)(0)); w2.Name = "vbox1"; // Container child vbox1.Gtk.Box+BoxChild Gtk.Alignment w3 = new Gtk.Alignment(0.5F, 0.5F, 0F, 1F); w3.TopPadding = ((uint)(15)); w3.BottomPadding = ((uint)(15)); w3.Events = ((Gdk.EventMask)(0)); w3.Name = "alignment1"; // Container child alignment1.Gtk.Container+ContainerChild Gtk.HBox w4 = new Gtk.HBox(); w4.Spacing = 15; w4.Events = ((Gdk.EventMask)(0)); w4.Name = "hbox3"; // Container child hbox3.Gtk.Box+BoxChild Gtk.Image w5 = new Gtk.Image(); w5.Pixbuf = new Gdk.Pixbuf("sink.bmp"); w5.Events = ((Gdk.EventMask)(0)); w5.Name = "image5"; bindings["image5"] = w5; w4.Add(w5); Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w4[w5])); w6.Position = 0; w6.Expand = false; w6.Fill = false; // Container child hbox3.Gtk.Box+BoxChild Gtk.Label w7 = new Gtk.Label(); w7.LabelProp = "SINK"; w7.UseUnderline = true; w7.Events = ((Gdk.EventMask)(0)); w7.Name = "label4"; bindings["label4"] = w7; w4.Add(w7); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w4[w7])); w8.Position = 1; w8.Expand = false; w8.Fill = false; bindings["hbox3"] = w4; w3.Add(w4); bindings["alignment1"] = w3; w2.Add(w3); Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w2[w3])); w10.Position = 0; w10.Expand = false; w10.Fill = false; // Container child vbox1.Gtk.Box+BoxChild Gtk.ScrolledWindow w11 = new Gtk.ScrolledWindow(); w11.VscrollbarPolicy = ((Gtk.PolicyType)(1)); w11.HscrollbarPolicy = ((Gtk.PolicyType)(2)); w11.CanFocus = true; w11.Events = ((Gdk.EventMask)(0)); w11.Name = "scrolledwindow1"; // Container child scrolledwindow1.Gtk.Container+ContainerChild Gtk.Viewport w12 = new Gtk.Viewport(); w12.ShadowType = ((Gtk.ShadowType)(0)); w12.Events = ((Gdk.EventMask)(0)); w12.Name = "GtkViewport"; // Container child GtkViewport.Gtk.Container+ContainerChild Gtk.ScrolledWindow w13 = new Gtk.ScrolledWindow(); w13.VscrollbarPolicy = ((Gtk.PolicyType)(1)); w13.HscrollbarPolicy = ((Gtk.PolicyType)(1)); w13.CanFocus = true; w13.Events = ((Gdk.EventMask)(0)); w13.Name = "scrolledwindow2"; // Container child scrolledwindow2.Gtk.Container+ContainerChild Gtk.TextView w14 = new Gtk.TextView(); w14.Buffer.Text = "Introduction\r\n\r\nCellular automaton consist of an infinite number of cells, which have a finite number of states. These states change depending on the state of their neighbours. Each cell has the same rule for updating.\r\n\r\nSink\r\n\r\nIn this program, the cells can have two states: 0 or 1. This state depends on the state of their neighbours and the place where the cell is. \r\n\r\nThese are the default update rules:\r\n\r\n. If both the cell and path are 1, and the cell has eight neighbours, the cell becomes 0. \r\n. If the cell is 1, path is 0 and the cell has more than three neighbours, the cell changes to 0.\r\n. If both the cell and path are 0, and the cell has more than three neighbours, the cell changes to 1.\r\n. If the cell is 0, path is 1 and the cell has more than two neighbours, the cell becomes 1.\r\n\r\nThe user can change all the parameters of the program in the configuration menu.\r\n"; w14.WrapMode = ((Gtk.WrapMode)(2)); w14.Editable = false; w14.CanFocus = true; w14.Events = ((Gdk.EventMask)(0)); w14.Name = "textview1"; bindings["textview1"] = w14; w13.Add(w14); bindings["scrolledwindow2"] = w13; w12.Add(w13); bindings["GtkViewport"] = w12; w11.Add(w12); bindings["scrolledwindow1"] = w11; w2.Add(w11); Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(w2[w11])); w18.Position = 1; bindings["vbox1"] = w2; w1.Add(w2); Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(w1[w2])); w19.Position = 0; bindings["dialog_VBox"] = w1; // Internal child sink.help.ActionArea Gtk.HButtonBox w20 = cobj.ActionArea; w20.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); w20.Spacing = 6; w20.BorderWidth = ((uint)(5)); w20.Events = ((Gdk.EventMask)(256)); w20.Name = "sink.help_ActionArea"; // Container child sink.help_ActionArea.Gtk.ButtonBox+ButtonBoxChild Gtk.Button w21 = new Gtk.Button(); w21.CanFocus = true; w21.Events = ((Gdk.EventMask)(0)); w21.Name = "button3"; w21.CanDefault = true; w21.Label = "OK"; bindings["button3"] = w21; cobj.AddActionWidget(w21, 0); Gtk.ButtonBox.ButtonBoxChild w22 = ((Gtk.ButtonBox.ButtonBoxChild)(w20[w21])); w22.Expand = false; w22.Fill = false; bindings["sink.help_ActionArea"] = w20; cobj.DefaultWidth = 400; cobj.DefaultHeight = 449; bindings["sink.help"] = cobj; w5.Show(); w7.Show(); w4.Show(); w3.Show(); w14.Show(); w13.Show(); w12.Show(); w11.Show(); w2.Show(); w1.Show(); w21.Show(); w20.Show(); cobj.Show(); w21.Released += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnButton3Released"))); } else { if ((id == "sink.sinkgtk")) { Gtk.Window cobj = ((Gtk.Window)(obj)); // Widget sink.sinkgtk cobj.Title = "sinkgtk"; Gtk.UIManager w1 = new Gtk.UIManager(); Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default"); Gtk.Action w3 = new Gtk.Action("Simulation", "Simulation", null, null); w3.ShortLabel = "Start"; bindings["Simulation"] = w3; w2.Add(w3, null); Gtk.Action w4 = new Gtk.Action("NewSimulation", "New simulation", null, "gtk-media-play"); w4.ShortLabel = "New simulation"; bindings["NewSimulation"] = w4; w2.Add(w4, null); Gtk.ToggleAction w5 = new Gtk.ToggleAction("PauseSimulation", "Pause simulation", null, "gtk-media-pause"); w5.ShortLabel = "Pause simulation"; bindings["PauseSimulation"] = w5; w2.Add(w5, null); Gtk.Action w6 = new Gtk.Action("StopSimulation", "Stop simulation", null, "gtk-media-stop"); w6.ShortLabel = "Stop simulation"; bindings["StopSimulation"] = w6; w2.Add(w6, null); Gtk.Action w7 = new Gtk.Action("Exit", "Exit", null, "gtk-close"); w7.ShortLabel = "Exit"; bindings["Exit"] = w7; w2.Add(w7, null); Gtk.Action w8 = new Gtk.Action("Configuration", "Configuration", null, null); w8.ShortLabel = "Configuration"; bindings["Configuration"] = w8; w2.Add(w8, null); Gtk.Action w9 = new Gtk.Action("IntroVariables", "Intro variables", null, "gtk-properties"); w9.ShortLabel = "Intro variables"; bindings["IntroVariables"] = w9; w2.Add(w9, null); Gtk.Action w10 = new Gtk.Action("Help", "Help", null, null); w10.ShortLabel = "Help"; bindings["Help"] = w10; w2.Add(w10, null); Gtk.Action w11 = new Gtk.Action("Help1", "Help", null, "gtk-help"); w11.ShortLabel = "Help"; bindings["Help1"] = w11; w2.Add(w11, null); Gtk.Action w12 = new Gtk.Action("AboutAuthors", "About Authors", null, "gtk-info"); w12.ShortLabel = "About Authors"; bindings["AboutAuthors"] = w12; w2.Add(w12, null); w1.InsertActionGroup(w2, 0); cobj.AddAccelGroup(w1.AccelGroup); cobj.Icon = Gtk.IconTheme.Default.LoadIcon("stock_internet", 16, 0); cobj.WindowPosition = ((Gtk.WindowPosition)(4)); cobj.Events = ((Gdk.EventMask)(0)); cobj.Name = "sink.sinkgtk"; // Container child sink.sinkgtk.Gtk.Container+ContainerChild Gtk.VBox w13 = new Gtk.VBox(); w13.Events = ((Gdk.EventMask)(0)); w13.Name = "vbox1"; // Container child vbox1.Gtk.Box+BoxChild w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='Simulation'><menuitem action='NewSimulation'/><menuitem action='PauseSimulation'/><menuitem action='StopSimulation'/><menuitem action='Exit'/></menu><menu action='Configuration'><menuitem action='IntroVariables'/></menu><menu action='Help'><menuitem action='Help1'/><menuitem action='AboutAuthors'/></menu></menubar></ui>"); Gtk.MenuBar w14 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1"))); w14.Events = ((Gdk.EventMask)(0)); w14.Name = "menubar1"; bindings["menubar1"] = w14; w13.Add(w14); Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(w13[w14])); w15.Position = 0; w15.Expand = false; w15.Fill = false; // Container child vbox1.Gtk.Box+BoxChild Gtk.Statusbar w16 = new Gtk.Statusbar(); w16.Events = ((Gdk.EventMask)(0)); w16.Name = "statusbar1"; bindings["statusbar1"] = w16; w13.Add(w16); Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(w13[w16])); w17.Position = 1; w17.Expand = false; w17.Fill = false; // Container child vbox1.Gtk.Box+BoxChild Gtk.DrawingArea w18 = new Gtk.DrawingArea(); w18.Events = ((Gdk.EventMask)(0)); w18.Name = "drawingarea1"; bindings["drawingarea1"] = w18; w13.Add(w18); Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(w13[w18])); w19.Position = 2; bindings["vbox1"] = w13; cobj.Add(w13); cobj.DefaultWidth = 500; cobj.DefaultHeight = 300; bindings["sink.sinkgtk"] = cobj; w14.Show(); w16.Show(); w18.Show(); w13.Show(); cobj.Show(); cobj.Removed += ((Gtk.RemovedHandler)(System.Delegate.CreateDelegate(typeof(Gtk.RemovedHandler), cobj, "OnRemoved"))); w4.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnNewSimulationActivated"))); w5.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnPauseSimulationActivated"))); w6.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnStopSimulationActivated"))); w7.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnExitActivated"))); w9.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnIntroVariablesActivated"))); w11.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnHelp1Activated"))); w12.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnAboutAuthorsActivated"))); w18.ExposeEvent += ((Gtk.ExposeEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.ExposeEventHandler), cobj, "OnDrawingarea1ExposeEvent"))); } else { if ((id == "sink.configuration")) { Gtk.Dialog cobj = ((Gtk.Dialog)(obj)); // Widget sink.configuration cobj.Title = "configuration"; cobj.WindowPosition = ((Gtk.WindowPosition)(4)); cobj.HasSeparator = false; cobj.Events = ((Gdk.EventMask)(256)); cobj.Name = "sink.configuration"; // Internal child sink.configuration.VBox Gtk.VBox w1 = cobj.VBox; w1.BorderWidth = ((uint)(2)); w1.Events = ((Gdk.EventMask)(256)); w1.Name = "dialog_VBox"; // Container child dialog_VBox.Gtk.Box+BoxChild Gtk.VBox w2 = new Gtk.VBox(); w2.Events = ((Gdk.EventMask)(0)); w2.Name = "vbox1"; // Container child vbox1.Gtk.Box+BoxChild Gtk.Table w3 = new Gtk.Table(((uint)(5)), ((uint)(2)), false); w3.Events = ((Gdk.EventMask)(0)); w3.Name = "table1"; // Container child table1.Gtk.Table+TableChild Gtk.Label w4 = new Gtk.Label(); w4.LabelProp = "Max cicles"; w4.Events = ((Gdk.EventMask)(0)); w4.Name = "label1"; bindings["label1"] = w4; w3.Add(w4); Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(w3[w4])); w5.YOptions = ((Gtk.AttachOptions)(4)); w5.XOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.Label w6 = new Gtk.Label(); w6.LabelProp = "Population"; w6.Events = ((Gdk.EventMask)(0)); w6.Name = "label3"; bindings["label3"] = w6; w3.Add(w6); Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(w3[w6])); w7.BottomAttach = ((uint)(2)); w7.TopAttach = ((uint)(1)); w7.YOptions = ((Gtk.AttachOptions)(4)); w7.XOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.Label w8 = new Gtk.Label(); w8.LabelProp = "Mortality"; w8.Events = ((Gdk.EventMask)(0)); w8.Name = "label4"; bindings["label4"] = w8; w3.Add(w8); Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(w3[w8])); w9.BottomAttach = ((uint)(3)); w9.TopAttach = ((uint)(2)); w9.YOptions = ((Gtk.AttachOptions)(4)); w9.XOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.Label w10 = new Gtk.Label(); w10.LabelProp = "Patch"; w10.Events = ((Gdk.EventMask)(0)); w10.Name = "label5"; bindings["label5"] = w10; w3.Add(w10); Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(w3[w10])); w11.BottomAttach = ((uint)(4)); w11.TopAttach = ((uint)(3)); w11.YOptions = ((Gtk.AttachOptions)(4)); w11.XOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.HScale w12 = new Gtk.HScale(null); w12.Digits = 0; w12.Adjustment.Upper = 100000; w12.Adjustment.PageIncrement = 100; w12.Adjustment.StepIncrement = 10; w12.DrawValue = true; w12.Adjustment.Value = 99900; w12.ValuePos = ((Gtk.PositionType)(2)); w12.CanFocus = true; w12.Events = ((Gdk.EventMask)(0)); w12.Name = "hscale1"; bindings["hscale1"] = w12; w3.Add(w12); Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(w3[w12])); w13.LeftAttach = ((uint)(1)); w13.RightAttach = ((uint)(2)); w13.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.HScale w14 = new Gtk.HScale(null); w14.Digits = 0; w14.Adjustment.Upper = 5000; w14.Adjustment.PageIncrement = 10; w14.Adjustment.StepIncrement = 1; w14.DrawValue = true; w14.ValuePos = ((Gtk.PositionType)(2)); w14.CanFocus = true; w14.Events = ((Gdk.EventMask)(0)); w14.Name = "hscale2"; bindings["hscale2"] = w14; w3.Add(w14); Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(w3[w14])); w15.BottomAttach = ((uint)(2)); w15.LeftAttach = ((uint)(1)); w15.RightAttach = ((uint)(2)); w15.TopAttach = ((uint)(1)); w15.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.HScale w16 = new Gtk.HScale(null); w16.Digits = 0; w16.Adjustment.Upper = 10000; w16.Adjustment.PageIncrement = 10; w16.Adjustment.StepIncrement = 1; w16.DrawValue = true; w16.ValuePos = ((Gtk.PositionType)(2)); w16.CanFocus = true; w16.Events = ((Gdk.EventMask)(0)); w16.Name = "hscale3"; bindings["hscale3"] = w16; w3.Add(w16); Gtk.Table.TableChild w17 = ((Gtk.Table.TableChild)(w3[w16])); w17.BottomAttach = ((uint)(3)); w17.LeftAttach = ((uint)(1)); w17.RightAttach = ((uint)(2)); w17.TopAttach = ((uint)(2)); w17.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.HScale w18 = new Gtk.HScale(null); w18.Digits = 0; w18.Adjustment.Upper = 1000; w18.Adjustment.PageIncrement = 10; w18.Adjustment.StepIncrement = 1; w18.DrawValue = true; w18.ValuePos = ((Gtk.PositionType)(2)); w18.CanFocus = true; w18.Events = ((Gdk.EventMask)(0)); w18.Name = "hscale4"; bindings["hscale4"] = w18; w3.Add(w18); Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(w3[w18])); w19.BottomAttach = ((uint)(4)); w19.LeftAttach = ((uint)(1)); w19.RightAttach = ((uint)(2)); w19.TopAttach = ((uint)(3)); w19.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.HScale w20 = new Gtk.HScale(null); w20.Digits = 0; w20.Adjustment.Upper = 300; w20.Adjustment.PageIncrement = 10; w20.Adjustment.StepIncrement = 1; w20.DrawValue = true; w20.Adjustment.Value = 60; w20.ValuePos = ((Gtk.PositionType)(2)); w20.CanFocus = true; w20.Events = ((Gdk.EventMask)(0)); w20.Name = "hscale5"; bindings["hscale5"] = w20; w3.Add(w20); Gtk.Table.TableChild w21 = ((Gtk.Table.TableChild)(w3[w20])); w21.BottomAttach = ((uint)(5)); w21.LeftAttach = ((uint)(1)); w21.RightAttach = ((uint)(2)); w21.TopAttach = ((uint)(4)); w21.YOptions = ((Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild Gtk.Label w22 = new Gtk.Label(); w22.LabelProp = "Size "; w22.Events = ((Gdk.EventMask)(0)); w22.Name = "label7"; bindings["label7"] = w22; w3.Add(w22); Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(w3[w22])); w23.BottomAttach = ((uint)(5)); w23.TopAttach = ((uint)(4)); w23.YOptions = ((Gtk.AttachOptions)(4)); w23.XOptions = ((Gtk.AttachOptions)(4)); bindings["table1"] = w3; w2.Add(w3); Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(w2[w3])); w24.Position = 0; w24.Expand = false; w24.Fill = false; // Container child vbox1.Gtk.Box+BoxChild Gtk.Frame w25 = new Gtk.Frame(); w25.ShadowType = ((Gtk.ShadowType)(0)); w25.LabelXalign = 0F; w25.Events = ((Gdk.EventMask)(0)); w25.Name = "frame2"; // Container child frame2.Gtk.Container+ContainerChild Gtk.Alignment w26 = new Gtk.Alignment(0F, 0F, 1F, 1F); w26.LeftPadding = ((uint)(12)); w26.Events = ((Gdk.EventMask)(0)); w26.Name = "GtkAlignment"; // Container child GtkAlignment.Gtk.Container+ContainerChild Gtk.Table w27 = new Gtk.Table(((uint)(6)), ((uint)(3)), false); w27.Events = ((Gdk.EventMask)(0)); w27.Name = "table2"; // Container child table2.Gtk.Table+TableChild Gtk.Label w28 = new Gtk.Label(); w28.LabelProp = " Cell changes to 1 if:"; w28.Events = ((Gdk.EventMask)(0)); w28.Name = "label16"; bindings["label16"] = w28; w27.Add(w28); Gtk.Table.TableChild w29 = ((Gtk.Table.TableChild)(w27[w28])); w29.BottomAttach = ((uint)(4)); w29.LeftAttach = ((uint)(1)); w29.RightAttach = ((uint)(2)); w29.TopAttach = ((uint)(3)); w29.YOptions = ((Gtk.AttachOptions)(4)); w29.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w30 = new Gtk.Label(); w30.LabelProp = " Cell changes to 0 if: "; w30.Events = ((Gdk.EventMask)(0)); w30.Name = "label2"; bindings["label2"] = w30; w27.Add(w30); Gtk.Table.TableChild w31 = ((Gtk.Table.TableChild)(w27[w30])); w31.LeftAttach = ((uint)(1)); w31.RightAttach = ((uint)(2)); w31.YOptions = ((Gtk.AttachOptions)(4)); w31.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w32 = new Gtk.Label(); w32.LabelProp = "If neighborhood is >= "; w32.Events = ((Gdk.EventMask)(0)); w32.Name = "label15"; bindings["label15"] = w32; w27.Add(w32); Gtk.Table.TableChild w33 = ((Gtk.Table.TableChild)(w27[w32])); w33.BottomAttach = ((uint)(2)); w33.TopAttach = ((uint)(1)); w33.YOptions = ((Gtk.AttachOptions)(4)); w33.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w34 = new Gtk.Label(); w34.LabelProp = "If neighborhood is >= "; w34.Events = ((Gdk.EventMask)(0)); w34.Name = "label11"; bindings["label11"] = w34; w27.Add(w34); Gtk.Table.TableChild w35 = ((Gtk.Table.TableChild)(w27[w34])); w35.BottomAttach = ((uint)(3)); w35.TopAttach = ((uint)(2)); w35.YOptions = ((Gtk.AttachOptions)(4)); w35.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w36 = new Gtk.Label(); w36.LabelProp = "If neighborhood is >="; w36.Events = ((Gdk.EventMask)(0)); w36.Name = "label13"; bindings["label13"] = w36; w27.Add(w36); Gtk.Table.TableChild w37 = ((Gtk.Table.TableChild)(w27[w36])); w37.BottomAttach = ((uint)(5)); w37.TopAttach = ((uint)(4)); w37.YOptions = ((Gtk.AttachOptions)(4)); w37.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w38 = new Gtk.Label(); w38.LabelProp = "If neighborhood is >="; w38.Events = ((Gdk.EventMask)(0)); w38.Name = "label14"; bindings["label14"] = w38; w27.Add(w38); Gtk.Table.TableChild w39 = ((Gtk.Table.TableChild)(w27[w38])); w39.BottomAttach = ((uint)(6)); w39.TopAttach = ((uint)(5)); w39.YOptions = ((Gtk.AttachOptions)(4)); w39.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w40 = new Gtk.Label(); w40.LabelProp = "and habitat = 1; Or ..."; w40.Events = ((Gdk.EventMask)(0)); w40.Name = "label6"; bindings["label6"] = w40; w27.Add(w40); Gtk.Table.TableChild w41 = ((Gtk.Table.TableChild)(w27[w40])); w41.BottomAttach = ((uint)(2)); w41.LeftAttach = ((uint)(2)); w41.RightAttach = ((uint)(3)); w41.TopAttach = ((uint)(1)); w41.YOptions = ((Gtk.AttachOptions)(4)); w41.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w42 = new Gtk.Label(); w42.LabelProp = "and habitat = 0; "; w42.Events = ((Gdk.EventMask)(0)); w42.Name = "label12"; bindings["label12"] = w42; w27.Add(w42); Gtk.Table.TableChild w43 = ((Gtk.Table.TableChild)(w27[w42])); w43.BottomAttach = ((uint)(3)); w43.LeftAttach = ((uint)(2)); w43.RightAttach = ((uint)(3)); w43.TopAttach = ((uint)(2)); w43.YOptions = ((Gtk.AttachOptions)(4)); w43.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w44 = new Gtk.Label(); w44.LabelProp = "and habitat = 1; Or..."; w44.Events = ((Gdk.EventMask)(0)); w44.Name = "label9"; bindings["label9"] = w44; w27.Add(w44); Gtk.Table.TableChild w45 = ((Gtk.Table.TableChild)(w27[w44])); w45.BottomAttach = ((uint)(5)); w45.LeftAttach = ((uint)(2)); w45.RightAttach = ((uint)(3)); w45.TopAttach = ((uint)(4)); w45.YOptions = ((Gtk.AttachOptions)(4)); w45.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w46 = new Gtk.Label(); w46.LabelProp = "and habitat = 0;"; w46.Events = ((Gdk.EventMask)(0)); w46.Name = "label10"; bindings["label10"] = w46; w27.Add(w46); Gtk.Table.TableChild w47 = ((Gtk.Table.TableChild)(w27[w46])); w47.BottomAttach = ((uint)(6)); w47.LeftAttach = ((uint)(2)); w47.RightAttach = ((uint)(3)); w47.TopAttach = ((uint)(5)); w47.YOptions = ((Gtk.AttachOptions)(4)); w47.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.HScale w48 = new Gtk.HScale(null); w48.Digits = 0; w48.Adjustment.Upper = 8; w48.Adjustment.PageIncrement = 1; w48.Adjustment.StepIncrement = 1; w48.DrawValue = true; w48.Adjustment.Value = 8; w48.ValuePos = ((Gtk.PositionType)(2)); w48.CanFocus = true; w48.Events = ((Gdk.EventMask)(0)); w48.Name = "hscale7"; bindings["hscale7"] = w48; w27.Add(w48); Gtk.Table.TableChild w49 = ((Gtk.Table.TableChild)(w27[w48])); w49.BottomAttach = ((uint)(2)); w49.LeftAttach = ((uint)(1)); w49.RightAttach = ((uint)(2)); w49.TopAttach = ((uint)(1)); w49.YOptions = ((Gtk.AttachOptions)(4)); w49.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.HScale w50 = new Gtk.HScale(null); w50.Digits = 0; w50.Adjustment.Upper = 8; w50.Adjustment.PageIncrement = 1; w50.Adjustment.StepIncrement = 1; w50.DrawValue = true; w50.ValuePos = ((Gtk.PositionType)(2)); w50.CanFocus = true; w50.Events = ((Gdk.EventMask)(0)); w50.Name = "hscale8"; bindings["hscale8"] = w50; w27.Add(w50); Gtk.Table.TableChild w51 = ((Gtk.Table.TableChild)(w27[w50])); w51.BottomAttach = ((uint)(3)); w51.LeftAttach = ((uint)(1)); w51.RightAttach = ((uint)(2)); w51.TopAttach = ((uint)(2)); w51.YOptions = ((Gtk.AttachOptions)(4)); w51.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.HScale w52 = new Gtk.HScale(null); w52.Digits = 0; w52.Adjustment.Upper = 8; w52.Adjustment.PageIncrement = 1; w52.Adjustment.StepIncrement = 1; w52.DrawValue = true; w52.Adjustment.Value = 8; w52.ValuePos = ((Gtk.PositionType)(2)); w52.CanFocus = true; w52.Events = ((Gdk.EventMask)(0)); w52.Name = "hscale9"; bindings["hscale9"] = w52; w27.Add(w52); Gtk.Table.TableChild w53 = ((Gtk.Table.TableChild)(w27[w52])); w53.BottomAttach = ((uint)(5)); w53.LeftAttach = ((uint)(1)); w53.RightAttach = ((uint)(2)); w53.TopAttach = ((uint)(4)); w53.YOptions = ((Gtk.AttachOptions)(4)); w53.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.HScale w54 = new Gtk.HScale(null); w54.Digits = 0; w54.Adjustment.Upper = 8; w54.Adjustment.PageIncrement = 1; w54.Adjustment.StepIncrement = 1; w54.DrawValue = true; w54.Adjustment.Value = 3; w54.ValuePos = ((Gtk.PositionType)(2)); w54.CanFocus = true; w54.Events = ((Gdk.EventMask)(0)); w54.Name = "hscale10"; bindings["hscale10"] = w54; w27.Add(w54); Gtk.Table.TableChild w55 = ((Gtk.Table.TableChild)(w27[w54])); w55.BottomAttach = ((uint)(6)); w55.LeftAttach = ((uint)(1)); w55.RightAttach = ((uint)(2)); w55.TopAttach = ((uint)(5)); w55.YOptions = ((Gtk.AttachOptions)(4)); w55.XOptions = ((Gtk.AttachOptions)(4)); bindings["table2"] = w27; w26.Add(w27); bindings["GtkAlignment"] = w26; w25.Add(w26); Gtk.Label w58 = new Gtk.Label(); w58.LabelProp = "<b>Internal variables:</b>"; w58.UseMarkup = true; w58.Events = ((Gdk.EventMask)(256)); w58.Name = "GtkLabel1"; bindings["GtkLabel1"] = w58; w25.LabelWidget = w58; bindings["frame2"] = w25; w2.Add(w25); Gtk.Box.BoxChild w59 = ((Gtk.Box.BoxChild)(w2[w25])); w59.Position = 1; w59.Expand = false; w59.Fill = false; bindings["vbox1"] = w2; w1.Add(w2); Gtk.Box.BoxChild w60 = ((Gtk.Box.BoxChild)(w1[w2])); w60.Position = 0; w60.Expand = false; w60.Fill = false; bindings["dialog_VBox"] = w1; // Internal child sink.configuration.ActionArea Gtk.HButtonBox w61 = cobj.ActionArea; w61.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); w61.Spacing = 6; w61.BorderWidth = ((uint)(5)); w61.Events = ((Gdk.EventMask)(256)); w61.Name = "sink.configuration_ActionArea"; // Container child sink.configuration_ActionArea.Gtk.ButtonBox+ButtonBoxChild Gtk.Button w62 = new Gtk.Button(); w62.CanFocus = true; w62.Events = ((Gdk.EventMask)(0)); w62.Name = "button1"; w62.CanDefault = true; w62.Label = "Save"; bindings["button1"] = w62; cobj.AddActionWidget(w62, 0); Gtk.ButtonBox.ButtonBoxChild w63 = ((Gtk.ButtonBox.ButtonBoxChild)(w61[w62])); w63.Expand = false; w63.Fill = false; bindings["sink.configuration_ActionArea"] = w61; cobj.DefaultWidth = 609; cobj.DefaultHeight = 484; bindings["sink.configuration"] = cobj; w4.Show(); w6.Show(); w8.Show(); w10.Show(); w12.Show(); w14.Show(); w16.Show(); w18.Show(); w20.Show(); w22.Show(); w3.Show(); w28.Show(); w30.Show(); w32.Show(); w34.Show(); w36.Show(); w38.Show(); w40.Show(); w42.Show(); w44.Show(); w46.Show(); w48.Show(); w50.Show(); w52.Show(); w54.Show(); w27.Show(); w26.Show(); w58.Show(); w25.Show(); w2.Show(); w1.Show(); w62.Show(); w61.Show(); cobj.Show(); w62.Released += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnButton1Released"))); } } } System.Reflection.FieldInfo[] fields = obj.GetType().GetFields(((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) | System.Reflection.BindingFlags.Instance)); for (int n = 0; (n < fields.Length); n = (n + 1)) { System.Reflection.FieldInfo field = fields[n]; object widget = bindings[field.Name]; if (((widget != null) && field.FieldType.IsInstanceOfType(widget))) { field.SetValue(obj, widget); } } }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget MainWindow this.UIManager = new Gtk.UIManager(); Gtk.ActionGroup w1 = new Gtk.ActionGroup("Default"); this.FileAction = new Gtk.Action("FileAction", Mono.Unix.Catalog.GetString("File"), null, null); this.FileAction.ShortLabel = Mono.Unix.Catalog.GetString("File"); w1.Add(this.FileAction, null); this.jumpToAction = new Gtk.Action("jumpToAction", Mono.Unix.Catalog.GetString("Restart"), null, "gtk-jump-to"); this.jumpToAction.ShortLabel = Mono.Unix.Catalog.GetString("Restart"); w1.Add(this.jumpToAction, null); this.quitAction = new Gtk.Action("quitAction", Mono.Unix.Catalog.GetString("Quit"), null, "gtk-quit"); this.quitAction.ShortLabel = Mono.Unix.Catalog.GetString("Quit"); w1.Add(this.quitAction, null); this.HelpAction = new Gtk.Action("HelpAction", Mono.Unix.Catalog.GetString("Help"), null, "none"); this.HelpAction.ShortLabel = Mono.Unix.Catalog.GetString("About..."); w1.Add(this.HelpAction, null); this.saveAction = new Gtk.Action("saveAction", Mono.Unix.Catalog.GetString("Take snapshot"), null, "gtk-save"); this.saveAction.ShortLabel = Mono.Unix.Catalog.GetString("Take snapshot"); w1.Add(this.saveAction, null); this.helpAction = new Gtk.Action("helpAction", Mono.Unix.Catalog.GetString("About..."), null, "gtk-help"); this.helpAction.ShortLabel = Mono.Unix.Catalog.GetString("About..."); w1.Add(this.helpAction, null); this.OptionsAction = new Gtk.Action("OptionsAction", Mono.Unix.Catalog.GetString("Options"), null, null); this.OptionsAction.ShortLabel = Mono.Unix.Catalog.GetString("Options"); w1.Add(this.OptionsAction, null); this.GraphicsAction = new Gtk.Action("GraphicsAction", Mono.Unix.Catalog.GetString("Graphics"), null, null); this.GraphicsAction.ShortLabel = Mono.Unix.Catalog.GetString("Graphics"); w1.Add(this.GraphicsAction, null); this.AnimationDelayAction = new Gtk.Action("AnimationDelayAction", Mono.Unix.Catalog.GetString("Animation Delay"), null, null); this.AnimationDelayAction.ShortLabel = Mono.Unix.Catalog.GetString("Animation Delay"); w1.Add(this.AnimationDelayAction, null); this.mediaPlayAction = new Gtk.Action("mediaPlayAction", Mono.Unix.Catalog.GetString("Frame Delay"), null, "gtk-media-play"); this.mediaPlayAction.ShortLabel = Mono.Unix.Catalog.GetString("Frame Delay"); w1.Add(this.mediaPlayAction, null); this.d500MsAction = new Gtk.RadioAction("d500MsAction", Mono.Unix.Catalog.GetString("500 ms"), null, null, 0); this.d500MsAction.Group = new GLib.SList(System.IntPtr.Zero); this.d500MsAction.ShortLabel = Mono.Unix.Catalog.GetString("500 ms"); w1.Add(this.d500MsAction, null); this.d1000MsAction = new Gtk.RadioAction("d1000MsAction", Mono.Unix.Catalog.GetString("1000 ms"), null, null, 0); this.d1000MsAction.Group = this.d500MsAction.Group; this.d1000MsAction.ShortLabel = Mono.Unix.Catalog.GetString("1000 ms"); w1.Add(this.d1000MsAction, null); this.d250MsAction = new Gtk.RadioAction("d250MsAction", Mono.Unix.Catalog.GetString("250 ms"), null, null, 0); this.d250MsAction.Group = this.d500MsAction.Group; this.d250MsAction.ShortLabel = Mono.Unix.Catalog.GetString("250 ms"); w1.Add(this.d250MsAction, null); this.d100MsAction = new Gtk.RadioAction("d100MsAction", Mono.Unix.Catalog.GetString("100 ms"), null, null, 0); this.d100MsAction.Group = this.d500MsAction.Group; this.d100MsAction.ShortLabel = Mono.Unix.Catalog.GetString("100 ms"); w1.Add(this.d100MsAction, null); this.DrawGridAction = new Gtk.ToggleAction("DrawGridAction", Mono.Unix.Catalog.GetString("Draw Grid"), null, null); this.DrawGridAction.ShortLabel = Mono.Unix.Catalog.GetString("Draw Grid"); w1.Add(this.DrawGridAction, null); this.ANSIOnlyAction = new Gtk.ToggleAction("ANSIOnlyAction", Mono.Unix.Catalog.GetString("ANSI Only"), null, null); this.ANSIOnlyAction.Active = true; this.ANSIOnlyAction.ShortLabel = Mono.Unix.Catalog.GetString("ANSI Only"); w1.Add(this.ANSIOnlyAction, null); this.UIManager.InsertActionGroup(w1, 0); this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "MainWindow"; this.Title = Mono.Unix.Catalog.GetString("GVisHuff - Adaptive Huffman Animator"); this.WindowPosition = ((Gtk.WindowPosition)(4)); // Container child MainWindow.Gtk.Container+ContainerChild this.MainLayout = new Gtk.VBox(); this.MainLayout.Name = "MainLayout"; this.MainLayout.Spacing = 6; // Container child MainLayout.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><menubar name='MainMenu'><menu name='FileAction' action='FileAction'><menuitem name='jumpToAction' action='jumpToAction'/><menuitem name='saveAction' action='saveAction'/><separator/><menuitem name='quitAction' action='quitAction'/></menu><menu name='OptionsAction' action='OptionsAction'><menu name='mediaPlayAction' action='mediaPlayAction'><menuitem name='d100MsAction' action='d100MsAction'/><menuitem name='d250MsAction' action='d250MsAction'/><menuitem name='d500MsAction' action='d500MsAction'/><menuitem name='d1000MsAction' action='d1000MsAction'/></menu><menuitem name='DrawGridAction' action='DrawGridAction'/><menuitem name='ANSIOnlyAction' action='ANSIOnlyAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='helpAction' action='helpAction'/></menu></menubar></ui>"); this.MainMenu = ((Gtk.MenuBar)(this.UIManager.GetWidget("/MainMenu"))); this.MainMenu.Name = "MainMenu"; this.MainLayout.Add(this.MainMenu); Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.MainLayout[this.MainMenu])); w2.Position = 0; w2.Expand = false; w2.Fill = false; // Container child MainLayout.Gtk.Box+BoxChild this.SenderHBox = new Gtk.HBox(); this.SenderHBox.Name = "SenderHBox"; this.SenderHBox.Homogeneous = true; this.SenderHBox.Spacing = 6; // Container child SenderHBox.Gtk.Box+BoxChild this.SenderVBox = new Gtk.VBox(); this.SenderVBox.Name = "SenderVBox"; this.SenderVBox.Spacing = 6; // Container child SenderVBox.Gtk.Box+BoxChild this.MsgEncHBox = new Gtk.HBox(); this.MsgEncHBox.Name = "MsgEncHBox"; this.MsgEncHBox.Spacing = 6; // Container child MsgEncHBox.Gtk.Box+BoxChild this.SenderEntry = new Gtk.Entry(); this.SenderEntry.CanFocus = true; this.SenderEntry.Name = "SenderEntry"; this.SenderEntry.IsEditable = false; this.SenderEntry.InvisibleChar = '●'; this.MsgEncHBox.Add(this.SenderEntry); Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.MsgEncHBox[this.SenderEntry])); w3.Position = 0; // Container child MsgEncHBox.Gtk.Box+BoxChild this.SendButton = new Gtk.Button(); this.SendButton.CanFocus = true; this.SendButton.Name = "SendButton"; this.SendButton.UseUnderline = true; // Container child SendButton.Gtk.Container+ContainerChild Gtk.Alignment w4 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); // Container child GtkAlignment.Gtk.Container+ContainerChild Gtk.HBox w5 = new Gtk.HBox(); w5.Spacing = 2; // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Image w6 = new Gtk.Image(); w6.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-media-play", Gtk.IconSize.Menu, 16); w5.Add(w6); // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Label w8 = new Gtk.Label(); w8.LabelProp = Mono.Unix.Catalog.GetString("Send Message"); w8.UseUnderline = true; w5.Add(w8); w4.Add(w5); this.SendButton.Add(w4); this.MsgEncHBox.Add(this.SendButton); Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.MsgEncHBox[this.SendButton])); w12.Position = 1; w12.Expand = false; w12.Fill = false; this.SenderVBox.Add(this.MsgEncHBox); Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.SenderVBox[this.MsgEncHBox])); w13.Position = 0; w13.Expand = false; w13.Fill = false; // Container child SenderVBox.Gtk.Box+BoxChild this.SenderScrWnd = new Gtk.ScrolledWindow(); this.SenderScrWnd.CanFocus = true; this.SenderScrWnd.Name = "SenderScrWnd"; this.SenderScrWnd.ShadowType = ((Gtk.ShadowType)(1)); // Container child SenderScrWnd.Gtk.Container+ContainerChild Gtk.Viewport w14 = new Gtk.Viewport(); w14.ShadowType = ((Gtk.ShadowType)(0)); // Container child GtkViewport.Gtk.Container+ContainerChild this.SenderTreeDrawer = new Gtk.DrawingArea(); this.SenderTreeDrawer.Name = "SenderTreeDrawer"; w14.Add(this.SenderTreeDrawer); this.SenderScrWnd.Add(w14); this.SenderVBox.Add(this.SenderScrWnd); Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.SenderVBox[this.SenderScrWnd])); w17.Position = 1; this.SenderHBox.Add(this.SenderVBox); Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.SenderHBox[this.SenderVBox])); w18.Position = 0; // Container child SenderHBox.Gtk.Box+BoxChild this.ReceiverVBox = new Gtk.VBox(); this.ReceiverVBox.Name = "ReceiverVBox"; this.ReceiverVBox.Spacing = 6; // Container child ReceiverVBox.Gtk.Box+BoxChild this.DecHBox = new Gtk.HBox(); this.DecHBox.Name = "DecHBox"; this.DecHBox.Spacing = 6; // Container child DecHBox.Gtk.Box+BoxChild this.label3 = new Gtk.Label(); this.label3.Name = "label3"; this.label3.LabelProp = Mono.Unix.Catalog.GetString("Decoded message:"); this.DecHBox.Add(this.label3); Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.DecHBox[this.label3])); w19.Position = 0; w19.Expand = false; w19.Fill = false; // Container child DecHBox.Gtk.Box+BoxChild this.DecEntry = new Gtk.Entry(); this.DecEntry.CanFocus = true; this.DecEntry.Name = "DecEntry"; this.DecEntry.IsEditable = false; this.DecEntry.InvisibleChar = '●'; this.DecHBox.Add(this.DecEntry); Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.DecHBox[this.DecEntry])); w20.Position = 1; this.ReceiverVBox.Add(this.DecHBox); Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.ReceiverVBox[this.DecHBox])); w21.Position = 0; w21.Expand = false; w21.Fill = false; // Container child ReceiverVBox.Gtk.Box+BoxChild this.ReceiverScrWnd = new Gtk.ScrolledWindow(); this.ReceiverScrWnd.CanFocus = true; this.ReceiverScrWnd.Name = "ReceiverScrWnd"; this.ReceiverScrWnd.ShadowType = ((Gtk.ShadowType)(1)); // Container child ReceiverScrWnd.Gtk.Container+ContainerChild Gtk.Viewport w22 = new Gtk.Viewport(); w22.ShadowType = ((Gtk.ShadowType)(0)); // Container child GtkViewport1.Gtk.Container+ContainerChild this.ReceiverTreeDrawer = new Gtk.DrawingArea(); this.ReceiverTreeDrawer.Name = "ReceiverTreeDrawer"; w22.Add(this.ReceiverTreeDrawer); this.ReceiverScrWnd.Add(w22); this.ReceiverVBox.Add(this.ReceiverScrWnd); Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.ReceiverVBox[this.ReceiverScrWnd])); w25.Position = 1; this.SenderHBox.Add(this.ReceiverVBox); Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.SenderHBox[this.ReceiverVBox])); w26.Position = 1; this.MainLayout.Add(this.SenderHBox); Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.MainLayout[this.SenderHBox])); w27.Position = 1; // Container child MainLayout.Gtk.Box+BoxChild this.BinHBox = new Gtk.HBox(); this.BinHBox.Name = "BinHBox"; this.BinHBox.Spacing = 6; // Container child BinHBox.Gtk.Box+BoxChild this.BinLabel = new Gtk.Label(); this.BinLabel.Name = "BinLabel"; this.BinLabel.LabelProp = Mono.Unix.Catalog.GetString("Data transferred"); this.BinHBox.Add(this.BinLabel); Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.BinHBox[this.BinLabel])); w28.Position = 0; w28.Expand = false; w28.Fill = false; // Container child BinHBox.Gtk.Box+BoxChild this.BinEntry = new Gtk.Entry(); this.BinEntry.CanFocus = true; this.BinEntry.Name = "BinEntry"; this.BinEntry.IsEditable = false; this.BinEntry.InvisibleChar = '●'; this.BinHBox.Add(this.BinEntry); Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.BinHBox[this.BinEntry])); w29.Position = 1; this.MainLayout.Add(this.BinHBox); Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.MainLayout[this.BinHBox])); w30.Position = 2; w30.Expand = false; w30.Fill = false; // Container child MainLayout.Gtk.Box+BoxChild this.HotkeyHintLabel = new Gtk.Label(); this.HotkeyHintLabel.Name = "HotkeyHintLabel"; this.HotkeyHintLabel.LabelProp = Mono.Unix.Catalog.GetString("<Ctl-S> to capture the screen, <Ctl-Q> to quit"); this.MainLayout.Add(this.HotkeyHintLabel); Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.MainLayout[this.HotkeyHintLabel])); w31.PackType = ((Gtk.PackType)(1)); w31.Position = 3; w31.Expand = false; w31.Fill = false; this.Add(this.MainLayout); if ((this.Child != null)) { this.Child.ShowAll(); } this.DefaultWidth = 697; this.DefaultHeight = 538; this.Show(); this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent); this.jumpToAction.Activated += new System.EventHandler(this.OnRedoActionActivated); this.quitAction.Activated += new System.EventHandler(this.OnQuitActionActivated); this.saveAction.Activated += new System.EventHandler(this.OnSaveAsActionActivated); this.helpAction.Activated += new System.EventHandler(this.OnAboutActionActivated); this.d500MsAction.Activated += new System.EventHandler(this.On500MsActionActivated); this.d1000MsAction.Activated += new System.EventHandler(this.On1000MsActionActivated); this.d250MsAction.Activated += new System.EventHandler(this.On250MsActionActivated); this.d100MsAction.Activated += new System.EventHandler(this.On100MsActionActivated); this.DrawGridAction.Toggled += new System.EventHandler(this.OnDrawGridActionToggled); this.ANSIOnlyAction.Toggled += new System.EventHandler(this.OnANSIOnlyActionToggled); this.SenderEntry.KeyReleaseEvent += new Gtk.KeyReleaseEventHandler(this.OnSenderEntryKeyReleaseEvent); this.SendButton.Clicked += new System.EventHandler(this.OnSendButtonClicked); this.SenderTreeDrawer.ExposeEvent += new Gtk.ExposeEventHandler(this.OnSenderTreeDrawerExposeEvent); this.ReceiverTreeDrawer.ExposeEvent += new Gtk.ExposeEventHandler(this.OnReceiverTreeDrawerExposeEvent); }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget Pinta.MainWindow this.UIManager = new Gtk.UIManager(); Gtk.ActionGroup w1 = new Gtk.ActionGroup("Default"); this.FileAction = new Gtk.Action("FileAction", Mono.Unix.Catalog.GetString("File"), null, null); this.FileAction.HideIfEmpty = false; this.FileAction.ShortLabel = Mono.Unix.Catalog.GetString("File"); w1.Add(this.FileAction, null); this.EditAction = new Gtk.Action("EditAction", Mono.Unix.Catalog.GetString("Edit"), null, null); this.EditAction.HideIfEmpty = false; this.EditAction.ShortLabel = Mono.Unix.Catalog.GetString("Edit"); w1.Add(this.EditAction, null); this.ViewAction = new Gtk.Action("ViewAction", Mono.Unix.Catalog.GetString("View"), null, null); this.ViewAction.HideIfEmpty = false; this.ViewAction.ShortLabel = Mono.Unix.Catalog.GetString("View"); w1.Add(this.ViewAction, null); this.ImageAction = new Gtk.Action("ImageAction", Mono.Unix.Catalog.GetString("Image"), null, null); this.ImageAction.HideIfEmpty = false; this.ImageAction.ShortLabel = Mono.Unix.Catalog.GetString("Image"); w1.Add(this.ImageAction, null); this.LayersAction = new Gtk.Action("LayersAction", Mono.Unix.Catalog.GetString("Layers"), null, null); this.LayersAction.HideIfEmpty = false; this.LayersAction.ShortLabel = Mono.Unix.Catalog.GetString("Layers"); w1.Add(this.LayersAction, null); this.AdjustmentsAction = new Gtk.Action("AdjustmentsAction", Mono.Unix.Catalog.GetString("Adjustments"), null, null); this.AdjustmentsAction.HideIfEmpty = false; this.AdjustmentsAction.ShortLabel = Mono.Unix.Catalog.GetString("Adjustments"); w1.Add(this.AdjustmentsAction, "<Control>a"); this.EffectsAction = new Gtk.Action("EffectsAction", Mono.Unix.Catalog.GetString("Effects"), null, null); this.EffectsAction.HideIfEmpty = false; this.EffectsAction.ShortLabel = Mono.Unix.Catalog.GetString("Effects"); w1.Add(this.EffectsAction, null); this.WindowAction = new Gtk.Action("WindowAction", Mono.Unix.Catalog.GetString("Window"), null, null); this.WindowAction.ShortLabel = Mono.Unix.Catalog.GetString("Window"); this.WindowAction.Visible = false; w1.Add(this.WindowAction, null); this.HelpAction = new Gtk.Action("HelpAction", Mono.Unix.Catalog.GetString("Help"), null, null); this.HelpAction.HideIfEmpty = false; this.HelpAction.ShortLabel = Mono.Unix.Catalog.GetString("Help"); w1.Add(this.HelpAction, null); this.UIManager.InsertActionGroup(w1, 0); this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "Pinta.MainWindow"; this.Title = Mono.Unix.Catalog.GetString("Pinta!"); this.WindowPosition = ((Gtk.WindowPosition)(1)); this.AllowShrink = true; this.DefaultWidth = 1100; this.DefaultHeight = 750; // Container child Pinta.MainWindow.Gtk.Container+ContainerChild this.vbox1 = new Gtk.VBox(); this.vbox1.Name = "vbox1"; // Container child vbox1.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='FileAction' action='FileAction'/><menu name='EditAction' action='EditAction'/><menu name='ViewAction' action='ViewAction'/><menu name='ImageAction' action='ImageAction'/><menu name='LayersAction' action='LayersAction'/><menu name='AdjustmentsAction' action='AdjustmentsAction'/><menu name='EffectsAction' action='EffectsAction'/><menu name='WindowAction' action='WindowAction'/><menu name='HelpAction' action='HelpAction'/></menubar></ui>"); this.menubar1 = ((Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox1.Add(this.menubar1); Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); w2.Position = 0; w2.Expand = false; w2.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><toolbar name='toolbar1'/></ui>"); this.toolbar1 = ((Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar1"))); this.toolbar1.Name = "toolbar1"; this.toolbar1.ShowArrow = false; this.toolbar1.ToolbarStyle = ((Gtk.ToolbarStyle)(0)); this.toolbar1.IconSize = ((Gtk.IconSize)(2)); this.vbox1.Add(this.toolbar1); Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.toolbar1])); w3.Position = 1; w3.Expand = false; w3.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><toolbar name='tooltoolbar'/></ui>"); this.tooltoolbar = ((Gtk.Toolbar)(this.UIManager.GetWidget("/tooltoolbar"))); this.tooltoolbar.HeightRequest = 28; this.tooltoolbar.Name = "tooltoolbar"; this.tooltoolbar.ShowArrow = false; this.tooltoolbar.ToolbarStyle = ((Gtk.ToolbarStyle)(0)); this.tooltoolbar.IconSize = ((Gtk.IconSize)(2)); this.vbox1.Add(this.tooltoolbar); Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.tooltoolbar])); w4.Position = 2; w4.Expand = false; w4.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox1 = new Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild this.hbox2 = new Gtk.HBox(); this.hbox2.Name = "hbox2"; // Container child hbox2.Gtk.Box+BoxChild this.vbox3 = new Gtk.VBox(); this.vbox3.Name = "vbox3"; // Container child vbox3.Gtk.Box+BoxChild this.colorpalettewidget1 = new Pinta.ColorPaletteWidget(); this.colorpalettewidget1.Name = "colorpalettewidget1"; this.vbox3.Add(this.colorpalettewidget1); Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox3[this.colorpalettewidget1])); w5.PackType = ((Gtk.PackType)(1)); w5.Position = 0; // Container child vbox3.Gtk.Box+BoxChild this.hbox3 = new Gtk.HBox(); this.hbox3.Name = "hbox3"; // Container child hbox3.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><toolbar name='toolbox1'/></ui>"); this.toolbox1 = ((Gtk.Toolbar)(this.UIManager.GetWidget("/toolbox1"))); this.toolbox1.Name = "toolbox1"; this.toolbox1.Orientation = ((Gtk.Orientation)(1)); this.toolbox1.ShowArrow = false; this.toolbox1.ToolbarStyle = ((Gtk.ToolbarStyle)(0)); this.toolbox1.IconSize = ((Gtk.IconSize)(2)); this.hbox3.Add(this.toolbox1); Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox3[this.toolbox1])); w6.Position = 0; w6.Expand = false; w6.Fill = false; // Container child hbox3.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><toolbar name='toolbox2'/></ui>"); this.toolbox2 = ((Gtk.Toolbar)(this.UIManager.GetWidget("/toolbox2"))); this.toolbox2.Name = "toolbox2"; this.toolbox2.Orientation = ((Gtk.Orientation)(1)); this.toolbox2.ShowArrow = false; this.toolbox2.ToolbarStyle = ((Gtk.ToolbarStyle)(0)); this.toolbox2.IconSize = ((Gtk.IconSize)(2)); this.hbox3.Add(this.toolbox2); Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox3[this.toolbox2])); w7.Position = 1; w7.Expand = false; w7.Fill = false; this.vbox3.Add(this.hbox3); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3])); w8.PackType = ((Gtk.PackType)(1)); w8.Position = 1; w8.Expand = false; w8.Fill = false; this.hbox2.Add(this.vbox3); Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox3])); w9.Position = 0; w9.Expand = false; w9.Fill = false; // Container child hbox2.Gtk.Box+BoxChild this.GtkScrolledWindow = new Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild Gtk.Viewport w10 = new Gtk.Viewport(); w10.ShadowType = ((Gtk.ShadowType)(0)); // Container child GtkViewport.Gtk.Container+ContainerChild this.drawingarea1 = new Gtk.DrawingArea(); this.drawingarea1.CanDefault = true; this.drawingarea1.CanFocus = true; this.drawingarea1.Events = ((Gdk.EventMask)(16134)); this.drawingarea1.Name = "drawingarea1"; w10.Add(this.drawingarea1); this.GtkScrolledWindow.Add(w10); this.hbox2.Add(this.GtkScrolledWindow); Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox2[this.GtkScrolledWindow])); w13.Position = 1; // Container child hbox2.Gtk.Box+BoxChild this.vbox2 = new Gtk.VBox(); this.vbox2.Name = "vbox2"; // Container child vbox2.Gtk.Box+BoxChild this.label1 = new Gtk.Label(); this.label1.Name = "label1"; this.label1.LabelProp = Mono.Unix.Catalog.GetString("Layers:"); this.vbox2.Add(this.label1); Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox2[this.label1])); w14.Position = 0; w14.Expand = false; w14.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.layerslistwidget1 = new Pinta.LayersListWidget(); this.layerslistwidget1.Name = "layerslistwidget1"; this.vbox2.Add(this.layerslistwidget1); Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox2[this.layerslistwidget1])); w15.Position = 1; w15.Expand = false; w15.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><toolbar name='toolbar4'/></ui>"); this.toolbar4 = ((Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar4"))); this.toolbar4.Name = "toolbar4"; this.toolbar4.ShowArrow = false; this.toolbar4.ToolbarStyle = ((Gtk.ToolbarStyle)(0)); this.toolbar4.IconSize = ((Gtk.IconSize)(1)); this.vbox2.Add(this.toolbar4); Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.vbox2[this.toolbar4])); w16.Position = 2; w16.Expand = false; w16.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.GtkScrolledWindow1 = new Gtk.ScrolledWindow(); this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; this.GtkScrolledWindow1.ShadowType = ((Gtk.ShadowType)(1)); // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild this.history_treeview = new Gtk.TreeView(); this.history_treeview.CanFocus = true; this.history_treeview.Name = "history_treeview"; this.GtkScrolledWindow1.Add(this.history_treeview); this.vbox2.Add(this.GtkScrolledWindow1); Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow1])); w18.Position = 3; // Container child vbox2.Gtk.Box+BoxChild this.UIManager.AddUiFromString("<ui><toolbar name='toolbar2'/></ui>"); this.toolbar2 = ((Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar2"))); this.toolbar2.Name = "toolbar2"; this.toolbar2.ShowArrow = false; this.toolbar2.ToolbarStyle = ((Gtk.ToolbarStyle)(0)); this.toolbar2.IconSize = ((Gtk.IconSize)(1)); this.vbox2.Add(this.toolbar2); Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox2[this.toolbar2])); w19.Position = 4; w19.Expand = false; w19.Fill = false; this.hbox2.Add(this.vbox2); Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox2])); w20.Position = 2; w20.Expand = false; w20.Fill = false; this.hbox1.Add(this.hbox2); Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.hbox1[this.hbox2])); w21.Position = 0; this.vbox1.Add(this.hbox1); Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); w22.Position = 3; // Container child vbox1.Gtk.Box+BoxChild this.statusbar1 = new Gtk.Statusbar(); this.statusbar1.Name = "statusbar1"; this.statusbar1.Spacing = 6; // Container child statusbar1.Gtk.Box+BoxChild this.label5 = new Gtk.Label(); this.label5.Name = "label5"; this.label5.LabelProp = Mono.Unix.Catalog.GetString(" Paintbrush: Left click to draw with primary color, right click to draw with secondary color"); this.label5.Justify = ((Gtk.Justification)(3)); this.label5.SingleLineMode = true; this.statusbar1.Add(this.label5); Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.statusbar1[this.label5])); w23.Position = 0; w23.Expand = false; w23.Fill = false; // Container child statusbar1.Gtk.Box+BoxChild this.CursorPositionLabel = new Gtk.Label(); this.CursorPositionLabel.Name = "CursorPositionLabel"; this.CursorPositionLabel.LabelProp = Mono.Unix.Catalog.GetString("0, 0"); this.statusbar1.Add(this.CursorPositionLabel); Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(this.statusbar1[this.CursorPositionLabel])); w24.Position = 3; w24.Expand = false; w24.Fill = false; this.vbox1.Add(this.statusbar1); Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); w25.Position = 4; w25.Expand = false; w25.Fill = false; this.Add(this.vbox1); if ((this.Child != null)) { this.Child.ShowAll(); } this.drawingarea1.HasDefault = true; this.Show(); this.drawingarea1.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnDrawingarea1ButtonPressEvent); this.drawingarea1.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(this.OnDrawingarea1ButtonReleaseEvent); this.drawingarea1.MotionNotifyEvent += new Gtk.MotionNotifyEventHandler(this.OnDrawingarea1MotionNotifyEvent); this.drawingarea1.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingarea1ExposeEvent); this.drawingarea1.KeyPressEvent += new Gtk.KeyPressEventHandler(this.OnDrawingarea1KeyPressEvent); this.drawingarea1.KeyReleaseEvent += new Gtk.KeyReleaseEventHandler(this.OnDrawingarea1KeyReleaseEvent); }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget LinuxGUITest.WiimoteInformation Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this); Gtk.UIManager w2 = new Gtk.UIManager(); Gtk.ActionGroup w3 = new Gtk.ActionGroup("Default"); this.WiiMoteAction = new Gtk.Action("WiiMoteAction", Mono.Unix.Catalog.GetString("WiiMote"), null, null); this.WiiMoteAction.ShortLabel = Mono.Unix.Catalog.GetString("Tools"); w3.Add(this.WiiMoteAction, null); this.DisconnectAction = new Gtk.Action("DisconnectAction", Mono.Unix.Catalog.GetString("Disconnect"), null, null); this.DisconnectAction.HideIfEmpty = false; this.DisconnectAction.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect"); w3.Add(this.DisconnectAction, null); this.PlaySoundAction = new Gtk.Action("PlaySoundAction", Mono.Unix.Catalog.GetString("Play sound"), null, null); this.PlaySoundAction.ShortLabel = Mono.Unix.Catalog.GetString("Play sound"); w3.Add(this.PlaySoundAction, null); this.DumpMemoryAction = new Gtk.Action("DumpMemoryAction", Mono.Unix.Catalog.GetString("Dump memory..."), null, null); this.DumpMemoryAction.ShortLabel = Mono.Unix.Catalog.GetString("Dump memory"); w3.Add(this.DumpMemoryAction, null); this.DisconnectAction1 = new Gtk.Action("DisconnectAction1", Mono.Unix.Catalog.GetString("Disconnect"), null, null); this.DisconnectAction1.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect"); w3.Add(this.DisconnectAction1, null); this.CalibrateAction = new Gtk.Action("CalibrateAction", Mono.Unix.Catalog.GetString("Calibrate..."), null, null); this.CalibrateAction.ShortLabel = Mono.Unix.Catalog.GetString("Calibrate..."); w3.Add(this.CalibrateAction, null); w2.InsertActionGroup(w3, 0); this.Name = "LinuxGUITest.WiimoteInformation"; // Container child LinuxGUITest.WiimoteInformation.Gtk.Container+ContainerChild this.vbox1 = new Gtk.VBox(); this.vbox1.Name = "vbox1"; this.vbox1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild w2.AddUiFromString("<ui><menubar name='menubar1'><menu action='WiiMoteAction'><menuitem action='DisconnectAction1'/><menuitem action='DumpMemoryAction'/><menuitem action='CalibrateAction'/></menu></menubar></ui>"); this.menubar1 = ((Gtk.MenuBar)(w2.GetWidget("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox1.Add(this.menubar1); Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); w4.Position = 0; w4.Expand = false; w4.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox5 = new Gtk.HBox(); this.hbox5.Name = "hbox5"; this.hbox5.Spacing = 6; // Container child hbox5.Gtk.Box+BoxChild this.lblReportingMode = new Gtk.Label(); this.lblReportingMode.Name = "lblReportingMode"; this.lblReportingMode.LabelProp = Mono.Unix.Catalog.GetString("Reporting Mode"); this.hbox5.Add(this.lblReportingMode); Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox5[this.lblReportingMode])); w5.Position = 0; w5.Expand = false; w5.Fill = false; // Container child hbox5.Gtk.Box+BoxChild this.comboboxReportingMode = Gtk.ComboBox.NewText(); this.comboboxReportingMode.Name = "comboboxReportingMode"; this.hbox5.Add(this.comboboxReportingMode); Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox5[this.comboboxReportingMode])); w6.Position = 1; this.vbox1.Add(this.hbox5); Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox5])); w7.Position = 1; w7.Expand = false; w7.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox4 = new Gtk.HBox(); this.hbox4.Name = "hbox4"; this.hbox4.Spacing = 6; // Container child hbox4.Gtk.Box+BoxChild this.lblButtons = new Gtk.Label(); this.lblButtons.Name = "lblButtons"; this.lblButtons.LabelProp = Mono.Unix.Catalog.GetString("Buttons"); this.hbox4.Add(this.lblButtons); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox4[this.lblButtons])); w8.Position = 0; w8.Expand = false; w8.Fill = false; // Container child hbox4.Gtk.Box+BoxChild this.entryButtons = new Gtk.Entry(); this.entryButtons.CanFocus = true; this.entryButtons.Name = "entryButtons"; this.entryButtons.IsEditable = false; this.entryButtons.InvisibleChar = '●'; this.hbox4.Add(this.entryButtons); Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox4[this.entryButtons])); w9.Position = 1; this.vbox1.Add(this.hbox4); Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox4])); w10.Position = 2; w10.Expand = false; w10.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.frame1 = new Gtk.Frame(); this.frame1.Name = "frame1"; this.frame1.ShadowType = ((Gtk.ShadowType)(0)); // Container child frame1.Gtk.Container+ContainerChild this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment.Name = "GtkAlignment"; this.GtkAlignment.LeftPadding = ((uint)(12)); // Container child GtkAlignment.Gtk.Container+ContainerChild this.drawingareaIR = new Gtk.DrawingArea(); this.drawingareaIR.HeightRequest = 100; this.drawingareaIR.Name = "drawingareaIR"; this.GtkAlignment.Add(this.drawingareaIR); this.frame1.Add(this.GtkAlignment); this.GtkLabel3 = new Gtk.Label(); this.GtkLabel3.Name = "GtkLabel3"; this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>IR points</b>"); this.GtkLabel3.UseMarkup = true; this.frame1.LabelWidget = this.GtkLabel3; this.vbox1.Add(this.frame1); Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1])); w13.Position = 3; // Container child vbox1.Gtk.Box+BoxChild this.frame2 = new Gtk.Frame(); this.frame2.Name = "frame2"; this.frame2.ShadowType = ((Gtk.ShadowType)(0)); // Container child frame2.Gtk.Container+ContainerChild this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment1.Name = "GtkAlignment1"; this.GtkAlignment1.LeftPadding = ((uint)(12)); // Container child GtkAlignment1.Gtk.Container+ContainerChild this.hbox6 = new Gtk.HBox(); this.hbox6.Name = "hbox6"; this.hbox6.Spacing = 6; // Container child hbox6.Gtk.Box+BoxChild this.entryX = new Gtk.Entry(); this.entryX.WidthRequest = 80; this.entryX.CanFocus = true; this.entryX.Name = "entryX"; this.entryX.IsEditable = false; this.entryX.InvisibleChar = '●'; this.hbox6.Add(this.entryX); Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.hbox6[this.entryX])); w14.Position = 0; w14.Expand = false; // Container child hbox6.Gtk.Box+BoxChild this.entryY = new Gtk.Entry(); this.entryY.WidthRequest = 80; this.entryY.CanFocus = true; this.entryY.Name = "entryY"; this.entryY.IsEditable = false; this.entryY.InvisibleChar = '●'; this.hbox6.Add(this.entryY); Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox6[this.entryY])); w15.Position = 1; w15.Expand = false; // Container child hbox6.Gtk.Box+BoxChild this.entryZ = new Gtk.Entry(); this.entryZ.WidthRequest = 80; this.entryZ.CanFocus = true; this.entryZ.Name = "entryZ"; this.entryZ.IsEditable = false; this.entryZ.InvisibleChar = '●'; this.hbox6.Add(this.entryZ); Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox6[this.entryZ])); w16.Position = 2; w16.Expand = false; w16.Fill = false; this.GtkAlignment1.Add(this.hbox6); this.frame2.Add(this.GtkAlignment1); this.GtkLabel4 = new Gtk.Label(); this.GtkLabel4.Name = "GtkLabel4"; this.GtkLabel4.LabelProp = Mono.Unix.Catalog.GetString("<b>Accelerometers</b>"); this.GtkLabel4.UseMarkup = true; this.frame2.LabelWidget = this.GtkLabel4; this.vbox1.Add(this.frame2); Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2])); w19.Position = 4; w19.Expand = false; w19.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.frame3 = new Gtk.Frame(); this.frame3.Name = "frame3"; this.frame3.ShadowType = ((Gtk.ShadowType)(0)); // Container child frame3.Gtk.Container+ContainerChild this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment2.Name = "GtkAlignment2"; this.GtkAlignment2.LeftPadding = ((uint)(12)); this.frame3.Add(this.GtkAlignment2); this.GtkLabel1 = new Gtk.Label(); this.GtkLabel1.Name = "GtkLabel1"; this.GtkLabel1.LabelProp = Mono.Unix.Catalog.GetString("<b>Extension</b>"); this.GtkLabel1.UseMarkup = true; this.frame3.LabelWidget = this.GtkLabel1; this.vbox1.Add(this.frame3); Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame3])); w21.Position = 5; // Container child vbox1.Gtk.Box+BoxChild this.hbox2 = new Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild this.checkboxLed1 = new Gtk.CheckButton(); this.checkboxLed1.CanFocus = true; this.checkboxLed1.Name = "checkboxLed1"; this.checkboxLed1.Label = Mono.Unix.Catalog.GetString("Led1"); this.checkboxLed1.DrawIndicator = true; this.checkboxLed1.UseUnderline = true; this.hbox2.Add(this.checkboxLed1); Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.hbox2[this.checkboxLed1])); w22.Position = 0; w22.Expand = false; // Container child hbox2.Gtk.Box+BoxChild this.checkboxLed2 = new Gtk.CheckButton(); this.checkboxLed2.CanFocus = true; this.checkboxLed2.Name = "checkboxLed2"; this.checkboxLed2.Label = Mono.Unix.Catalog.GetString("Led 2"); this.checkboxLed2.DrawIndicator = true; this.checkboxLed2.UseUnderline = true; this.hbox2.Add(this.checkboxLed2); Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.hbox2[this.checkboxLed2])); w23.Position = 1; w23.Expand = false; // Container child hbox2.Gtk.Box+BoxChild this.checkboxLed3 = new Gtk.CheckButton(); this.checkboxLed3.CanFocus = true; this.checkboxLed3.Name = "checkboxLed3"; this.checkboxLed3.Label = Mono.Unix.Catalog.GetString("Led 3"); this.checkboxLed3.DrawIndicator = true; this.checkboxLed3.UseUnderline = true; this.hbox2.Add(this.checkboxLed3); Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(this.hbox2[this.checkboxLed3])); w24.Position = 2; w24.Expand = false; // Container child hbox2.Gtk.Box+BoxChild this.checkboxLed4 = new Gtk.CheckButton(); this.checkboxLed4.CanFocus = true; this.checkboxLed4.Name = "checkboxLed4"; this.checkboxLed4.Label = Mono.Unix.Catalog.GetString("Led 4"); this.checkboxLed4.DrawIndicator = true; this.checkboxLed4.UseUnderline = true; this.hbox2.Add(this.checkboxLed4); Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.hbox2[this.checkboxLed4])); w25.Position = 3; // Container child hbox2.Gtk.Box+BoxChild this.checkboxRumble = new Gtk.CheckButton(); this.checkboxRumble.CanFocus = true; this.checkboxRumble.Name = "checkboxRumble"; this.checkboxRumble.Label = Mono.Unix.Catalog.GetString("Rumble"); this.checkboxRumble.DrawIndicator = true; this.checkboxRumble.UseUnderline = true; this.hbox2.Add(this.checkboxRumble); Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.hbox2[this.checkboxRumble])); w26.Position = 4; w26.Expand = false; this.vbox1.Add(this.hbox2); Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); w27.Position = 6; w27.Expand = false; w27.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox3 = new Gtk.HBox(); this.hbox3.Name = "hbox3"; this.hbox3.Spacing = 6; // Container child hbox3.Gtk.Box+BoxChild this.btnUpdateBattery = new Gtk.Button(); this.btnUpdateBattery.CanFocus = true; this.btnUpdateBattery.Name = "btnUpdateBattery"; this.btnUpdateBattery.UseUnderline = true; this.btnUpdateBattery.Label = Mono.Unix.Catalog.GetString("Update Battery"); this.hbox3.Add(this.btnUpdateBattery); Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.hbox3[this.btnUpdateBattery])); w28.Position = 0; w28.Expand = false; w28.Fill = false; // Container child hbox3.Gtk.Box+BoxChild this.progressbarBattery = new Gtk.ProgressBar(); this.progressbarBattery.Name = "progressbarBattery"; this.hbox3.Add(this.progressbarBattery); Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox3[this.progressbarBattery])); w29.Position = 1; this.vbox1.Add(this.hbox3); Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox3])); w30.Position = 7; w30.Expand = false; w30.Fill = false; this.Add(this.vbox1); if ((this.Child != null)) { this.Child.ShowAll(); } w1.SetUiManager(w2); this.Show(); this.DisconnectAction.Activated += new System.EventHandler(this.OnDisconnectActionActivated); this.PlaySoundAction.Activated += new System.EventHandler(this.OnPlaySoundActionActivated); this.DumpMemoryAction.Activated += new System.EventHandler(this.OnDumpMemoryActionActivated); this.DisconnectAction1.Activated += new System.EventHandler(this.OnDisconnectActionActivated); this.CalibrateAction.Activated += new System.EventHandler(this.OnCalibrateActionActivated); this.comboboxReportingMode.Changed += new System.EventHandler(this.OnComboboxReportingModeChanged); this.drawingareaIR.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingareaIRExposeEvent); this.checkboxLed1.Pressed += new System.EventHandler(this.OnCheckboxLed1Pressed); this.checkboxLed2.Pressed += new System.EventHandler(this.OnCheckboxLed2Pressed); this.checkboxLed3.Pressed += new System.EventHandler(this.OnCheckboxLed3Pressed); this.checkboxLed4.Pressed += new System.EventHandler(this.OnCheckboxLed4Pressed); this.checkboxRumble.Pressed += new System.EventHandler(this.OnCheckboxRumblePressed); this.btnUpdateBattery.Pressed += new System.EventHandler(this.OnBtnUpdateBatteryPressed); }
public WindowView(Main _view, Controller.Window _ctl) { View = _view; Window = _ctl; Homogeneous = false; Spacing = 0; BorderWidth = 0; var topLevelBox = new Gtk.VBox(); topLevelBox.Homogeneous = false; topLevelBox.Spacing = 0; topLevelBox.BorderWidth = 0; textView = new WindowTextView(Window); scroll = new Gtk.ScrolledWindow { HscrollbarPolicy = Gtk.PolicyType.Automatic, VscrollbarPolicy = Gtk.PolicyType.Automatic }; scroll.Add(textView); Window.CursorMovedByCommand.Add(i => { textView.ScrollToIter(i.GtkIter, 0, false, 0, 0); }); topLevelBox.PackStart(scroll, true, true, 0); status = new Gtk.Statusbar(); status.HasResizeGrip = false; status.Push(StatusbarMode, Window.CurrentMode.GetName()); Window.CurrentMode.Event.Changed += m => { status.Pop(StatusbarMode); status.Push(StatusbarMode, Window.CurrentMode.GetName()); }; Window.Model.Changed += m => { textView.Buffer = m; }; topLevelBox.PackStart(status, false, false, 0); // Wrap the topLevelBox with borders on the left and right var hlBox = new Gtk.DrawingArea(); NormalColor = hlBox.Style.Background(Gtk.StateType.Normal); hlBox.WidthRequest = 10; var borderBox = new Gtk.HBox(); borderBox.Homogeneous = false; borderBox.Spacing = 0; borderBox.BorderWidth = 0; borderBox.PackStart(hlBox, false, false, 0); borderBox.PackStart(topLevelBox, true, true, 0); textView.FocusInEvent += (object o, Gtk.FocusInEventArgs args) => { Window.Controller.FocusedWindow.Value = Window; hlBox.ModifyBg(Gtk.StateType.Normal, HighlightColor); }; textView.FocusOutEvent += (object o, Gtk.FocusOutEventArgs args) => { hlBox.ModifyBg(Gtk.StateType.Normal, NormalColor); }; Add(borderBox); }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget RoboWarX.GTK.RobotWidget Stetic.BinContainer.Attach(this); this.Name = "RoboWarX.GTK.RobotWidget"; // Container child RoboWarX.GTK.RobotWidget.Gtk.Container+ContainerChild this.hbox1 = new Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild this.iconbox = new Gtk.DrawingArea(); this.iconbox.WidthRequest = 32; this.iconbox.HeightRequest = 32; this.iconbox.Name = "iconbox"; this.hbox1.Add(this.iconbox); Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.iconbox])); w1.Position = 0; w1.Expand = false; // Container child hbox1.Gtk.Box+BoxChild this.namelabel = new Gtk.Label(); this.namelabel.Name = "namelabel"; this.namelabel.Xalign = 0F; this.namelabel.LabelProp = Mono.Unix.Catalog.GetString("<big><b>Name</b></big>"); this.namelabel.UseMarkup = true; this.hbox1.Add(this.namelabel); Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.namelabel])); w2.Position = 1; // Container child hbox1.Gtk.Box+BoxChild this.hbox2 = new Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 12; // Container child hbox2.Gtk.Box+BoxChild this.statuslabel1 = new Gtk.Label(); this.statuslabel1.Name = "statuslabel1"; this.statuslabel1.Xalign = 1F; this.statuslabel1.LabelProp = Mono.Unix.Catalog.GetString("Status:\nStatus:"); this.statuslabel1.Justify = ((Gtk.Justification)(1)); this.hbox2.Add(this.statuslabel1); Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox2[this.statuslabel1])); w3.Position = 0; w3.Expand = false; // Container child hbox2.Gtk.Box+BoxChild this.statuslabel2 = new Gtk.Label(); this.statuslabel2.Name = "statuslabel2"; this.statuslabel2.Xalign = 1F; this.statuslabel2.LabelProp = Mono.Unix.Catalog.GetString("___\n___"); this.statuslabel2.Justify = ((Gtk.Justification)(1)); this.hbox2.Add(this.statuslabel2); Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox2[this.statuslabel2])); w4.Position = 1; this.hbox1.Add(this.hbox2); Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox1[this.hbox2])); w5.PackType = ((Gtk.PackType)(1)); w5.Position = 2; w5.Expand = false; this.Add(this.hbox1); if ((this.Child != null)) { this.Child.ShowAll(); } this.Show(); this.iconbox.ExposeEvent += new Gtk.ExposeEventHandler(this.OnIconboxExposeEvent); }
protected virtual void Build() { Stetic.Gui.Initialize(this); // Widget Pinta.CurvesDialog this.Name = "Pinta.CurvesDialog"; this.Title = Mono.Unix.Catalog.GetString("Curves"); this.WindowPosition = ((Gtk.WindowPosition)(4)); this.Resizable = false; this.AllowGrow = false; this.SkipTaskbarHint = true; // Internal child Pinta.CurvesDialog.VBox Gtk.VBox w1 = this.VBox; w1.Name = "dialog1_VBox"; w1.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild this.hbox1 = new Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild this.labelMap = new Gtk.Label(); this.labelMap.Name = "labelMap"; this.labelMap.LabelProp = Mono.Unix.Catalog.GetString("Transfer Map"); this.hbox1.Add(this.labelMap); Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.labelMap])); w2.Position = 0; w2.Expand = false; w2.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.hseparatorMap = new Gtk.HSeparator(); this.hseparatorMap.Name = "hseparatorMap"; this.hbox1.Add(this.hseparatorMap); Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.hseparatorMap])); w3.Position = 1; w1.Add(this.hbox1); Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.hbox1])); w4.Position = 0; w4.Expand = false; w4.Fill = false; // Container child dialog1_VBox.Gtk.Box+BoxChild this.hbox2 = new Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild this.comboMap = Gtk.ComboBox.NewText(); this.comboMap.AppendText(Mono.Unix.Catalog.GetString("RGB")); this.comboMap.AppendText(Mono.Unix.Catalog.GetString("Luminosity")); this.comboMap.Name = "comboMap"; this.comboMap.Active = 1; this.hbox2.Add(this.comboMap); Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.comboMap])); w5.Position = 0; w5.Expand = false; w5.Fill = false; // Container child hbox2.Gtk.Box+BoxChild this.alignment3 = new Gtk.Alignment(1F, 0.5F, 0F, 0F); this.alignment3.Name = "alignment3"; // Container child alignment3.Gtk.Container+ContainerChild this.labelPoint = new Gtk.Label(); this.labelPoint.Name = "labelPoint"; this.labelPoint.LabelProp = Mono.Unix.Catalog.GetString("(256, 256)"); this.alignment3.Add(this.labelPoint); this.hbox2.Add(this.alignment3); Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox2[this.alignment3])); w7.PackType = ((Gtk.PackType)(1)); w7.Position = 2; w7.Expand = false; w7.Fill = false; w1.Add(this.hbox2); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w1[this.hbox2])); w8.Position = 1; w8.Expand = false; w8.Fill = false; // Container child dialog1_VBox.Gtk.Box+BoxChild this.drawing = new Gtk.DrawingArea(); this.drawing.WidthRequest = 256; this.drawing.HeightRequest = 256; this.drawing.CanFocus = true; this.drawing.Events = ((Gdk.EventMask)(795646)); this.drawing.Name = "drawing"; w1.Add(this.drawing); Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[this.drawing])); w9.Position = 2; w9.Padding = ((uint)(8)); // Container child dialog1_VBox.Gtk.Box+BoxChild this.hbox3 = new Gtk.HBox(); this.hbox3.Name = "hbox3"; // Container child hbox3.Gtk.Box+BoxChild this.checkRed = new Gtk.CheckButton(); this.checkRed.CanFocus = true; this.checkRed.Name = "checkRed"; this.checkRed.Label = Mono.Unix.Catalog.GetString("Red "); this.checkRed.Active = true; this.checkRed.DrawIndicator = true; this.checkRed.UseUnderline = true; this.hbox3.Add(this.checkRed); Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox3[this.checkRed])); w10.Position = 0; // Container child hbox3.Gtk.Box+BoxChild this.checkGreen = new Gtk.CheckButton(); this.checkGreen.CanFocus = true; this.checkGreen.Name = "checkGreen"; this.checkGreen.Label = Mono.Unix.Catalog.GetString("Green"); this.checkGreen.Active = true; this.checkGreen.DrawIndicator = true; this.checkGreen.UseUnderline = true; this.hbox3.Add(this.checkGreen); Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox3[this.checkGreen])); w11.Position = 1; // Container child hbox3.Gtk.Box+BoxChild this.checkBlue = new Gtk.CheckButton(); this.checkBlue.CanFocus = true; this.checkBlue.Name = "checkBlue"; this.checkBlue.Label = Mono.Unix.Catalog.GetString("Blue "); this.checkBlue.Active = true; this.checkBlue.DrawIndicator = true; this.checkBlue.UseUnderline = true; this.hbox3.Add(this.checkBlue); Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox3[this.checkBlue])); w12.Position = 2; // Container child hbox3.Gtk.Box+BoxChild this.alignment1 = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F); this.alignment1.Name = "alignment1"; this.hbox3.Add(this.alignment1); Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox3[this.alignment1])); w13.Position = 3; // Container child hbox3.Gtk.Box+BoxChild this.buttonReset = new Gtk.Button(); this.buttonReset.WidthRequest = 81; this.buttonReset.HeightRequest = 30; this.buttonReset.CanFocus = true; this.buttonReset.Name = "buttonReset"; this.buttonReset.UseUnderline = true; this.buttonReset.Label = Mono.Unix.Catalog.GetString("Reset"); this.hbox3.Add(this.buttonReset); Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.hbox3[this.buttonReset])); w14.Position = 4; w14.Expand = false; w14.Fill = false; w1.Add(this.hbox3); Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(w1[this.hbox3])); w15.Position = 3; w15.Expand = false; w15.Fill = false; // Container child dialog1_VBox.Gtk.Box+BoxChild this.labelTip = new Gtk.Label(); this.labelTip.Name = "labelTip"; this.labelTip.LabelProp = Mono.Unix.Catalog.GetString("Tip : Right-click to remove control points."); w1.Add(this.labelTip); Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(w1[this.labelTip])); w16.Position = 4; w16.Expand = false; w16.Fill = false; // Internal child Pinta.CurvesDialog.ActionArea Gtk.HButtonBox w17 = this.ActionArea; w17.Name = "dialog1_ActionArea"; w17.Spacing = 10; w17.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.buttonCancel = new Gtk.Button(); this.buttonCancel.CanDefault = true; this.buttonCancel.CanFocus = true; this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.UseStock = true; this.buttonCancel.UseUnderline = true; this.buttonCancel.Label = "gtk-cancel"; this.AddActionWidget(this.buttonCancel, -6); Gtk.ButtonBox.ButtonBoxChild w18 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonCancel])); w18.Expand = false; w18.Fill = false; // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.buttonOk = new Gtk.Button(); this.buttonOk.CanDefault = true; this.buttonOk.CanFocus = true; this.buttonOk.Name = "buttonOk"; this.buttonOk.UseStock = true; this.buttonOk.UseUnderline = true; this.buttonOk.Label = "gtk-ok"; this.AddActionWidget(this.buttonOk, -5); Gtk.ButtonBox.ButtonBoxChild w19 = ((Gtk.ButtonBox.ButtonBoxChild)(w17[this.buttonOk])); w19.Position = 1; w19.Expand = false; w19.Fill = false; if ((this.Child != null)) { this.Child.ShowAll(); } this.DefaultWidth = 269; this.DefaultHeight = 418; this.checkRed.Hide(); this.checkGreen.Hide(); this.checkBlue.Hide(); this.Show(); }
public WindowView(Main _view, Controller.Window _ctl) { View = _view; Window = _ctl; Homogeneous = false; Spacing = 0; BorderWidth = 0; var topLevelBox = new Gtk.VBox(); topLevelBox.Homogeneous = false; topLevelBox.Spacing = 0; topLevelBox.BorderWidth = 0; textView = new WindowTextView(Window); scroll = new Gtk.ScrolledWindow { HscrollbarPolicy = Gtk.PolicyType.Automatic, VscrollbarPolicy = Gtk.PolicyType.Automatic }; scroll.Add(textView); Window.CursorMovedByCommand.Add(i => { textView.ScrollToIter(i.GtkIter, 0, false, 0, 0); }); topLevelBox.PackStart(scroll, true, true, 0); status = new MultiStatusbar(); status.Add(StatusbarItem.Create(100, () => Window.CurrentMode.GetName(), Window.CurrentMode.Changed)); status.Add(StatusbarItem.Create(50, Window.Model.Value.HasUnsavedChanges, b => b ? "" : "Saved")); status.AddLast(StatusbarItem.Create(400, Window.Model.Value.File.ProjectRelativeFullName())); topLevelBox.PackStart(status, false, false, 0); Window.Model.Changed += m => { textView.Buffer = m; }; // Wrap the topLevelBox with borders on the left and right var hlBox = new Gtk.DrawingArea(); NormalColor = hlBox.Style.Background(Gtk.StateType.Normal); hlBox.WidthRequest = 10; var borderBox = new Gtk.HBox(); borderBox.Homogeneous = false; borderBox.Spacing = 0; borderBox.BorderWidth = 0; borderBox.PackStart(hlBox, false, false, 0); borderBox.PackStart(topLevelBox, true, true, 0); textView.FocusInEvent += (object o, Gtk.FocusInEventArgs args) => { Window.Controller.Windows.Current = Window; hlBox.ModifyBg(Gtk.StateType.Normal, HighlightColor); }; textView.FocusOutEvent += (object o, Gtk.FocusOutEventArgs args) => { hlBox.ModifyBg(Gtk.StateType.Normal, NormalColor); }; Add(borderBox); }