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

#include <rhinoSdkEventWatcher.h>

Inheritance diagram for CRhinoEventWatcherEx:
CRhinoAfterTransformObject CRhinoDisplayModeChanged CRhinoIsIdle CRhinoModelessUserInterfaceDocChanged CRhinoOnAfterPostReadViewUpdate CRhinoOnBeforePostReadViewUpdate CRhinoOnChangeObjectSelectState CRhinoOnDocUserStringChanged CRhinoOnMainLoopEvent CRhinoOnSetActiveDetailObject CRhinoOnTransformObject CRhinoOnViewModifiedEvent CRhinoPlugInSettingsChanged CRhinoTargetDocChanged CRhinoUiFileEvent

Public Types

enum  event_type {
  event_type_none = 0, event_type_transform_object = 1, event_type_change_object_select_state = 2, event_type_after_transform_object = 3,
  event_type_set_active_detail_object = 4, event_type_view_display_mode_changed = 5, event_type_before_post_read_view_update = 6, event_type_after_post_read_view_update = 7,
  event_type_rhino_is_idle = 8, event_type_modeless_ui_doc_changed = 9, event_type_target_doc_changed = 10, event_type_plug_in_settings_changed = 11,
  event_type_rui_file = 12, event_type_main_loop = 13, event_type_view_modified = 14, event_type_doc_user_text_changed = 15,
  event_type_max, event_type_force_4byte_size = 0xFFFFFFFF
}
 

Public Member Functions

void Enable (bool bEnable)
 
bool IsEnabled () const
 
bool IsRegistered () const
 
void operator delete (void *)
 
void operator delete (void *, void *)
 
void operator delete[] (void *)
 
void * operator new (size_t)
 new/delete More...
 
void * operator new (size_t, void *)
 in place new/delete More...
 
void * operator new[] (size_t)
 array new/delete More...
 
bool Register ()
 
bool Unregister ()
 

Public Attributes

const event_type m_event_type
 Type of event being watched. More...
 
const ON_UUID m_plugin_id
 ID of plug-in that is watching. More...
 
const unsigned int m_watcher_sn
 unique runtime serial number for this watcher More...
 

Protected Member Functions

 CRhinoEventWatcherEx (CRhinoEventWatcherEx::event_type et, ON_UUID plugin_id)
 
virtual ~CRhinoEventWatcherEx ()
 

Member Enumeration Documentation

◆ event_type

Enumerator
event_type_none 
event_type_transform_object 

Called before objects are transformed.

event_type_change_object_select_state 

Object selection state changed.

event_type_after_transform_object 

Called after objects are transformed.

event_type_set_active_detail_object 

Called after a page view's active detail object has changed.

event_type_view_display_mode_changed 

Called after view's display mode has been changed.

event_type_before_post_read_view_update 

Called after a .3dm file is read to bracket the adjustments to views and clipping planes.

event_type_after_post_read_view_update 
event_type_rhino_is_idle 

Called when Rhino is idle. Do not do anything time consuming when responding to this event.

event_type_modeless_ui_doc_changed 

Called when the Rhino document that modeless user interface refers to has changed. If you get this event, invalidate your window and wait for something like a paint message to come along. At that time, call RhinoApp().ModelessUserInterfaceDocRuntimeSerialNumber() and update your display accordingly. Do not do extensive regeneration code when this event happens.

event_type_target_doc_changed 

Called when the Rhino document that a new command will target has changed. If you get this event, do something fast and simple and return immediately. Later, when Rhino is idel, call RhinoApp().TargetDocRuntimeSerialNumber() and update your information accordingly. Do not do extensive regeneration code when this event happens.

event_type_plug_in_settings_changed 

Called when plug-in settings files have been over written.

event_type_rui_file 

Called when a RUI file event is raised.

event_type_main_loop 

Called every iteration of the Rhino main message loop.

event_type_view_modified 

Called after a view has been modified.

event_type_doc_user_text_changed 

Called after document user text is set.

event_type_max 

Bound on event type value.

event_type_force_4byte_size 

This line insures that adding events will not change the size of event_type.

Constructor & Destructor Documentation

◆ CRhinoEventWatcherEx()

CRhinoEventWatcherEx::CRhinoEventWatcherEx ( CRhinoEventWatcherEx::event_type  et,
ON_UUID  plugin_id 
)
protected

◆ ~CRhinoEventWatcherEx()

virtual CRhinoEventWatcherEx::~CRhinoEventWatcherEx ( )
protectedvirtual

Member Function Documentation

◆ Enable()

void CRhinoEventWatcherEx::Enable ( bool  bEnable)

Description: The constructor enables the watcher so that it will be called as soon as it is registered. If you need to disable/enable the watcher frequently, then the Enable() function is more efficient than calling Register()/Unregister().

◆ IsEnabled()

bool CRhinoEventWatcherEx::IsEnabled ( ) const

Returns: True if this watcher is enabled.

◆ IsRegistered()

bool CRhinoEventWatcherEx::IsRegistered ( ) const

Returns: True if this watcher is registered.

◆ operator delete() [1/2]

void CRhinoEventWatcherEx::operator delete ( void *  )

◆ operator delete() [2/2]

void CRhinoEventWatcherEx::operator delete ( void *  ,
void *   
)

◆ operator delete[]()

void CRhinoEventWatcherEx::operator delete[] ( void *  )

◆ operator new() [1/2]

void* CRhinoEventWatcherEx::operator new ( size_t  )

new/delete

Insure the heap used by event watcher classes is reliable and independent of plug-in heap choices.

◆ operator new() [2/2]

void* CRhinoEventWatcherEx::operator new ( size_t  ,
void *   
)

in place new/delete

◆ operator new[]()

void* CRhinoEventWatcherEx::operator new[] ( size_t  )

array new/delete

◆ Register()

bool CRhinoEventWatcherEx::Register ( )

Call this function to register your watcher. Your watcher will not be called until it is registered.

◆ Unregister()

bool CRhinoEventWatcherEx::Unregister ( )

Description: Call this function to unregister your watcher. If you need to disable and enable a watcher frequently, then use the Enable() function.

Member Data Documentation

◆ m_event_type

const event_type CRhinoEventWatcherEx::m_event_type

Type of event being watched.

◆ m_plugin_id

const ON_UUID CRhinoEventWatcherEx::m_plugin_id

ID of plug-in that is watching.

◆ m_watcher_sn

const unsigned int CRhinoEventWatcherEx::m_watcher_sn

unique runtime serial number for this watcher