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

#include <rhinoSdkMouse.h>

Inheritance diagram for CRhinoMouseCallback:
RhRdk::Realtime::DisplayMode

Public Types

enum  mouse_button {
  no_mouse_button = 0, left_mouse_button = 1, right_mouse_button = 2, middle_mouse_button = 3,
  x_mouse_button = 4
}
 

Public Member Functions

 CRhinoMouseCallback ()=default
 
virtual ~CRhinoMouseCallback ()
 
void Enable (bool enabled)
 
bool IsEnabled () const
 Returns TRUE if the mouse callback is enabled. More...
 
virtual void OnBeginMouseDown (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool &executeDefaultHandler)
 Called at the beginning of CRhinoView processing a mouse down event. More...
 
virtual void OnBeginMouseMove (unsigned int viewSerialNumber, UINT flags, const ON_2iPoint &point, bool &executeDefaultHandler)
 Called at the beginning of CRhinoView processing a mouse move event. More...
 
virtual void OnBeginMouseUp (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool &executeDefaultHandler)
 Called at the beginning of CRhinoView processing a mouse up event. More...
 
virtual BOOL OnMouseDblClk (CRhinoView &, CRhinoMouseCallback::mouse_button, UINT, const ON_2iPoint &)
 
virtual void OnMouseDown (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool defaultHandlerExecuted)
 Called at the end of CRhinoView processing a mouse down event. More...
 
virtual void OnMouseMove (unsigned int viewSerialNumber, UINT flags, const ON_2iPoint &point, bool defaultHandlerExecuted)
 Called at the end of CRhinoView processing a mouse move event. More...
 
virtual void OnMouseUp (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool defaultHandlerExecuted)
 Called at the end of CRhinoView processing a mouse up event. More...
 

Protected Attributes

class CRhMouseCallbackManager * m_cbm = nullptr
 

Detailed Description

Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.

Member Enumeration Documentation

◆ mouse_button

Enumerator
no_mouse_button 
left_mouse_button 
right_mouse_button 
middle_mouse_button 
x_mouse_button 

Constructor & Destructor Documentation

◆ CRhinoMouseCallback()

CRhinoMouseCallback::CRhinoMouseCallback ( )
default

◆ ~CRhinoMouseCallback()

virtual CRhinoMouseCallback::~CRhinoMouseCallback ( )
virtual

Member Function Documentation

◆ Enable()

void CRhinoMouseCallback::Enable ( bool  enabled)

When constructed, the mouse callback is not enabled. After Enable(true) is called, all mouse event pass through the callback. Calling Enable(false) or destroying the class disables the callback.

◆ IsEnabled()

bool CRhinoMouseCallback::IsEnabled ( ) const

Returns TRUE if the mouse callback is enabled.

◆ OnBeginMouseDown()

virtual void CRhinoMouseCallback::OnBeginMouseDown ( unsigned int  viewSerialNumber,
mouse_button  button,
UINT  flags,
const ON_2iPoint point,
bool &  executeDefaultHandler 
)
virtual

Called at the beginning of CRhinoView processing a mouse down event.

Reimplemented in RhRdk::Realtime::DisplayMode.

◆ OnBeginMouseMove()

virtual void CRhinoMouseCallback::OnBeginMouseMove ( unsigned int  viewSerialNumber,
UINT  flags,
const ON_2iPoint point,
bool &  executeDefaultHandler 
)
virtual

Called at the beginning of CRhinoView processing a mouse move event.

◆ OnBeginMouseUp()

virtual void CRhinoMouseCallback::OnBeginMouseUp ( unsigned int  viewSerialNumber,
mouse_button  button,
UINT  flags,
const ON_2iPoint point,
bool &  executeDefaultHandler 
)
virtual

Called at the beginning of CRhinoView processing a mouse up event.

Reimplemented in RhRdk::Realtime::DisplayMode.

◆ OnMouseDblClk()

virtual BOOL CRhinoMouseCallback::OnMouseDblClk ( CRhinoView ,
CRhinoMouseCallback::mouse_button  ,
UINT  ,
const ON_2iPoint  
)
virtual

Override if you want to handle mouse double click events. If you return TRUE, the default handler is not called. If you return FALSE, the default OnMouseDblClick() handler is called.

Reimplemented in RhRdk::Realtime::DisplayMode.

◆ OnMouseDown()

virtual void CRhinoMouseCallback::OnMouseDown ( unsigned int  viewSerialNumber,
mouse_button  button,
UINT  flags,
const ON_2iPoint point,
bool  defaultHandlerExecuted 
)
virtual

Called at the end of CRhinoView processing a mouse down event.

Reimplemented in RhRdk::Realtime::DisplayMode.

◆ OnMouseMove()

virtual void CRhinoMouseCallback::OnMouseMove ( unsigned int  viewSerialNumber,
UINT  flags,
const ON_2iPoint point,
bool  defaultHandlerExecuted 
)
virtual

Called at the end of CRhinoView processing a mouse move event.

◆ OnMouseUp()

virtual void CRhinoMouseCallback::OnMouseUp ( unsigned int  viewSerialNumber,
mouse_button  button,
UINT  flags,
const ON_2iPoint point,
bool  defaultHandlerExecuted 
)
virtual

Called at the end of CRhinoView processing a mouse up event.

Reimplemented in RhRdk::Realtime::DisplayMode.

Member Data Documentation

◆ m_cbm

class CRhMouseCallbackManager* CRhinoMouseCallback::m_cbm = nullptr
protected