IGH_Attributes

References
Base interface for all Attributes. Attributes are the visual portion of GH_DocumentObjects. They handle display, mouse events, layout, context menus etc. etc. You should consider inheriting from GH_Attributes or some other abstract class instead of implementing this interface from scratch.

Properties

AllowMessageBalloon

#
Gets a value indicating whether these attributes allow warning and error boxes to be drawn on top of them.
bool AllowMessageBalloon { get; }

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.
RectangleF Bounds { get; set; }

DocObject

#
Gets the owner object of these attributes.
IGH_DocumentObject DocObject { get; }

GetTopLevel

#
Gets the top level attributes of these attributes.
IGH_Attributes GetTopLevel { get; }

HasInputGrip

#
Gets a value indicating whether or not these attributes have an input grip.
bool HasInputGrip { get; }

HasOutputGrip

#
Gets a value indicating whether or not these attributes have an output grip.
bool HasOutputGrip { get; }

InputGrip

#
Gets the input grip location for these attributes. If HasInputGrip equals False, this point is meaningless.
PointF InputGrip { get; }

InstanceGuid

#
Gets the instance ID for these attributes.
Guid InstanceGuid { get; }

IsTopLevel

#
Gets whether these attributes are top_level (i.e. no Parent attributes)
bool IsTopLevel { get; }

OutputGrip

#
Gets the output grip location for these attributes. If HasOutputGrip equals False, this point is meaningless.
PointF OutputGrip { get; }

Parent

#
Gets or sets the parent attributes. Top level attributes do not have parents.
IGH_Attributes Parent { get; set; }

PathName

#
Get a description of the location of these attributes within the local attribute tree.
string PathName { get; }

Pivot

#
Gets 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.
PointF Pivot { get; set; }

Selected

#
Gets or sets the selected state of the top-level attributes.
bool Selected { get; set; }

TooltipEnabled

Gets the tooltip enabled value. If False, no further tooltip functions will be called.
bool TooltipEnabled { get; }
inherited fromIGH_TooltipAwareObject

Methods

AppendToAttributeTree

#
Recursively append these attributes and all child attributes to the attribute list.
void AppendToAttributeTree(
attributes
List to append to.
)

ExpireLayout

#
Expires the entire layout of the attributes. When overridden, implementer must place a call to the base class ExpireLayout().
void ExpireLayout()

InvalidateCanvas

#
If the mouse location should cause a canvas invalidation then return true. You only need to override this function if you draw objects that are dependant on cursor positions outside the bounds of the attributes.
bool InvalidateCanvas(
canvas,
Canvas to potentially invalidate.
e
Event arguments for canvas mousemove.
)
True if the canvas ought to be invalidated.

IsMenuRegion

#
Determines whether a point is available for context menu popups. By default, IsMenuRegion calls IsPickRegion(PointF).
bool IsMenuRegion(
PointF
point
Point location to test.
)

IsPickRegion

#
Determines whether a point is within the pickable region for this object. By default, any point inside the Bounds is treated as pickable.
bool IsPickRegion(
PointF
point
Point location to test.
)

IsPickRegion

#
Determines whether a rectangle is a valid pick region for this object. By default, the picking rectangle is intersected with the Bounds rectangle.
bool IsPickRegion(
box,
Selection box.
method
Selection method.
)

IsTooltipRegion

Determine whether the specified pixel should result in a tooltip when the cursor hovers over it.
bool IsTooltipRegion(
PointF
canvasPoint
Point in Canvas coordinates.
)
inherited fromIGH_TooltipAwareObject

NewInstanceGuid

#
Generate a new instance GUID for the owner object.
void NewInstanceGuid()

NewInstanceGuid

#
Generate a new instance GUID for the owner object. Do not use this overload unless you're > 1.95m and called David.
void NewInstanceGuid(
newID
New ID to assign.
)

PerformLayout

#
Recompute the layout for these attributes. This function is automatically called during Drawing operations, so you typically don't have to.
void PerformLayout()

Read

This method is called whenever the instance is required to deserialize itself.
bool Read(
reader
Reader object to deserialize from.
)
inherited fromGH_ISerializable
True on success, false on failure.

RenderToCanvas

#
Render these attributes into a Canvas control.
void RenderToCanvas(
canvas,
Canvas to draw on.
channel
Current drawing channel.
)

RespondToMouseDoubleClick

This function will be called whenever the left button is double-clicked over the canvas. If you are active, you will be the only object who gets called.
GH_ObjectResponse RespondToMouseDoubleClick(
sender,
Base canvas.
e
Mouse event arguments.
)
inherited fromIGH_ResponsiveObject
All Response flags are valid.

RespondToMouseDown

This function will be called whenever a mouse button is pressed over the canvas. If you are active, you will be the only object who gets called. If you are inactive, you might get called if nobody on top of you decides to become active.
GH_ObjectResponse RespondToMouseDown(
sender,
Base canvas.
e
Mouse event arguments.
)
inherited fromIGH_ResponsiveObject
All Response flags are valid.

RespondToMouseMove

This function will be called when the mouse moves across the canvas. If you are active, you will be the only object who gets called. If you are inactive, you might get called if nobody on top of you decides to become active.
GH_ObjectResponse RespondToMouseMove(
sender,
Base canvas.
e
Mouse event arguments.
)
inherited fromIGH_ResponsiveObject
All Response flags are valid.

RespondToMouseUp

This function will be called whenever a mouse button is released over the canvas. If you are active, you will be the only object who gets called. If you are inactive, you will not be called at all for MouseUp events.
GH_ObjectResponse RespondToMouseUp(
sender,
Base canvas.
e
Mouse event arguments.
)
inherited fromIGH_ResponsiveObject
All Response flags are valid.

SetupTooltip

This function is called when a tooltip it about to be displayed.
void SetupTooltip(
PointF
canvasPoint,
The pixel coordinate on the canvas of the cursor.
e
Tooltip display arguments.
)
inherited fromIGH_TooltipAwareObject

Write

This method is called whenever the instance is required to serialize itself.
bool Write(
writer
Writer object to serialize with.
)
inherited fromGH_ISerializable
True on success, false on failure.