Rhino C++ API
8.13
|
#include <rhinoSdkEventWatcher.h>
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_display_mode_settings_changed = 16, event_type_object_manager_changed = 17, event_type_pageview_properties_changed = 18, event_type_getpoint_event = 19, event_type_max, event_type_force_4byte_size = 0xFFFFFFFF } |
Public Member Functions | |
void | Enable (bool bEnable) |
bool | IsEnabled () const |
bool | IsHeadlessAppAware () const |
bool | IsHeadlessDocAware () 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) | |
CRhinoEventWatcherEx (CRhinoEventWatcherEx::event_type et, ON_UUID plugin_id, bool headlessDocAware, bool headlessAppAware) | |
virtual | ~CRhinoEventWatcherEx () |
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 idle, 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_display_mode_settings_changed | Called after a display mode's setting(s) have been saved/changed. |
event_type_object_manager_changed | Called when an object manager event is raised. |
event_type_pageview_properties_changed | Called when the properties of page layout view changed. |
event_type_getpoint_event | Call when there is a CRhinoGetPoint::GetPoint event. |
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. |
|
protected |
|
protected |
Description: By default event watchers are not called for headless docs and headless app scenarios. Use this constructor if you want to make your event watcher be called for these headless cases. Note that there is a good chance that your event watcher can be called on a different thread than expected when dealing with "headless"
|
protectedvirtual |
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().
bool CRhinoEventWatcherEx::IsEnabled | ( | ) | const |
Returns: True if this watcher is enabled.
bool CRhinoEventWatcherEx::IsHeadlessAppAware | ( | ) | const |
bool CRhinoEventWatcherEx::IsHeadlessDocAware | ( | ) | const |
bool CRhinoEventWatcherEx::IsRegistered | ( | ) | const |
Returns: True if this watcher is registered.
void CRhinoEventWatcherEx::operator delete | ( | void * | ) |
void CRhinoEventWatcherEx::operator delete | ( | void * | , |
void * | |||
) |
void CRhinoEventWatcherEx::operator delete[] | ( | void * | ) |
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.
void* CRhinoEventWatcherEx::operator new | ( | size_t | , |
void * | |||
) |
in place new/delete
void* CRhinoEventWatcherEx::operator new[] | ( | size_t | ) |
array new/delete
bool CRhinoEventWatcherEx::Register | ( | ) |
Call this function to register your watcher. Your watcher will not be called until it is registered.
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.
const event_type CRhinoEventWatcherEx::m_event_type |
Type of event being watched.
const ON_UUID CRhinoEventWatcherEx::m_plugin_id |
ID of plug-in that is watching.
const unsigned int CRhinoEventWatcherEx::m_watcher_sn |
unique runtime serial number for this watcher