public override void SetupTooltip(PointF point, GH_TooltipDisplayEventArgs e) { // Allow the base class to set up the tooltip. // It will handle those cases where the mouse is over a state icon. base.SetupTooltip(point, e); try { using (var colorBuffer = PerFrameCache.GetTextureImage(_component, true)) using (var depthBuffer = PerFrameCache.GetTextureImage(_component, false)) { if (colorBuffer != null && depthBuffer != null) { var size = colorBuffer.Size; size.Width /= 2; var bmp = new System.Drawing.Bitmap(size.Width, size.Height); using (var g = System.Drawing.Graphics.FromImage(bmp)) { g.DrawImage(colorBuffer, Rectangle.FromLTRB(0, 0, size.Width, size.Height / 2)); g.DrawImage(depthBuffer, Rectangle.FromLTRB(0, size.Height / 2, size.Width, size.Height)); } e.Description = "Output Color/Depth Buffers"; e.Diagram = bmp; //e.Diagram = GH_IconTable.ResizeImage(colorBuffer, new Size(300, 200), //System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic, //System.Drawing.Imaging.PixelFormat.Format24bppRgb); } } } catch { /* no action required. */ } }
public override void SetupTooltip(PointF canvasPoint, GH_TooltipDisplayEventArgs e) { GetActiveTooltip(canvasPoint); if (_activeToolTip != null) { _activeToolTip.TooltipSetup(canvasPoint, e); return; } e.Title = (this.PathName); e.Text = (base.Owner.Description); e.Description = (base.Owner.InstanceDescription); e.Icon = (base.Owner.Icon_24x24); if (base.Owner is IGH_Param) { //? val = base.Owner; //string text = val.TypeName; string text = base.Owner.GetType().ToString(); //if ((int)val.get_Access() == 1) //{ // text += "[…]"; //} //if ((int)val.get_Access() == 2) //{ // text += "{…;…;…}"; //} e.Title = ($"{this.PathName} ({text})"); } }
public override void TooltipSetup(System.Drawing.PointF canvasPoint, GH_TooltipDisplayEventArgs e) { e.Icon = ((System.Drawing.Bitmap)null); e.Title = (_name + " (Slider)"); e.Text = (_header); e.Description = ("Value: " + currentValue + "\nMinValue: " + minValue + "\nMaxValue: " + maxValue); }
public override void TooltipSetup(PointF canvasPoint, GH_TooltipDisplayEventArgs e) { e.Icon = ((Bitmap)null); e.Title = (_name + " (Group)"); e.Text = (_header); e.Description = (_description); }
public override void TooltipSetup(PointF canvasPoint, GH_TooltipDisplayEventArgs e) { e.Icon = null; e.Title = _name + " (Checkbox)"; e.Text = _header; if (_active) { e.Description = "ON"; } else { e.Description = "OFF"; } }
public override void SetupTooltip(PointF canvasPoint, GH_TooltipDisplayEventArgs e) { GHCustomComponent owner = Owner as GHCustomComponent; foreach (GHControl item in owner.CustomControls.Values) { if (item.Bounds.Contains(canvasPoint) && item.Enabled) { item.SetupToolTip(canvasPoint, e); return; } } base.SetupTooltip(canvasPoint, e); }
internal virtual void SetupToolTip(PointF canvasPoint, GH_TooltipDisplayEventArgs e) { if (!Enabled) { return; } if (ToolTipDiagram == null) { e.Title = Name; e.Description = Description; } else { e.Text = Name; e.Description = Description; e.Diagram = ToolTipDiagram; } }
public override void TooltipSetup(PointF canvasPoint, GH_TooltipDisplayEventArgs e) { e.Icon = ((Bitmap)null); e.Title = ("Menu (" + name + ")"); e.Text = (_header); if (_header != null) { e.Text = (e.Text + "\n"); } if (_expanded) { e.Text = (e.Text + "Click to close menu"); } else { e.Text = (e.Text + "Click to open menu"); } e.Description = (_description); }
public override void SetupTooltip(PointF point, GH_TooltipDisplayEventArgs e) { base.SetupTooltip(point, e); e.Description = "Please Double Click"; }
public override void SetupTooltip(PointF point, GH_TooltipDisplayEventArgs e) { base.SetupTooltip(point, e); e.Description = "Double click to set a new integer"; }
public virtual void TooltipSetup(PointF canvasPoint, GH_TooltipDisplayEventArgs e) { }
/// <summary> /// finds the children in which the cursor is inside and then set the too tip accordingly and return true. /// If no child is active then return false /// </summary> /// <param name="canvasPoint"></param> /// <param name="e"></param> /// <returns></returns> public static bool SetChildrenToolTip(this IGHPanel gHContainer, PointF canvasPoint, GH_TooltipDisplayEventArgs e) { foreach (GHControl control in gHContainer.Items) { if (control.Enabled && control.Bounds.Contains(canvasPoint)) { control.SetupToolTip(canvasPoint, e); return(true); } } return(false); }