GH_ComponentAttributes
These Attributes are the default for GH_Components.
Inheritance Hierarchy
System.Object
Grasshopper.Kernel.GH_Attributes. IGH_Component.
Grasshopper.Kernel.Attributes.GH_ComponentAttributes
Namespace: Grasshopper.Kernel.Attributes
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public class GH_ComponentAttributes : GH_Attributes<IGH_Component>
The GH_ComponentAttributes type exposes the following members.
Constructors
Name
Description
Public Method
GH_ComponentAttributes
Initializes a new instance of the GH_ComponentAttributes class
Properties
Name
Description
Public Property
AllowMessageBalloon
Gets a value indicating whether these attributes allow warning and error balloons to be drawn on top of them.
(Inherited from GH_Attributes.T..)
Public Property
Bounds
Gets the rectangle that contains the active content of the attributes. Typically the Contents determine the active area for menus, tooltips etc. Attributes are not supposed to draw objects beyond the Bounds.
(Inherited from GH_Attributes.T..)
Public Property
ContentBox
Gets the bounds of the component area of the attributes.
Public Property
DocObject
Gets the owner object of these attributes.
(Inherited from GH_Attributes.T..)
Public Property
GetTopLevel
Gets the top-level attributes of the attribute stack these attributes belong to.
(Inherited from GH_Attributes.T..)
Public Property
HasInputGrip
(Overrides
GH_Attributes.T..HasInputGrip
.)Public Property
HasOutputGrip
(Overrides
GH_Attributes.T..HasOutputGrip
.)Public Property
InputGrip
Gets the input grip location for these attributes. If HasInputGrip equals False, this point is meaningless.
(Inherited from GH_Attributes.T..)
Public Property
InstanceGuid
Gets the instance ID of the document object that owns these attributes.
(Inherited from GH_Attributes.T..)
Public Property
IsTopLevel
Gets whether these attributes are top_level (i.e. no Parent attributes)
(Inherited from GH_Attributes.T..)
Public Property
OutputGrip
Gets the output grip location for these attributes. If HasOutputGrip equals False, this point is meaningless.
(Inherited from GH_Attributes.T..)
Public Property
Owner
Gets the type-safe owner object of these attributes. This property is identical to the DocObject property.
(Inherited from GH_Attributes.T..)
Public Property
Parent
Gets or sets the parent attributes. Top level attributes do not have parents.
(Inherited from GH_Attributes.T..)
Public Property
PathName
(Overrides
GH_Attributes.T..PathName
.)Public Property
Pivot
Gets or sets the pivot for these attributes. The pivot controls the general placement of the attributes. If you want to move the attributes, change the pivot location.
(Inherited from GH_Attributes.T..)
Public Property
Selected
Gets or sets the selected state of the top-level attributes.
(Inherited from GH_Attributes.T..)
Public Property
TooltipEnabled
Gets the tooltip enabled value. If False, no further tooltip functions will be called.
(Inherited from GH_Attributes.T..)
Methods
Name
Description
Public Method
AppendToAttributeTree
(Overrides
GH_Attributes.T..AppendToAttributeTree(List.IGH_Attributes.)
.)Public Method
ExpireLayout
(Overrides
GH_Attributes.T..ExpireLayout.
.)Public Method
InvalidateCanvas
The canvas must be invalidated when the mouse is near enough and this component has variable parameters.
(Overrides
GH_Attributes.T..InvalidateCanvas(GH_Canvas, GH_CanvasMouseEvent)
.)Public Method
IsMenuRegion
Determines whether a point is available for context menu popups. By default, IsMenuRegion calls IsPickRegion(PointF).
(Inherited from GH_Attributes.T..)
Public Method
IsPickRegion(PointF)
(Overrides
GH_Attributes.T..IsPickRegion(PointF)
.)Public Method
IsPickRegion(RectangleF, GH_PickBox)
Determines whether a rectangle is a valid pick region for this object. By default, the picking rectangle is intersected with the Bounds rectangle.
(Inherited from GH_Attributes.T..)
Public Method
IsTooltipRegion
Determines whether a point is available for tooltip popups. By default, IsMenuRegion calls IsTooltipRegion(PointF).
(Inherited from GH_Attributes.T..)
Protected method
Layout
(Overrides
GH_Attributes.T..Layout.
.)Public Method
Static Member
LayoutBounds
Public Method
Static Member
LayoutComponentBox
Utility layout method for GH_Component style UI.
Public Method
Static Member
LayoutInputParams
Public Method
Static Member
LayoutOutputParams
Public Method
NewInstanceGuid.
Generate a new instance GUID for the owner object.
(Inherited from GH_Attributes.T..)
Public Method
NewInstanceGuid(Guid)
Generate a new instance GUID for the owner object. Do not use this overload unless you’re > 1.95m and called David.
(Inherited from GH_Attributes.T..)
Public Method
PerformLayout
Recompute the layout for these attributes. This function is automatically called during Drawing operations, so you typically don’t have to.
(Inherited from GH_Attributes.T..)
Protected method
PrepareForRender
This method will always be called exactly once prior to Render(). This would be a good place to make sure all the necessary GUI data is up and running.
(Inherited from GH_Attributes.T..)
Public Method
Read
(Inherited from GH_Attributes.T..)
Protected method
Render
(Overrides
GH_Attributes.T..Render(GH_Canvas, Graphics, GH_CanvasChannel)
.)Protected method
RenderComponentCapsule(GH_Canvas, Graphics)
Utility function, draws the complete component capsule including all parameter data.
Protected method
RenderComponentCapsule(GH_Canvas, Graphics, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
Utility function, draws the component capsule including all specified elements.
Public Method
Static Member
RenderComponentParameters
Utility method for rendering all component parameters.
Protected method
RenderIncomingWires(GH_Painter, IEnumerable.IGH_Param., GH_ParamWireDisplay)
Utility function for derived classes. This method draws all the wires going into the left side of the attributes.
(Inherited from GH_Attributes.T..)
Protected method
RenderIncomingWires(GH_Painter, IEnumerable.IGH_Param., IEnumerable.Pen.)
Utility function for derived classes. This method draws all the wires going into the left side of the attributes.
(Inherited from GH_Attributes.T..)
Public Method
RenderToCanvas
Render these attributes into a Canvas control. This function places calls to PrepareForRender() and Render(), you should override those.
(Inherited from GH_Attributes.T..)
Protected method
RenderVariableParameterUI
Public Method
RespondToKeyDown
(Inherited from GH_Attributes.T..)
Public Method
RespondToKeyUp
(Inherited from GH_Attributes.T..)
Public Method
RespondToMouseDoubleClick
(Inherited from GH_Attributes.T..)
Public Method
RespondToMouseDown
(Overrides
GH_Attributes.T..RespondToMouseDown(GH_Canvas, GH_CanvasMouseEvent)
.)Public Method
RespondToMouseMove
(Inherited from GH_Attributes.T..)
Public Method
RespondToMouseUp
(Inherited from GH_Attributes.T..)
Public Method
SetupTooltip
(Overrides
GH_Attributes.T..SetupTooltip(PointF, GH_TooltipDisplayEventArgs)
.)Public Method
Write
(Inherited from GH_Attributes.T..)
Fields
Name
Description
Protected field
m_innerBoundsRepresents the Rectangle that contains the component black box.