RotationGripUserInterfaceObject

GripUserInterfaceObjectUserInterfaceObjectBase
A point plus arc that represents a grip used for rotational dragging

Constructors

RotationGripUserInterfaceObject

#Since v9.0
public RotationGripUserInterfaceObject(Plane plane, double radius)
Create a rotation grip that is aligned to a plane with a defined radius in pixels
plane (Plane)Plane for rotation. Origin of the plane is the center of rotation. ZAxis of plane is axis that rotation occurs around. XAxis of plane is vector along which the grip is located.
radius (double)Radius of rotation circle in pixel distance

Properties

BoundToActiveView

public bool BoundToActiveView { get; set; }
inherited fromUserInterfaceObjectBase

GripColor

public Color GripColor { get; set; }
inherited fromGripUserInterfaceObject

GripFillColor

public Color GripFillColor { get; set; }
inherited fromGripUserInterfaceObject

GripLocation

public Point3d GripLocation { get; set; }
inherited fromGripUserInterfaceObject

GripPointVisible

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

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

public bool HasKeyboardFocus { get; }
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.
inherited fromUserInterfaceObjectBase

ObjectSnapCursorsEnabled

public bool ObjectSnapCursorsEnabled { get; set; }
inherited fromGripUserInterfaceObject

ObjectSnapPermitted

public bool ObjectSnapPermitted { get; set; }
inherited fromGripUserInterfaceObject

OnObjectCursorsEnabled

public bool OnObjectCursorsEnabled { get; set; }
inherited fromGripUserInterfaceObject

Tooltip

public string Tooltip { get; set; }
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.
inherited fromUserInterfaceObjectBase

Visible

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

Methods

ArcVisibleInViewport

#Since v9.0
public bool ArcVisibleInViewport(RhinoViewport viewport)
If the arc for a given viewport visible.
viewport (RhinoViewport)

ClearSnapPoints

public void ClearSnapPoints()
inherited fromGripUserInterfaceObject

Constrain

public void Constrain(Arc arc)
inherited fromGripUserInterfaceObject
arc (Arc)

Constrain

public void Constrain(Circle circle)
inherited fromGripUserInterfaceObject
circle (Circle)

Constrain

public void Constrain(Curve curve)
inherited fromGripUserInterfaceObject
curve (Curve)

Constrain

public void Constrain(Line line)
inherited fromGripUserInterfaceObject
line (Line)

IsMouseOver

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

IsRegistered

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

OnDrag

protected virtual void OnDrag(Point3d newLocation, MouseState mouse)
inherited fromGripUserInterfaceObject
newLocation (Point3d)
mouse (MouseState)

OnDraw

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

OnMouseClick

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

OnMouseDoubleClick

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

OnMouseDown

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

OnMouseEnter

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

OnMouseLeave

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

OnMouseMove

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

OnMouseUp

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

OnRotationDrag

#
protected virtual void OnRotationDrag(double angle, MouseState mouse)
Called when dragging a rotation grip. Angle is the amount that the plane will be rotated when dragging
angle (double)signed angle of rotation amout
mouse (MouseState)mouse state while dragging

OnRunCommand

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

RegisterForAllDocuments

public bool 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
inherited fromUserInterfaceObjectBase

RunCommand

public void RunCommand(MouseState mouse)
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.
inherited fromUserInterfaceObjectBase
mouse (MouseState)Current mouse state. This is handed back to OnRunCommand

SetSnapPoints

public void SetSnapPoints(IEnumerable<Point3d> points)
inherited fromGripUserInterfaceObject
points (IEnumerable<Point3d>)

Unregister

public void Unregister()
Unregister this object
inherited fromUserInterfaceObjectBase