Click or drag to resize

GH_ComponentAttributes Class

These Attributes are the default for GH_Components.
Inheritance Hierarchy
SystemObject
  Grasshopper.KernelGH_AttributesIGH_Component
    Grasshopper.Kernel.AttributesGH_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
  NameDescription
Public methodGH_ComponentAttributes
Initializes a new instance of the GH_ComponentAttributes class
Top
Properties
  NameDescription
Public propertyAllowMessageBalloon
Gets a value indicating whether these attributes allow warning and error balloons to be drawn on top of them.
(Inherited from GH_AttributesT.)
Public propertyBounds
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_AttributesT.)
Public propertyContentBox
Gets the bounds of the component area of the attributes.
Public propertyDocObject
Gets the owner object of these attributes.
(Inherited from GH_AttributesT.)
Public propertyGetTopLevel
Gets the top-level attributes of the attribute stack these attributes belong to.
(Inherited from GH_AttributesT.)
Public propertyHasInputGrip (Overrides GH_AttributesTHasInputGrip.)
Public propertyHasOutputGrip (Overrides GH_AttributesTHasOutputGrip.)
Public propertyInputGrip
Gets the input grip location for these attributes. If HasInputGrip equals False, this point is meaningless.
(Inherited from GH_AttributesT.)
Public propertyInstanceGuid
Gets the instance ID of the document object that owns these attributes.
(Inherited from GH_AttributesT.)
Public propertyIsTopLevel
Gets whether these attributes are top_level (i.e. no Parent attributes)
(Inherited from GH_AttributesT.)
Public propertyOutputGrip
Gets the output grip location for these attributes. If HasOutputGrip equals False, this point is meaningless.
(Inherited from GH_AttributesT.)
Public propertyOwner
Gets the type-safe owner object of these attributes. This property is identical to the DocObject property.
(Inherited from GH_AttributesT.)
Public propertyParent
Gets or sets the parent attributes. Top level attributes do not have parents.
(Inherited from GH_AttributesT.)
Public propertyPathName (Overrides GH_AttributesTPathName.)
Public propertyPivot
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_AttributesT.)
Public propertySelected
Gets or sets the selected state of the top-level attributes.
(Inherited from GH_AttributesT.)
Public propertyTooltipEnabled
Gets the tooltip enabled value. If False, no further tooltip functions will be called.
(Inherited from GH_AttributesT.)
Top
Methods
  NameDescription
Public methodAppendToAttributeTree (Overrides GH_AttributesTAppendToAttributeTree(ListIGH_Attributes).)
Public methodExpireLayout (Overrides GH_AttributesTExpireLayout.)
Public methodInvalidateCanvas
The canvas must be invalidated when the mouse is near enough and this component has variable parameters.
(Overrides GH_AttributesTInvalidateCanvas(GH_Canvas, GH_CanvasMouseEvent).)
Public methodIsMenuRegion
Determines whether a point is available for context menu popups. By default, IsMenuRegion calls IsPickRegion(PointF).
(Inherited from GH_AttributesT.)
Public methodIsPickRegion(PointF) (Overrides GH_AttributesTIsPickRegion(PointF).)
Public methodIsPickRegion(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_AttributesT.)
Public methodIsTooltipRegion
Determines whether a point is available for tooltip popups. By default, IsMenuRegion calls IsTooltipRegion(PointF).
(Inherited from GH_AttributesT.)
Protected methodLayout (Overrides GH_AttributesTLayout.)
Public methodStatic memberLayoutBounds
Public methodStatic memberLayoutComponentBox
Utility layout method for GH_Component style UI.
Public methodStatic memberLayoutInputParams
Public methodStatic memberLayoutOutputParams
Public methodNewInstanceGuid
Generate a new instance GUID for the owner object.
(Inherited from GH_AttributesT.)
Public methodNewInstanceGuid(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_AttributesT.)
Public methodPerformLayout
Recompute the layout for these attributes. This function is automatically called during Drawing operations, so you typically don't have to.
(Inherited from GH_AttributesT.)
Protected methodPrepareForRender
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_AttributesT.)
Public methodRead (Inherited from GH_AttributesT.)
Protected methodRender (Overrides GH_AttributesTRender(GH_Canvas, Graphics, GH_CanvasChannel).)
Protected methodRenderComponentCapsule(GH_Canvas, Graphics)
Utility function, draws the complete component capsule including all parameter data.
Protected methodRenderComponentCapsule(GH_Canvas, Graphics, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
Utility function, draws the component capsule including all specified elements.
Public methodStatic memberRenderComponentParameters
Utility method for rendering all component parameters.
Protected methodRenderIncomingWires(GH_Painter, IEnumerableIGH_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_AttributesT.)
Protected methodRenderIncomingWires(GH_Painter, IEnumerableIGH_Param, IEnumerablePen)
Utility function for derived classes. This method draws all the wires going into the left side of the attributes.
(Inherited from GH_AttributesT.)
Public methodRenderToCanvas
Render these attributes into a Canvas control. This function places calls to PrepareForRender() and Render(), you should override those.
(Inherited from GH_AttributesT.)
Protected methodRenderVariableParameterUI
Public methodRespondToKeyDown (Inherited from GH_AttributesT.)
Public methodRespondToKeyUp (Inherited from GH_AttributesT.)
Public methodRespondToMouseDoubleClick (Inherited from GH_AttributesT.)
Public methodRespondToMouseDown (Overrides GH_AttributesTRespondToMouseDown(GH_Canvas, GH_CanvasMouseEvent).)
Public methodRespondToMouseMove (Inherited from GH_AttributesT.)
Public methodRespondToMouseUp (Inherited from GH_AttributesT.)
Public methodSetupTooltip (Overrides GH_AttributesTSetupTooltip(PointF, GH_TooltipDisplayEventArgs).)
Public methodWrite (Inherited from GH_AttributesT.)
Top
Fields
  NameDescription
Protected fieldm_innerBounds
Represents the Rectangle that contains the component black box.
Top
See Also