IGH_Attributes
ReferencesNothing matches.
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.
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.
InputGrip
#PointF InputGrip { get; }
Gets the input grip location for these attributes. If HasInputGrip equals False, this point is meaningless.
OutputGrip
#PointF OutputGrip { get; }
Gets the output grip location for these attributes. If HasOutputGrip equals False, this point is meaningless.
Pivot
#PointF Pivot { get; set; }
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.
TooltipEnabled
Gets the tooltip enabled value. If False, no further tooltip functions will be called.
Methods
AppendToAttributeTree
#Recursively append these attributes and all child attributes to the attribute list.
Parameters:
| attributes (List<IGH_Attributes>) | List to append to. |
ExpireLayout
#void ExpireLayout()
Expires the entire layout of the attributes. When overridden, implementer must place a call to the base class 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.
Parameters:
| canvas (GH_Canvas) | Canvas to potentially invalidate. |
| e (GH_CanvasMouseEvent) | Event arguments for canvas mousemove. |
Returns: True if the canvas ought to be invalidated.
IsPickRegion
#Determines whether a point is within the pickable region for this object. By default, any point inside the Bounds is treated as pickable.
Parameters:
| point (PointF) | 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.
Parameters:
| box (RectangleF) | Selection box. |
| method (GH_PickBox) | Selection method. |
IsTooltipRegion
Determine whether the specified pixel should result in a tooltip when the cursor hovers over it.
Parameters:
| canvasPoint (PointF) | Point in Canvas coordinates. |
NewInstanceGuid
#Generate a new instance GUID for the owner object. Do not use this overload unless you're > 1.95m and called David.
Parameters:
| newID (Guid) | New ID to assign. |
PerformLayout
#void PerformLayout()
Recompute the layout for these attributes. This function is automatically called during Drawing operations, so you typically don't have to.
Read
This method is called whenever the instance is required to deserialize itself.
Parameters:
| reader (GH_IReader) | Reader object to deserialize from. |
Returns: True on success, false on failure.
RenderToCanvas
#Render these attributes into a Canvas control.
Parameters:
| canvas (GH_Canvas) | Canvas to draw on. |
| channel (GH_CanvasChannel) | Current drawing channel. |
RespondToKeyDown
Parameters:
| sender (GH_Canvas) | |
| e (KeyEventArgs) |
RespondToKeyUp
Parameters:
| sender (GH_Canvas) | |
| e (KeyEventArgs) |
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.
Parameters:
| sender (GH_Canvas) | Base canvas. |
| e (GH_CanvasMouseEvent) | Mouse event arguments. |
Returns: 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.
Parameters:
| sender (GH_Canvas) | Base canvas. |
| e (GH_CanvasMouseEvent) | Mouse event arguments. |
Returns: 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.
Parameters:
| sender (GH_Canvas) | Base canvas. |
| e (GH_CanvasMouseEvent) | Mouse event arguments. |
Returns: 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.
Parameters:
| sender (GH_Canvas) | Base canvas. |
| e (GH_CanvasMouseEvent) | Mouse event arguments. |
Returns: All Response flags are valid.
SetupTooltip
This function is called when a tooltip it about to be displayed.
Parameters:
| canvasPoint (PointF) | The pixel coordinate on the canvas of the cursor. |
| e (GH_TooltipDisplayEventArgs) | Tooltip display arguments. |
Write
This method is called whenever the instance is required to serialize itself.
Parameters:
| writer (GH_IWriter) | Writer object to serialize with. |
Returns: True on success, false on failure.