Rhino C++ API  9.0
Public Types | Public Member Functions | Protected Attributes | List of all members
CRhinoGripUserInterfaceObject Class Reference

#include <rhinoSdkUserInterfaceObject.h>

Inheritance diagram for CRhinoGripUserInterfaceObject:
CRhinoUserInterfaceObject CRhinoDirectionGripUserInterfaceObject CRhinoRotationGripUserInterfaceObject

Public Types

enum  GripShape { GripShape::Circle = 0, GripShape::Square = 1, GripShape::Triangle = 2, GripShape::X = 3 }
 

Public Member Functions

 CRhinoGripUserInterfaceObject ()
 
 CRhinoGripUserInterfaceObject (const ON_3dPoint &location)
 
virtual ~CRhinoGripUserInterfaceObject ()
 
int AddSnapPoints (int pointCount, const ON_3dPoint *snapPoints)
 
double CameraDepth (const ON_Plane &cameraPlane) const override
 
void ClearConstraints ()
 
void ClearSnapPoints ()
 
ON_3dPoint ComputeDragPoint (const CRhinoMouseEventArgs &mouse)
 
bool Constrain (const ON_Arc &arc)
 
bool Constrain (const ON_Circle &circle)
 
bool Constrain (const ON_Curve &curve)
 
bool Constrain (const ON_Line &line)
 
void Draw (CRhinoDisplayPipeline &dp) override
 
void EnableObjectSnapCursors (bool enable)
 
void EnableOnObjectCursors (bool enable)
 
GripShape GetGripShape () const
 
ON_Color GripColor () const
 
ON_Color GripFillColor () const
 
ON_3dPoint GripLocation () const
 
float GripRadius () const
 
float GripShapeRotationRadians () const
 
float GripStrokeWidth () const
 
bool IsMouseOver (const CRhinoMouseEventArgs &mouse) override
 
bool ObjectSnapCursorsEnabled () const
 
bool ObjectSnapPermitted () const
 
virtual void OnDrag (const ON_3dPoint &point, const CRhinoMouseEventArgs &mouse)
 
void OnMouseDown (const CRhinoMouseEventArgs &mouse) override
 
void OnMouseEnter (const CRhinoMouseEventArgs &mouse) override
 
void OnMouseLeave (const CRhinoMouseEventArgs &mouse) override
 
void OnMouseMove (const CRhinoMouseEventArgs &mouse) override
 
void OnMouseUp (const CRhinoMouseEventArgs &mouse) override
 
bool OnObjectCursorsEnabled () const
 
void PermitObjectSnap (bool permit)
 
void SetGripColor (const ON_Color &color)
 
void SetGripFillColor (const ON_Color &color)
 
void SetGripLocation (const ON_3dPoint &point)
 
void SetGripRadius (float radius)
 
void SetGripShape (GripShape shape)
 
void SetGripShapeRotationRadians (float angle)
 
void SetGripStrokeWidth (float width)
 
- Public Member Functions inherited from CRhinoUserInterfaceObject
 CRhinoUserInterfaceObject ()
 
virtual ~CRhinoUserInterfaceObject ()
 
void Animate (CRhinoAnimatingDouble &value, double target, double duration, AnimationStyle style, CRhinoDoc *doc)
 
void BindToActiveViewport (bool on)
 
void BindToViewport (unsigned int viewport_sn)
 
int DisplayOrder () const
 
ON_UUID DocumentGroupId () const
 
unsigned int DocumentRuntimeSerialNumber () const
 
bool GetData (const wchar_t *key, bool &value) const
 
bool GetData (const wchar_t *key, double &value) const
 
bool GetData (const wchar_t *key, int &value) const
 
bool GetData (const wchar_t *key, ON_UUID &value) const
 
bool GetData (const wchar_t *key, ON_wString &value) const
 
bool HasMouseCapture () const
 
bool IsBoundToActiveViewport () const
 
unsigned int IsBoundToViewport () const
 
virtual void OnMouseClick (const CRhinoMouseEventArgs &mouse)
 
virtual void OnMouseDoubleClick (const CRhinoMouseEventArgs &mouse)
 
virtual void OnMouseWheel (const CRhinoMouseEventArgs &mouse, int delta)
 
virtual CRhinoCommand::result OnRunCommand (const CRhinoCommandContext &context, const CRhinoMouseEventArgs &mouse)
 
virtual void OnTrackpadScroll (const CRhinoMouseEventArgs &mouse, double horizontal, double vertical)
 
CRhinoUserInterfaceObjectParent ()
 
const CRhinoUserInterfaceObjectParent () const
 
bool ReceivesMouseWheelEvents () const
 
bool ReceivesTrackpadScrollEvents () const
 
bool RegisterForAllDocuments ()
 
void RunCommand (const CRhinoMouseEventArgs &mouse)
 
unsigned int RuntimeSerialNumber () const
 
void SetCursor (HCURSOR cursor)
 
void SetData (const wchar_t *key, bool value)
 
void SetData (const wchar_t *key, const wchar_t *value)
 
void SetData (const wchar_t *key, double value)
 
void SetData (const wchar_t *key, int value)
 
void SetData (const wchar_t *key, ON_UUID value)
 
void SetDisplayOrder (int order)
 
void SetReceivesMouseWheelEvents (bool enable)
 
void SetReceivesTrackpadScrollEvents (bool enable)
 
void SetTooltip (const wchar_t *tooltip)
 
void SetVisible (bool visible)
 
bool UnregisterFromAllDocuments ()
 
bool Visible () const
 

Protected Attributes

class CRhGripUserInterfaceObjectPrivate * m_grip_private = nullptr
 
- Protected Attributes inherited from CRhinoUserInterfaceObject
class CRhUserInterfaceObjectPrivatem_private = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from CRhinoUserInterfaceObject
virtual void ContinueAnimate (CRhinoDoc *doc)
 
void SetMouseCapture (CRhinoDoc *doc)
 

Member Enumeration Documentation

◆ GripShape

Enumerator
Circle 
Square 
Triangle 

Constructor & Destructor Documentation

◆ CRhinoGripUserInterfaceObject() [1/2]

CRhinoGripUserInterfaceObject::CRhinoGripUserInterfaceObject ( )

◆ CRhinoGripUserInterfaceObject() [2/2]

CRhinoGripUserInterfaceObject::CRhinoGripUserInterfaceObject ( const ON_3dPoint location)

◆ ~CRhinoGripUserInterfaceObject()

virtual CRhinoGripUserInterfaceObject::~CRhinoGripUserInterfaceObject ( )
virtual

Member Function Documentation

◆ AddSnapPoints()

int CRhinoGripUserInterfaceObject::AddSnapPoints ( int  pointCount,
const ON_3dPoint snapPoints 
)

◆ CameraDepth()

double CRhinoGripUserInterfaceObject::CameraDepth ( const ON_Plane cameraPlane) const
overridevirtual

Description: If this is a "world space" type user interface object (grip, text dot, direction arrow), this function returns the minimum distance to the camera to allow for depth sorting user interface objects before drawing them. The default return value is ON_UNSET_VALUE

Reimplemented from CRhinoUserInterfaceObject.

◆ ClearConstraints()

void CRhinoGripUserInterfaceObject::ClearConstraints ( )

◆ ClearSnapPoints()

void CRhinoGripUserInterfaceObject::ClearSnapPoints ( )

◆ ComputeDragPoint()

ON_3dPoint CRhinoGripUserInterfaceObject::ComputeDragPoint ( const CRhinoMouseEventArgs mouse)

◆ Constrain() [1/4]

bool CRhinoGripUserInterfaceObject::Constrain ( const ON_Arc arc)

◆ Constrain() [2/4]

bool CRhinoGripUserInterfaceObject::Constrain ( const ON_Circle circle)

◆ Constrain() [3/4]

bool CRhinoGripUserInterfaceObject::Constrain ( const ON_Curve curve)

◆ Constrain() [4/4]

bool CRhinoGripUserInterfaceObject::Constrain ( const ON_Line line)

◆ Draw()

void CRhinoGripUserInterfaceObject::Draw ( CRhinoDisplayPipeline dp)
overridevirtual

Description: All user interface objects must implement a Draw function. This is where drawing using the input display pipeline is performed. The base class Draw function does nothing.

Reimplemented from CRhinoUserInterfaceObject.

Reimplemented in CRhinoRotationGripUserInterfaceObject, and CRhinoDirectionGripUserInterfaceObject.

◆ EnableObjectSnapCursors()

void CRhinoGripUserInterfaceObject::EnableObjectSnapCursors ( bool  enable)

◆ EnableOnObjectCursors()

void CRhinoGripUserInterfaceObject::EnableOnObjectCursors ( bool  enable)

◆ GetGripShape()

GripShape CRhinoGripUserInterfaceObject::GetGripShape ( ) const

◆ GripColor()

ON_Color CRhinoGripUserInterfaceObject::GripColor ( ) const

◆ GripFillColor()

ON_Color CRhinoGripUserInterfaceObject::GripFillColor ( ) const

◆ GripLocation()

ON_3dPoint CRhinoGripUserInterfaceObject::GripLocation ( ) const

◆ GripRadius()

float CRhinoGripUserInterfaceObject::GripRadius ( ) const

◆ GripShapeRotationRadians()

float CRhinoGripUserInterfaceObject::GripShapeRotationRadians ( ) const

◆ GripStrokeWidth()

float CRhinoGripUserInterfaceObject::GripStrokeWidth ( ) const

◆ IsMouseOver()

bool CRhinoGripUserInterfaceObject::IsMouseOver ( const CRhinoMouseEventArgs mouse)
overridevirtual

Description: Return true if the input mouse is considered to be over this object

Reimplemented from CRhinoUserInterfaceObject.

Reimplemented in CRhinoRotationGripUserInterfaceObject, and CRhinoDirectionGripUserInterfaceObject.

◆ ObjectSnapCursorsEnabled()

bool CRhinoGripUserInterfaceObject::ObjectSnapCursorsEnabled ( ) const

◆ ObjectSnapPermitted()

bool CRhinoGripUserInterfaceObject::ObjectSnapPermitted ( ) const

◆ OnDrag()

virtual void CRhinoGripUserInterfaceObject::OnDrag ( const ON_3dPoint point,
const CRhinoMouseEventArgs mouse 
)
virtual

Description: Gets called while the grip is being dragged to update the location. The default implementation calls SetGripLocation

Reimplemented in CRhinoRotationGripUserInterfaceObject, and CRhinoDirectionGripUserInterfaceObject.

◆ OnMouseDown()

void CRhinoGripUserInterfaceObject::OnMouseDown ( const CRhinoMouseEventArgs mouse)
overridevirtual

Description: Called when a mouse button goes down over this UI element Parameters: mouse - mouse position, button and view

Reimplemented from CRhinoUserInterfaceObject.

Reimplemented in CRhinoDirectionGripUserInterfaceObject.

◆ OnMouseEnter()

void CRhinoGripUserInterfaceObject::OnMouseEnter ( const CRhinoMouseEventArgs mouse)
overridevirtual

Description: Called when first goes over this object (IsMouseOver returns true)

Reimplemented from CRhinoUserInterfaceObject.

◆ OnMouseLeave()

void CRhinoGripUserInterfaceObject::OnMouseLeave ( const CRhinoMouseEventArgs mouse)
overridevirtual

Description: Called when mouse leaves this object (IsMouseOver returns false)

Reimplemented from CRhinoUserInterfaceObject.

◆ OnMouseMove()

void CRhinoGripUserInterfaceObject::OnMouseMove ( const CRhinoMouseEventArgs mouse)
overridevirtual

Description: Called when a mouse moves over this UI element Parameters: mouse - mouse position, button and view

Reimplemented from CRhinoUserInterfaceObject.

Reimplemented in CRhinoDirectionGripUserInterfaceObject.

◆ OnMouseUp()

void CRhinoGripUserInterfaceObject::OnMouseUp ( const CRhinoMouseEventArgs mouse)
overridevirtual

Description: Called when a mouse button goes up over this UI element Parameters: mouse - mouse position, button and view

Reimplemented from CRhinoUserInterfaceObject.

Reimplemented in CRhinoDirectionGripUserInterfaceObject.

◆ OnObjectCursorsEnabled()

bool CRhinoGripUserInterfaceObject::OnObjectCursorsEnabled ( ) const

◆ PermitObjectSnap()

void CRhinoGripUserInterfaceObject::PermitObjectSnap ( bool  permit)

◆ SetGripColor()

void CRhinoGripUserInterfaceObject::SetGripColor ( const ON_Color color)

◆ SetGripFillColor()

void CRhinoGripUserInterfaceObject::SetGripFillColor ( const ON_Color color)

◆ SetGripLocation()

void CRhinoGripUserInterfaceObject::SetGripLocation ( const ON_3dPoint point)

◆ SetGripRadius()

void CRhinoGripUserInterfaceObject::SetGripRadius ( float  radius)

◆ SetGripShape()

void CRhinoGripUserInterfaceObject::SetGripShape ( GripShape  shape)

◆ SetGripShapeRotationRadians()

void CRhinoGripUserInterfaceObject::SetGripShapeRotationRadians ( float  angle)

◆ SetGripStrokeWidth()

void CRhinoGripUserInterfaceObject::SetGripStrokeWidth ( float  width)

Member Data Documentation

◆ m_grip_private

class CRhGripUserInterfaceObjectPrivate* CRhinoGripUserInterfaceObject::m_grip_private = nullptr
protected