These Attributes are the default for GH_Components.
Constructors
GH_ComponentAttributes
#Fields
m_innerBounds
#Represents the Rectangle that contains the component black box.
protected RectangleF m_innerBounds
Properties
AllowMessageBalloon
Gets a value indicating whether these attributes allow warning and error balloons to be drawn on top of them.
Implements: AllowMessageBalloon
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.
Implements: Bounds
Implements: DocObject
GetTopLevel
Gets the top-level attributes of the attribute stack these attributes belong to.
Implements: GetTopLevel
InputGrip
Gets the input grip location for these attributes. If HasInputGrip equals False, this point is meaningless.
public virtual PointF InputGrip { get; }
Implements: InputGrip
InstanceGuid
Gets the instance ID of the document object that owns these attributes.
Implements: InstanceGuid
IsTopLevel
Gets whether these attributes are top_level (i.e. no Parent attributes)
Implements: IsTopLevel
OutputGrip
Gets the output grip location for these attributes. If HasOutputGrip equals False, this point is meaningless.
public virtual PointF OutputGrip { get; }
Implements: OutputGrip
Owner
Gets the type-safe owner object of these attributes. This property is identical to the DocObject property.
public T Owner { get; }
Parent
Gets or sets the parent attributes. Top level attributes do not have parents.
Implements: Parent
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.
public virtual PointF Pivot { get; set; }
Implements: Pivot
Selected
Gets or sets the selected state of the top-level attributes.
Implements: Selected
TooltipEnabled
Gets the tooltip enabled value. If False, no further tooltip functions will be called.
Implements: TooltipEnabled
Methods
InvalidateCanvas
#The canvas must be invalidated when the mouse is near enough and this component has variable parameters.
Overrides: GH_Attributes<T>.InvalidateCanvas
IsPickRegion
Determines whether a rectangle is a valid pick region for this object. By default, the picking rectangle is intersected with the Bounds rectangle.
Implements: IsPickRegion
IsTooltipRegion
Determines whether a point is available for tooltip popups. By default, IsMenuRegion calls IsTooltipRegion(PointF).
Implements: IsTooltipRegion
LayoutBounds
#LayoutComponentBox
#Utility layout method for GH_Component style UI.
Returns: The rectangle describing the box of the component name/icon.
LayoutInputParams
#LayoutOutputParams
#NewInstanceGuid
Generate a new instance GUID for the owner object.
public void NewInstanceGuid()
Implements: NewInstanceGuid
NewInstanceGuid
Generate a new instance GUID for the owner object. Do not use this overload unless you're > 1.95m and called David.
Implements: NewInstanceGuid
PerformLayout
Recompute the layout for these attributes. This function is automatically called during Drawing operations, so you typically don't have to.
public void PerformLayout()
Implements: PerformLayout
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.
protected virtual void PrepareForRender()
Implements: Read
RenderComponentCapsule
#Utility function, draws the component capsule including all specified elements.
protected void RenderComponentCapsule()
canvas,
Canvas to draw into.
graphics,
Graphics object to draw with.
drawComponentBaseBox,
If true, will draw the component background box.
drawComponentNameBox,
If true, will draw component nickname/icon element.
drawJaggedEdges,
If true, parameterless sides will have jagged edges drawn on them.
drawParameterGrips,
If true, will draw parameter grips.
drawParameterNames,
If true, will draw parameter nicknames.
drawZuiElements
If true, will draw ZUI variable parameter interface.
RenderComponentCapsule
#Utility function, draws the complete component capsule including all parameter data.
RenderComponentParameters
#Utility method for rendering all component parameters.
public static void RenderComponentParameters()
canvas,
Canvas to draw to.
graphics,
Graphics to draw with.
owner,
Component to draw parameters for.
style
Component capsule palette style.
RenderIncomingWires
Utility function for derived classes. This method draws all the wires going into the left side of the attributes.
protected void RenderIncomingWires()
painter,
The graphics object to paint with
sources,
A list of sources that will be connected with the input grip of this attribute
style
Style for wire display.
RenderIncomingWires
Utility function for derived classes. This method draws all the wires going into the left side of the attributes.
protected void RenderIncomingWires()
painter,
The graphics object to paint with
sources,
A list of sources that will be connected with the input grip of this attribute
styles
A collection of pen objects to use for each source. If a pen is null, the default wire style will be used instead.
RenderToCanvas
Render these attributes into a Canvas control. This function places calls to PrepareForRender() and Render(), you should override those.
public void RenderToCanvas()
Implements: RenderToCanvas
RenderVariableParameterUI
#RespondToKeyDown
Implements: RespondToKeyDown
RespondToKeyUp
Implements: RespondToKeyUp
RespondToMouseDoubleClick
Implements: RespondToMouseDoubleClick
RespondToMouseMove
Implements: RespondToMouseMove
RespondToMouseUp
Implements: RespondToMouseUp
Implements: Write