DirectionGripUserInterfaceObject

GripUserInterfaceObjectUserInterfaceObjectBase
A point plus direction arrows that represents a grip constrained to a line

Constructors

DirectionGripUserInterfaceObject

#Since v9.0
Create a direction grip located at location and constrained to a direction
public DirectionGripUserInterfaceObject(
location,
Grip location
direction
Line constraint for the grip
)

Properties

ArrowRadius

#Since v9.0
Size of direction end shape
public float ArrowRadius { get; set; }

ArrowShape

#Since v9.0
Shape used for end of direction line
public GripUserInterfaceObjectShape ArrowShape { get; set; }

BoundToActiveView

public bool BoundToActiveView { get; set; }
inherited fromUserInterfaceObjectBase

DirectionLineLength

#Since v9.0
Length of direction line in pixel units
public float DirectionLineLength { get; set; }

GripColor

public Color GripColor { get; set; }
inherited fromGripUserInterfaceObject

GripDirection

#Since v9.0
Constrained direction of grip
public Vector3d GripDirection { get; set; }

GripFillColor

public Color GripFillColor { get; set; }
inherited fromGripUserInterfaceObject

GripLocation

public Point3d GripLocation { get; set; }
inherited fromGripUserInterfaceObject

GripPointVisible

#Since v9.0
Is the grip point itself drawn
public bool GripPointVisible { get; set; }

GripRadius

public float GripRadius { get; set; }
inherited fromGripUserInterfaceObject

GripShapeRotationRadians

public float GripShapeRotationRadians { get; set; }
inherited fromGripUserInterfaceObject

GripStrokeWidth

public float GripStrokeWidth { get; set; }
inherited fromGripUserInterfaceObject

HasKeyboardFocus

Does this object have keyboard focus? An object with keyboard focus gets first refusal on what is typed in a viewport; what it does not use carries on to the command line as usual.
public bool HasKeyboardFocus { get; }
inherited fromUserInterfaceObjectBase

ObjectSnapCursorsEnabled

public bool ObjectSnapCursorsEnabled { get; set; }
inherited fromGripUserInterfaceObject

ObjectSnapPermitted

public bool ObjectSnapPermitted { get; set; }
inherited fromGripUserInterfaceObject

OneWay

#Since v9.0
Is the grip a single direction grip
public bool OneWay { get; set; }

OnObjectCursorsEnabled

public bool OnObjectCursorsEnabled { get; set; }
inherited fromGripUserInterfaceObject

Tooltip

Text shown in a tooltip when the mouse rests over this object. Null or an empty string means no tooltip, which is what an object starts with. One tooltip is on screen at a time; whichever object the mouse is over owns it.
public string Tooltip { get; set; }
inherited fromUserInterfaceObjectBase

Visible

Is the user interface object visible? Objects that are not visible will not be drawn and will not receive mouse events
public bool Visible { get; set; }
inherited fromUserInterfaceObjectBase

Methods

ArrowsVisibleInViewport

#Since v9.0
Are the arrows visible for a given viewport. Projections that cause the arrows to be end on are projections where arrows are not drawn.
public bool ArrowsVisibleInViewport(
viewport
)
True if the arrow are visible for a given viewport.

ClearSnapPoints

public void ClearSnapPoints()
inherited fromGripUserInterfaceObject

Constrain

public void Constrain(
arc
)
inherited fromGripUserInterfaceObject

Constrain

public void Constrain(
circle
)
inherited fromGripUserInterfaceObject

Constrain

public void Constrain(
curve
)
inherited fromGripUserInterfaceObject

Constrain

public void Constrain(
line
)
inherited fromGripUserInterfaceObject

IsMouseOver

Called to test if the mouse is actively over this object
protected virtual bool IsMouseOver()
inherited fromUserInterfaceObjectBase
Return true if the mouse is over this object

IsRegistered

Is this user interface object active
public bool IsRegistered()
inherited fromUserInterfaceObjectBase

OnDrag

protected virtual void OnDrag(
newLocation,
mouse
)
inherited fromGripUserInterfaceObject

OnDraw

All user interface objects are drawn and can customize their look with the OnDraw function
protected virtual void OnDraw()
inherited fromUserInterfaceObjectBase

OnMouseClick

Called during a mouse click event on this object
protected virtual void OnMouseClick()
inherited fromUserInterfaceObjectBase

OnMouseDoubleClick

Called during a mouse double click event on this object
protected virtual void OnMouseDoubleClick()
inherited fromUserInterfaceObjectBase

OnMouseDown

Called when the mouse goes down on this object
protected virtual void OnMouseDown(
mouse
Current mouse state when this event occurs
)
inherited fromUserInterfaceObjectBase

OnMouseEnter

Called when the mouse goes over this object
protected virtual void OnMouseEnter()
inherited fromUserInterfaceObjectBase

OnMouseLeave

Called when the mouse leaves this object
protected virtual void OnMouseLeave()
inherited fromUserInterfaceObjectBase

OnMouseMove

Called when the mouse is moved
protected virtual void OnMouseMove()
inherited fromUserInterfaceObjectBase

OnMouseUp

Called when the mouse is released on this object
protected virtual void OnMouseUp()
inherited fromUserInterfaceObjectBase

OnRunCommand

Called after the above RunCommand function is called. This will be executing while inside of a Rhino command.
protected virtual Result OnRunCommand(
doc,
Document that the command is running in
mode,
Interactive or scripted mode
mouse
Mouse state that was passed to RunCommand
)
inherited fromUserInterfaceObjectBase
Result of the command. The default implementation returns Success

RegisterForAllDocuments

Make this object visible for all documents. Typically you will only have user interface objects work with single documents. For that case, call doc.ViewUserInterface.Add
public bool RegisterForAllDocuments()
inherited fromUserInterfaceObjectBase

RunCommand

Call RunCommand to have the virtual OnRunCommand function executed in the scope of a Rhino command. If you are modifying the document from one of the mouse functions on this object, this is the best approach to do so since changes made inside of a command are recorded for undo.
public void RunCommand(
mouse
Current mouse state. This is handed back to OnRunCommand
)
inherited fromUserInterfaceObjectBase

SetSnapPoints

public void SetSnapPoints()
inherited fromGripUserInterfaceObject

Unregister

Unregister this object
public void Unregister()
inherited fromUserInterfaceObjectBase