------------------------------------------------------------------------------
| 1008 | |
| 1009 | //------------------------------------------------------------------------------ |
| 1010 | void vtkInteractorStyle::ProcessEvents( |
| 1011 | vtkObject* vtkNotUsed(object), unsigned long event, void* clientdata, void* calldata) |
| 1012 | { |
| 1013 | vtkInteractorStyle* self = reinterpret_cast<vtkInteractorStyle*>(clientdata); |
| 1014 | |
| 1015 | bool aborted = false; |
| 1016 | |
| 1017 | switch (event) |
| 1018 | { |
| 1019 | case vtkCommand::ExposeEvent: |
| 1020 | if (self->HandleObservers && self->HasObserver(vtkCommand::ExposeEvent)) |
| 1021 | { |
| 1022 | self->InvokeEvent(vtkCommand::ExposeEvent, nullptr); |
| 1023 | } |
| 1024 | else |
| 1025 | { |
| 1026 | self->OnExpose(); |
| 1027 | } |
| 1028 | break; |
| 1029 | |
| 1030 | case vtkCommand::ConfigureEvent: |
| 1031 | if (self->HandleObservers && self->HasObserver(vtkCommand::ConfigureEvent)) |
| 1032 | { |
| 1033 | self->InvokeEvent(vtkCommand::ConfigureEvent, nullptr); |
| 1034 | } |
| 1035 | else |
| 1036 | { |
| 1037 | self->OnConfigure(); |
| 1038 | } |
| 1039 | break; |
| 1040 | |
| 1041 | case vtkCommand::EnterEvent: |
| 1042 | if (self->HandleObservers && self->HasObserver(vtkCommand::EnterEvent)) |
| 1043 | { |
| 1044 | self->InvokeEvent(vtkCommand::EnterEvent, nullptr); |
| 1045 | } |
| 1046 | else |
| 1047 | { |
| 1048 | self->OnEnter(); |
| 1049 | } |
| 1050 | break; |
| 1051 | |
| 1052 | case vtkCommand::LeaveEvent: |
| 1053 | if (self->HandleObservers && self->HasObserver(vtkCommand::LeaveEvent)) |
| 1054 | { |
| 1055 | self->InvokeEvent(vtkCommand::LeaveEvent, nullptr); |
| 1056 | } |
| 1057 | else |
| 1058 | { |
| 1059 | self->OnLeave(); |
| 1060 | } |
| 1061 | break; |
| 1062 | |
| 1063 | case vtkCommand::TimerEvent: |
| 1064 | { |
| 1065 | // The calldata should be a timer id, but because of legacy we check |
| 1066 | // and make sure that it is non-nullptr. |
| 1067 | int timerId = (calldata ? *(reinterpret_cast<int*>(calldata)) : 1); |
nothing calls this directly
no test coverage detected