GH_Canvas Class |
Namespace: Grasshopper.GUI.Canvas
The GH_Canvas type exposes the following members.
Name | Description | |
---|---|---|
ActiveInteraction |
Gets or sets the currently active interaction object.
| |
ActiveObject |
Gets or sets the currently active object.
| |
ActiveWidget |
Gets or sets the currently active widget.
| |
CursorCanvasPosition |
Gets the location of the cursor in Canvas coordinates.
| |
CursorControlPosition |
Gets the location of the cursor in Control coordinates.
| |
DisplayVoronoiWarning |
Gets or sets whether the Voronoi Over-dose warning message is displayed.
This property is set once at Grasshopper startup to True.
| |
Document |
Gets or sets the document currently loaded in this canvas.
| |
DrawingMode |
Gets the current drawing mode for this canvas.
| |
HasControlWithFocus |
Gets whether or not this canvas has a child control on it with focus.
| |
IsActiveInteraction |
Gets a value indicating whether or not there is an interaction object loaded in this canvas.
| |
IsActiveObject |
Gets a value indicating whether or not an object is currently activated.
| |
IsActiveWidget |
Gets a value indicating whether or not a widget is currently activated.
| |
IsDocument |
Gets a value indicating whether or not a document is currently loaded in this canvas.
| |
MarkovSuggestions | ||
ModifiersEnabled |
Gets or sets the modifiers enabled flag. When modifiers are disabled,
only zooming and panning is still allowed.
| |
NavigationPanDown |
Gets or sets the special key for panning down.
| |
NavigationPanLeft |
Gets or sets the special key for panning left.
| |
NavigationPanPixels |
Gets or sets the number of pixels for each pan operation.
| |
NavigationPanRight |
Gets or sets the special key for panning right.
| |
NavigationPanUp |
Gets or sets the special key for panning up.
| |
NavigationZoomFactor |
Gets or sets the zoom factor for navigation zoom operations.
| |
NavigationZoomIn |
Gets or sets the special key for zooming in.
| |
NavigationZoomOut |
Gets or sets the special key for zooming in.
| |
Painter |
Gets the painter object that handles most of the drawing logic for this canvas.
| |
Painting |
Gets whether this canvas is currently busy painting itself.
| |
RecordPreviewBoundary | ||
TagArtistIDs |
Gets all the TagArtist IDs in this Canvas.
| |
ThumbnailSize |
Gets the thumbnail size for documents.
| |
TooltipDelay |
Gets the delay (in milliseconds) required for a tooltip popup.
This delay is a user setting stored under the Canvas:TooltipDelay field of the core settings.
| |
Validator |
Provides access to all the validators associated with this canvas.
| |
Viewport |
Gets the viewport that determines the panning and zooming for this canvas.
| |
Widgets |
Gets a list of all the widgets on this canvas.
| |
ZoomFadeHigh |
Gets the ZUI fade alpha value for the high zoom level threshold.
This static field gets set on every Canvas paint start.
The high threshold is typically used for ZUI elements that only appear when zoomed in.
| |
ZoomFadeLow |
Gets the ZUI fade alpha value for the low zoom level threshold.
This static field gets set on every Canvas paint start.
The low threshold is typically used for fading of icons and object names.
| |
ZoomFadeMedium |
Gets the ZUI fade alpha value for the medium zoom level threshold.
This static field gets set on every Canvas paint start.
The medium threshold is typically used for non-informative UI elements such as highlights.
|
Name | Description | |
---|---|---|
AddTagArtist |
Add a Tag Artist instance to this canvas.
| |
AddValidator |
Add a new drop validator to the canvas.
| |
AutoSaveDocument | ||
CanvasOldSchoolMenu | ||
CreateMRUPanels |
Create new MRU panels. This function only does something if there is no document loaded in the canvas.
| |
CreatePreview |
Render this canvas to a thumbnail preview.
| |
DestroyMRUPanels |
Destroy any MRU panels that might be in existence.
| |
Dispose | Releases the unmanaged resources used by the GH_Canvas and optionally releases the managed resources (Overrides ControlDispose(Boolean).) | |
GenerateHiResImage |
Generate a collection of hi-res images of the document.
| |
GenerateHiResImageTile |
Generate a single tile in a Hi-Res image export.
| |
GetCanvasScreenBuffer |
Get a bitmap that resembles the current state of the canvas.
| |
GetGraphicsObject |
Gets a graphics object for this control. You are not allowed to draw with this object,
use it only for visibility testing and such. If you're inside a canvas update, use the Graphics() property instead.
You must dispose of the Graphics object returned by this method or resources will be leaked.
| |
HideMRUPanels |
Hide all existing MRU panels by sliding them out of view.
| |
InstantiateNewObject(Guid, PointF, Boolean) | ||
InstantiateNewObject(Guid, String, PointF, Boolean) | ||
Navigate |
Perform a single navigation step.
| |
OnPaint | (Overrides ControlOnPaint(PaintEventArgs).) | |
OnPaintBackground | (Overrides ControlOnPaintBackground(PaintEventArgs).) | |
OnViewportChanged |
Ensure the canvas and document viewport data are synchronised and raises the ViewportChanged event.
| |
ReevaluateMarkovSuggestions | ||
RemoveAllTagArtists |
Remove all IGH_TagArtists from this canvas. Do not use this method
unless you want to screw over everyone else.
| |
RemoveTagArtist(Guid) |
Remove all IGH_TagArtists from this canvas that match a certain ID.
| |
RemoveTagArtist(IGH_TagArtist) |
Remove a specific tag artist from this canvas.
If the instance occurs multiple times in the TagArtist list,
all instances will be removed.
| |
RemoveValidator |
Remove a drop validator from the canvas.
| |
ScheduleRegen |
Schedule a regen to occur after the specified number of milliseconds have elapsed.
If a Regen is called in this time frame, the schedule will be cleared. Only a single
schedule can be active at any time, so any call to ScheduleRegen will clear
existing schedules.
| |
SetSmartTextRenderingHint |
When this method is called during a redraw, the TextRenderingHint of the associated
graphics object will be set to either GH_CrispText or GH_SmoothText depending on zoom level.
| |
ShowComponentSearchBox |
Display the component Search dialog at the current mouse location.
The dialog cannot be shown if ModifiersEnabled=False.
| |
ShowComponentSearchBox(Point) |
Display the component Search dialog at the given coordinate.
The dialog cannot be shown if ModifiersEnabled=False.
| |
ShowMRUPanels |
Show any hidden MRU panels by sliding them back into view.
| |
ShowNavigationPane |
Displays the quick-navigation popup pane at the cursor.
| |
ShowSearchDialog |
Display the Find dialog.
If a Find dialog is already active for this canvas, nothing will happen.
| |
StartAutoPan |
Start the auto-panning timer.
| |
StopAutoPan |
Stop the auto-panning timer.
| |
UpdateDocumentPreview |
Call this method to update the preview thumbnail for the currently loaded document.
If no document is currently loaded, nothing will happen.
|
Name | Description | |
---|---|---|
CanvasPaintBackground |
Raised after the background has been drawn.
| |
CanvasPaintBegin |
Raised before a new paint operation starts.
This event is always raised, even if the Canvas isn't visible.
| |
CanvasPaintEnd |
Raised after a paint operation completes.
This event is always raised, even if the Canvas isn't visible.
| |
CanvasPostPaintGroups |
Raised after group drawing completes.
| |
CanvasPostPaintObjects |
Raised after object drawing completes.
| |
CanvasPostPaintOverlay |
Raised after object overlay drawing completes.
| |
CanvasPostPaintWidgets |
Raised after widgets are drawn. This is the final event in the Drawing pipeline.
| |
CanvasPostPaintWires |
Raised after wire drawing completes.
| |
CanvasPrePaintGroups |
Raised before group drawing starts.
| |
CanvasPrePaintObjects |
Raised before object drawing starts.
| |
CanvasPrePaintOverlay |
Raised before object overlay drawing starts.
| |
CanvasPrePaintWidgets |
Raised before Widgets are drawn.
| |
CanvasPrePaintWires |
Raised before wire drawing starts.
| |
Document_ModifiedChanged | ||
Document_ObjectsAdded | ||
Document_ObjectsDeleted | ||
Document_SettingsChanged | ||
DocumentChanged |
This event is raised whenever a different document is loaded into this canvas.
| |
DocumentObjectMouseDown |
This event is raised whenever the left mouse button is pressed while over a Document object.
| |
ModifiersChanged |
This event is raised whenever the ModifiersEnabled property changes.
| |
NavigationSettingsChanged |
Raised whenever any of the shared navigation properties changed.
| |
ViewportChanged |
This event is raised whenever the viewport properties are modified,
for example when the pan or zoom values are affected.
| |
WidgetListCreated |
This event is raised once for every GH_Canvas object that is created anew. The event is
Shared (static) because it is raised inside the constructor of a GH_Canvas object and therefor
cannot be registered on an instance.
|
Name | Description | |
---|---|---|
ScheduleInactive |
Defines the delay used to indicate the absence of a schedule.
| |
ThumbnailHeight | ||
ThumbnailWidth |
Name | Description | |
---|---|---|
ToEto | (Defined by EtoExtensions.) |