protected override void Layout() { base.Layout(); Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 22; Rectangle rec1 = rec0; rec1.X = rec0.Left + 1; rec1.Y = rec0.Bottom - 22; rec1.Width = (rec0.Width) / 3 + 1; rec1.Height = 22; rec1.Inflate(-2, -2); //Rectangle rec2 = rec1; //rec2.X = rec1.Right + 2; //Rectangle rec3 = rec1; //rec3.X = rec2.Right + 2; Bounds = rec0; ButtonBounds = rec1; //ButtonBounds2 = rec2; //ButtonBounds3 = rec3; }
protected override void Layout() { base.Layout(); Rectangle global_rec = GH_Convert.ToRectangle(Bounds); int height = 27; int radi1 = 7; int radi2 = 40; int pitchy = 15; global_rec.Height += height; ///global_rec.Width = width; radio_rec = global_rec; radio_rec.Y = radio_rec.Bottom - height; radio_rec.Height = 27; text_rec_1 = radio_rec; ///text_rec_1.X += 5; text_rec_1.Height = radi2; text_rec_1.Width = radi2; text_rec_2 = text_rec_1; text_rec_2.X += radi2; radio_rec_1 = text_rec_1; radio_rec_1.Height = radi1; radio_rec_1.Width = radi1; radio_rec_1.X += 17; radio_rec_1.Y += pitchy; radio_rec_2 = radio_rec_1; radio_rec_2.X += radi2; Bounds = global_rec; }
public InputBoxBalloon(RectangleF bounds, Action <string> setValue) { this.SetValue = setValue; Bounds = GH_Convert.ToRectangle(bounds); Font = GH_FontServer.ConsoleAdjusted; }
/// <summary> /// LAYOUT DRAWING /// </summary> protected override void Layout() { base.Layout(); rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 5; System.Drawing.Rectangle rec1 = rec0; rec1.Width = rec0.Width / 2; rec1.Y = rec0.Bottom - 5; rec1.Height = 5; rec1.Inflate(0, 0); System.Drawing.Rectangle rec2 = rec0; if (rec0.Width % 2 == 0) { rec2.X = rec0.Right - rec0.Width / 2; rec2.Width = rec0.Width / 2; } else { rec2.X = -1 + rec0.Right - rec0.Width / 2; rec2.Width = 1 + rec0.Width / 2; } rec2.Y = rec0.Bottom - 5; rec2.Height = 5; rec2.Inflate(0, 0); Bounds = rec0; ButtonBounds = rec1; ButtonBounds2 = rec2; }
protected override void Layout() { base.Layout(); // コンポーネントのサイズを取得し、ボタン分の長さをプラス(+44)する Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 44; // 22の高さの長方形を配置する Rectangle rec1 = rec0; rec1.Y = rec1.Bottom - 44; rec1.Height = 22; rec1.Inflate(-2, -2); Rectangle rec2 = rec0; rec2.Y = rec0.Bottom - 22; rec2.Height = 22; rec2.Inflate(-2, -2); Bounds = rec0; ButtonBounds = rec1; ButtonBounds2 = rec2; }
protected override void Render(GH_Canvas canvas, Graphics graphics, GH_CanvasChannel channel) { if (channel != GH_CanvasChannel.Objects) { base.Render(canvas, graphics, channel); } else { GH_Skin.palette_hidden_standard = Runway_Interface.Hds.Normal; GH_Skin.palette_hidden_selected = Runway_Interface.Hds.Selected; GH_Skin.palette_warning_standard = Runway_Interface.Hds.Warning; GH_Skin.palette_warning_selected = Runway_Interface.Hds.Selected; GH_Skin.palette_error_standard = Runway_Interface.Hds.Error; GH_Skin.palette_error_selected = Runway_Interface.Hds.Selected; RenderComponentCapsule(canvas, graphics, true, false, false, true, true, false); GH_Skin.palette_hidden_standard = Runway_Interface.Hds.StyleStandard; GH_Skin.palette_hidden_selected = Runway_Interface.Hds.StyleStyleSelected; GH_Skin.palette_warning_standard = Runway_Interface.Hds.StyleWStandard; GH_Skin.palette_warning_selected = Runway_Interface.Hds.StyleWSelected; GH_Skin.palette_error_standard = Runway_Interface.Hds.StyleEStandard; GH_Skin.palette_error_selected = Runway_Interface.Hds.StyleESelected; var rectangle1 = GH_Convert.ToRectangle(m_innerBounds); if (GH_Canvas.ZoomFadeLow > 0) { graphics.DrawImage(CanvasImage, rectangle1); } if (GH_Canvas.ZoomFadeLow < .67) { graphics.DrawImage(Properties.Resources.RunwayImage, rectangle1); } } }
protected override void Layout() { base.Layout(); Rectangle global_rec = GH_Convert.ToRectangle(Bounds); int height = 40; int radi1 = 7; int radi2 = 4; int pitchx = 8; int pitchy = 11; int textheight = 20; global_rec.Height += height; int width = global_rec.Width; radio_rec = global_rec; radio_rec.Y = radio_rec.Bottom - height; radio_rec.Height = height; radio_rec_1 = radio_rec; radio_rec_1.X += 5; radio_rec_1.Y += 5; radio_rec_1.Height = radi1; radio_rec_1.Width = radi1; text_rec_1 = radio_rec_1; text_rec_1.X += pitchx; text_rec_1.Y -= radi2; text_rec_1.Height = textheight; text_rec_1.Width = width; radio_rec_2 = radio_rec_1; radio_rec_2.Y += pitchy; text_rec_2 = radio_rec_2; text_rec_2.X += pitchx; text_rec_2.Y -= radi2; text_rec_2.Height = textheight; text_rec_2.Width = width; radio_rec_3 = radio_rec_2; radio_rec_3.Y += pitchy; text_rec_3 = radio_rec_3; text_rec_3.X += pitchx; text_rec_3.Y -= radi2; text_rec_3.Height = textheight; text_rec_3.Width = width; Bounds = global_rec; }
protected override void Layout() { base.Layout(); Rectangle global_rec = GH_Convert.ToRectangle(Bounds); int height = 27; int width = 90; int radi1 = 7; int radi2 = 14; int pitchy = 15; global_rec.Height += height; global_rec.Width = width; radio_rec = global_rec; radio_rec.Y = radio_rec.Bottom - height; radio_rec.Height = 27; text_rec_1 = radio_rec; text_rec_1.X += 5; text_rec_1.Height = radi2; text_rec_1.Width = radi2; text_rec_2 = text_rec_1; text_rec_2.X += radi2; text_rec_3 = text_rec_2; text_rec_3.X += radi2; text_rec_4 = text_rec_3; text_rec_4.X += radi2; text_rec_5 = text_rec_4; text_rec_5.X += radi2; text_rec_6 = text_rec_5; text_rec_6.X += radi2; radio_rec_1 = text_rec_1; radio_rec_1.Height = radi1; radio_rec_1.Width = radi1; radio_rec_1.X += 2; radio_rec_1.Y += pitchy; radio_rec_2 = radio_rec_1; radio_rec_2.X += radi2; radio_rec_3 = radio_rec_2; radio_rec_3.X += radi2; radio_rec_4 = radio_rec_3; radio_rec_4.X += radi2; radio_rec_5 = radio_rec_4; radio_rec_5.X += radi2; radio_rec_6 = radio_rec_5; radio_rec_6.X += radi2; Bounds = global_rec; }
public override GH_ObjectResponse RespondToMouseDoubleClick(GH_Canvas sender, GH_CanvasMouseEvent e) { if (Owner is RoomInstance roomInstance) { string initial = string.Empty; var matrix = sender.Viewport.XFormMatrix(GH_Viewport.GH_DisplayMatrix.CanvasToControl); if (this.RoomArea.Contains(e.CanvasLocation)) { var field = new CapsuleInputBase(RoomArea, roomInstance, RoomInstanceVar.RoomArea) { Bounds = GH_Convert.ToRectangle(RoomArea.Box) }; field.ShowTextInputBox(sender, RoomArea.Text, true, false, matrix); } if (this.RoomName.Contains(e.CanvasLocation)) { var field = new CapsuleInputBase(RoomName, roomInstance, RoomInstanceVar.RoomName) { Bounds = GH_Convert.ToRectangle(RoomName.Box) }; field.ShowTextInputBox(sender, RoomName.Text, true, false, matrix); } roomInstance.ExpireSolution(true); return(GH_ObjectResponse.Handled); } return(base.RespondToMouseDoubleClick(sender, e)); }
protected override void Layout() { base.Layout(); Rectangle global_rec = GH_Convert.ToRectangle(Bounds); int radi1 = 7; int radi2 = 4; int subwidth = 36; int textheight = 20; int pitchx = 6; radio_rec = global_rec; radio_rec.Y = global_rec.Bottom; radio_rec_1 = radio_rec; radio_rec_1.Height = radi1; radio_rec_1.Width = radi1; radio_rec_1.Y += radi2; radio_rec_1.X += pitchx / 2; text_rec_1 = radio_rec_1; text_rec_1.X += pitchx; text_rec_1.Y -= radi2; text_rec_1.Height = textheight; text_rec_1.Width = subwidth; radio_rec_2 = radio_rec_1; radio_rec_2.X += text_rec_1.Width + radi1; text_rec_2 = text_rec_1; text_rec_2.X += text_rec_1.Width + radi1; radio_rec_3 = radio_rec_2; radio_rec_3.X += text_rec_2.Width + radi1; text_rec_3 = text_rec_2; text_rec_3.X += text_rec_2.Width + radi1; radio_rec.Height = radio_rec_1.Bottom - global_rec.Bottom + radi2; global_rec.Height += radio_rec.Height; Bounds = global_rec; }
protected override void Layout() { base.Layout(); int n = 3; System.Drawing.Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 22 * n; System.Drawing.Rectangle rec1 = rec0; rec1.Y = rec1.Bottom - (22 * n); // position of button (-ve is upwards) rec1.Height = 22; // height of button rec1.Inflate(-2, -2); System.Drawing.Rectangle rec2 = rec0; rec2.Y = rec2.Bottom - 22 * (n - 1); rec2.Height = 22; rec2.Inflate(-2, -2); System.Drawing.Rectangle rec3 = rec0; rec3.Y = rec3.Bottom - 22 * (n - 2); rec3.Height = 22; rec3.Inflate(-2, -2); Bounds = rec0; Button1Bounds = rec1; Button2Bounds = rec2; Button3Bounds = rec3; }
protected override void Layout() { base.Layout(); Rectangle global_rec = GH_Convert.ToRectangle(Bounds); int height = 50; int radi1 = 7; int radi2 = 55; int pitchy = 15; global_rec.Height += height; radio_rec = global_rec; radio_rec.Y = radio_rec.Bottom - height; radio_rec.Height = height; text_rec_1 = radio_rec; text_rec_1.Height = radi2; text_rec_1.Width = radi2; text_rec_2 = text_rec_1; text_rec_2.X += radi2; text_rec_3 = text_rec_2; text_rec_3.Y += pitchy + radi1; text_rec_4 = text_rec_1; text_rec_4.Y += pitchy + radi1; radio_rec_1 = text_rec_1; radio_rec_1.Height = radi1; radio_rec_1.Width = radi1; radio_rec_1.X += 17; radio_rec_1.Y += pitchy; radio_rec_2 = radio_rec_1; radio_rec_2.X += radi2; radio_rec_3 = radio_rec_2; radio_rec_3.Y += pitchy + radi1; radio_rec_4 = radio_rec_1; radio_rec_4.Y += pitchy + radi1; Bounds = global_rec; }
protected override void Layout( ) { base.Layout(); BaseRectangle = GH_Convert.ToRectangle(Bounds); StreamIdBounds = new Rectangle(( int )(BaseRectangle.X + (BaseRectangle.Width - 120) * 0.5), BaseRectangle.Y - 25, 120, 20); StreamNameBounds = new Rectangle(StreamIdBounds.X, BaseRectangle.Y - 50, 120, 20); }
public static void HighLightCom(Graphics graphics, GH_Component com, int rowsCount) { Rectangle relayrect = GH_Convert.ToRectangle(com.Attributes.Bounds); relayrect.Inflate(ShareData.FrameWidthGraph, ShareData.FrameWidthGraph); Rectangle rect = new Rectangle(relayrect.X, relayrect.Y, relayrect.Width, relayrect.Height + rowsCount * 15); GH_Capsule gH_Capsule = GH_Capsule.CreateCapsule(rect, GH_Palette.Pink, ShareData.FrameWidth, 5); gH_Capsule.Render(graphics, ShareData.ThemeColor); gH_Capsule.Dispose(); }
private RectangleF GetBounds(PointF location, SizeF imgSizeXY, int topOffset, int btmOffset, double scale) { RectangleF rec = new RectangleF(); rec.Location = location; rec.Width = imgSizeXY.Width * (float)scale; rec.Height = imgSizeXY.Height * (float)scale + topOffset + btmOffset; rec.Inflate(2f, 2f); return((RectangleF)GH_Convert.ToRectangle(rec)); }
protected override void Render(GH_Canvas canvas, Graphics graphics, GH_CanvasChannel channel) { base.Render(canvas, graphics, channel); var demBounds = (RectangleF) GH_Convert.ToRectangle(new RectangleF(new PointF(this.Pivot.X + 60, this.Pivot.Y), (SizeF) new Size(W - 60 - 80, H))); GH_Palette palette = GH_Palette.White; GH_Capsule capsule = GH_Capsule.CreateCapsule(demBounds, palette); capsule.Render(graphics, Selected, Owner.Locked, true); capsule.Dispose(); capsule = null; StringFormat format = new StringFormat(); format.Alignment = StringAlignment.Near; format.LineAlignment = StringAlignment.Center; format.Trimming = StringTrimming.EllipsisCharacter; // Content rectangle RectangleF textRectangle = demBounds; textRectangle.Height = 20; for (int i = 0; i < BimVisualiserData.Instance.NameList.Count; i++) { _boundingBoxes.Insert(i, textRectangle); // Max entries value (it would be nice extending the Bounds if more) if (i == 25) { break; } if (i == BimVisualiserData.Instance.Selected) { graphics.DrawString(BimVisualiserData.Instance.NameList[i], GH_FontServer.Standard, Brushes.DodgerBlue, textRectangle, format); } else { graphics.DrawString(BimVisualiserData.Instance.NameList[i], GH_FontServer.Standard, Brushes.Black, textRectangle, format); } format.Alignment = StringAlignment.Near; //textRectangle.Inflate(-5, 0); textRectangle.Y += 20; } // Always dispose of any GDI+ object that implement IDisposable. format.Dispose(); }
protected override void Layout() { base.Layout(); baseBounds = Bounds; thisBounds = GH_Convert.ToRectangle(Bounds); //Ref ImageViewerComponent component = Owner as ImageViewerComponent; //Bounds int buttonHorizontalResolution = component.resolution.Length * 6 + 6; int buttonHorizontalDPI = component.dpi.Length * 6 + 6; int buttonHorizontalRatio = component.ratio.Length * 6 + 6; buttonBounds = new RectangleF(new PointF(baseBounds.Right + 10, this.Bounds.Top), new SizeF(buttonHorizontalResolution, baseBounds.Height)); buttonBounds.Inflate(0, -5); dpiBounds = new RectangleF(new PointF(buttonBounds.Right + 5, baseBounds.Top), new SizeF(buttonHorizontalDPI, baseBounds.Height)); dpiBounds.Inflate(0, -5); ratioBounds = new RectangleF(new PointF(dpiBounds.Right + 5, baseBounds.Top), new SizeF(buttonHorizontalRatio, baseBounds.Height)); ratioBounds.Inflate(0, -5); //////////////////////////////////////////////////////////////////////////// SizeF minSize = new SizeF(); if (component.m_Size.Width < 200) { minSize = new SizeF(200, 200); } else { minSize = component.m_Size; } imgBounds = new RectangleF(new PointF(baseBounds.Left + 10, baseBounds.Bottom), minSize); backButton = new RectangleF(imgBounds.Location, imgBounds.Size); backButton.Inflate(5, 5); thisBounds = RectangleF.Union(thisBounds, buttonBounds); thisBounds = RectangleF.Union(thisBounds, dpiBounds); thisBounds = RectangleF.Union(thisBounds, backButton); thisBounds = RectangleF.Union(thisBounds, ratioBounds); thisBounds.Width += 5; thisBounds.Height += 5; Bounds = thisBounds; }
protected override void Layout( ) { base.Layout(); BaseRectangle = GH_Convert.ToRectangle(Bounds); StreamIdBounds = new Rectangle(( int )(BaseRectangle.X + (BaseRectangle.Width - 120) * 0.5), BaseRectangle.Y - 25, 120, 20); StreamNameBounds = new Rectangle(StreamIdBounds.X, BaseRectangle.Y - 50, 120, 20); PauseButtonBounds = new Rectangle(( int )(BaseRectangle.X + (BaseRectangle.Width - 30) * 0.5), BaseRectangle.Y + BaseRectangle.Height, 30, 30); Rectangle newBaseRectangle = new Rectangle(BaseRectangle.X, BaseRectangle.Y, BaseRectangle.Width, BaseRectangle.Height + 33); Bounds = newBaseRectangle; }
public RectangleF LayoutComponentBox2(IGH_Component owner) { GH_SwitcherComponent gH_SwitcherComponent = (GH_SwitcherComponent)owner; int val = Math.Max(gH_SwitcherComponent.StaticData.GetComponentInputSection().Count, gH_SwitcherComponent.StaticData.GetComponentOutputSection().Count) * 20; val = Math.Max(val, 24); int num = 24; if (!GH_Attributes <IGH_Component> .IsIconMode(owner.IconDisplayMode)) { val = Math.Max(val, GH_Convert.ToSize((SizeF)GH_FontServer.MeasureString(owner.NickName, StandardFont.largeFont())).Width + 6); } return(GH_Convert.ToRectangle(new RectangleF(owner.Attributes.Pivot.X - 0.5f * (float)num, owner.Attributes.Pivot.Y - 0.5f * (float)val, num, val))); }
protected override void Layout() { RectangleF @in = new RectangleF(Pivot, Bounds.Size); if (@in.Width < (float)MinimumSize.Width) { @in.Width = MinimumSize.Width; } if (@in.Height < (float)MinimumSize.Height) { @in.Height = MinimumSize.Height; } Bounds = GH_Convert.ToRectangle(@in); }
protected override void Layout() { base.Layout(); System.Drawing.Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 22; System.Drawing.Rectangle rec1 = rec0; rec1.Y = rec1.Bottom - 22; rec1.Height = 22; rec1.Inflate(-2, -2); Bounds = rec0; ButtonBounds = rec1; }
protected override void Layout() { base.Layout(); System.Drawing.Rectangle componentRect = GH_Convert.ToRectangle(Bounds); componentRect.Height += buttonHeight; System.Drawing.Rectangle buttonRect = componentRect; buttonRect.Y = buttonRect.Bottom - buttonHeight; buttonRect.Height = buttonHeight; buttonRect.Inflate(-3, -3); // Shrink button bounds for cleaner insert Bounds = componentRect; ButtonBounds = buttonRect; }
public List <RoomInstance> roomInstancesList = new List <RoomInstance>(); // List that contains all room instances that are to be in that house protected override void Layout() { base.Layout(); Pivot = GH_Convert.ToPoint(Pivot); Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 50; Bounds = rec0; HouseNameRectangle = new Rectangle(new System.Drawing.Point((int)Bounds.Location.X - 50 + 25, (int)Bounds.Location.Y + 50), new Size(80, 20)); FloorNameRectangle = new Rectangle(new System.Drawing.Point((int)Bounds.Location.X - 50 + 50, (int)Bounds.Location.Y + 75), new Size(60, 20)); // Bounds = new RectangleF(Pivot.X - OuterComponentRadius, Pivot.Y - OuterComponentRadius, 2 * OuterComponentRadius, 2 * OuterComponentRadius); }
protected override void Layout() { base.Layout(); _recList = new List <RectangleF>(); System.Drawing.Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 40; rec0.Width = 140; Bounds = rec0; for (int i = 0; i < 6; i++) { _recList.Add(new RectangleF((Bounds.Left + 9) + 20 * i, Bounds.Bottom - 15, 10, 10)); } leftBottom = new PointF(rec0.Left, rec0.Bottom); }
protected override void Layout() { base.Layout(); Rectangle global_rec = GH_Convert.ToRectangle(Bounds); int radi1 = 7; int radi2 = 4; int pitchx = 8; int pitchy = 11; int textheight = 20; int width = global_rec.Width; title_rec = global_rec; title_rec.Y = title_rec.Bottom; title_rec.Height = 22; radio_rec = title_rec; radio_rec.Y += title_rec.Height; radio_rec_1 = radio_rec; radio_rec_1.X += 5; radio_rec_1.Y += 5; radio_rec_1.Height = radi1; radio_rec_1.Width = radi1; text_rec_1 = radio_rec_1; text_rec_1.X += pitchx; text_rec_1.Y -= radi2; text_rec_1.Height = textheight; text_rec_1.Width = width; radio_rec_2 = radio_rec_1; radio_rec_2.Y += pitchy; text_rec_2 = radio_rec_2; text_rec_2.X += pitchx; text_rec_2.Y -= radi2; text_rec_2.Height = textheight; text_rec_2.Width = width; radio_rec.Height = text_rec_2.Bottom - radio_rec.Y; radio_rec2 = radio_rec; radio_rec2.Y = radio_rec.Y + radio_rec.Height; radio_rec2.Height = textheight; radio_rec2_1 = radio_rec2; radio_rec2_1.X += 5; radio_rec2_1.Y += 5; radio_rec2_1.Height = radi1; radio_rec2_1.Width = radi1; text_rec2_1 = radio_rec2_1; text_rec2_1.X += pitchx; text_rec2_1.Y -= radi2; text_rec2_1.Height = textheight; text_rec2_1.Width = width; global_rec.Height += (radio_rec2_1.Bottom - global_rec.Bottom); Bounds = global_rec; }
protected override void Layout() { base.Layout(); Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += 42; Rectangle rec1 = rec0; rec1.X = rec0.Left + 1; rec1.Y = rec0.Bottom - 42; rec1.Width = (rec0.Width) / 3 + 1; rec1.Height = 22; rec1.Inflate(-2, -2); Rectangle rec2 = rec1; rec2.X = rec1.Right + 2; Rectangle rec3 = rec2; rec3.X = rec2.Right + 2; Rectangle rec4 = rec1; rec4.Y = rec1.Bottom + 2; Rectangle rec5 = rec4; rec5.X = rec4.Right + 2; Rectangle rec6 = rec5; rec6.X = rec2.Right + 2; Bounds = rec0; BoundsAllButtons = rec0; ButtonBounds = rec1; ButtonBounds2 = rec2; ButtonBounds3 = rec3; ButtonBounds4 = rec4; ButtonBounds5 = rec5; ButtonBounds6 = rec6; }
protected override void Layout() { base.Layout(); Rectangle originRec = GH_Convert.ToRectangle(Bounds); originRec.Height += 36; Bounds = originRec; buttonRectangle = originRec; buttonRectangle.Y = buttonRectangle.Bottom - 20; buttonRectangle.Height = 20; buttonRectangle.Inflate(-2, -2); textRectangle = originRec; textRectangle.Y = buttonRectangle.Bottom - 36; textRectangle.Height = 16; }
protected override void Layout() { base.Layout(); int len = 22; Rectangle rec0 = GH_Convert.ToRectangle(Bounds); rec0.Height += len; Rectangle rec1 = rec0; rec1.Y = rec1.Bottom - len; rec1.Height = len; rec1.Inflate(-2, -2); Bounds = rec0; ButtonBounds = rec1; }
protected override void Layout() { RectangleF bounds = base.Bounds; bounds.Location = base.Pivot; bounds = GH_Convert.ToRectangle(bounds); Bounds = bounds; GH_ComponentAttributes.LayoutInputParams(Owner, bounds); foreach (IGH_Param item in Owner.Params.Input) { RectangleF bounds2 = item.Attributes.Bounds; bounds2.X += bounds2.Width + 3f; item.Attributes.Bounds = bounds2; } inputWidth = (int)Owner.Params.Input[0].Attributes.Bounds.Width; bounds.Width -= inputWidth; bounds.X += inputWidth; GH_ComponentAttributes.LayoutOutputParams(Owner, bounds); outputWidth = (int)(Owner.Params.Output[0]).Attributes.Bounds.Width; foreach (IGH_Param item2 in Owner.Params.Output) { RectangleF bounds3 = item2.Attributes.Bounds; bounds3.X -= (float)outputWidth + 3f; bounds3.Width = outputWidth; bounds3.Inflate(0f, -30f); item2.Attributes.Bounds = bounds3; } bounds.Width -= outputWidth; if (bounds.Width < 96f) { bounds.Width = 96f; } if (bounds.Height < 100f) { bounds.Height = 100f; } bounds.Inflate(-6f, -6f); if (base.Owner.Container != null) { base.Owner.Container.Region = GH_Convert.ToRectangle(bounds); } Bounds = new Rectangle((int)Pivot.X, (int)Pivot.Y, (int)((float)inputWidth + bounds.Width + 12f + (float)outputWidth), (int)base.Bounds.Height); }
protected override void Layout() { base.Layout(); const int margin = 3; var bounds = GH_Convert.ToRectangle(Bounds); var button = bounds; button.X += margin; button.Width -= margin * 2; button.Y = bounds.Bottom; button.Height = _buttonSize; bounds.Height += _buttonSize + margin; Bounds = bounds; _buttonBounds = button; }