------------------------------------------------------------------------------
| 290 | |
| 291 | //------------------------------------------------------------------------------ |
| 292 | int vtkBalloonWidget::SubclassHoverAction() |
| 293 | { |
| 294 | double e[2]; |
| 295 | e[0] = static_cast<double>(this->Interactor->GetEventPosition()[0]); |
| 296 | e[1] = static_cast<double>(this->Interactor->GetEventPosition()[1]); |
| 297 | if (this->CurrentProp) |
| 298 | { |
| 299 | this->CurrentProp->UnRegister(this); |
| 300 | this->CurrentProp = nullptr; |
| 301 | } |
| 302 | |
| 303 | vtkAssemblyPath* path = this->GetAssemblyPath(e[0], e[1], 0., this->Picker); |
| 304 | |
| 305 | if (path != nullptr) |
| 306 | { |
| 307 | vtkPropMapIterator iter = this->PropMap->find(path->GetFirstNode()->GetViewProp()); |
| 308 | if (iter != this->PropMap->end()) |
| 309 | { |
| 310 | this->CurrentProp = (*iter).first; |
| 311 | this->CurrentProp->Register(this); |
| 312 | reinterpret_cast<vtkBalloonRepresentation*>(this->WidgetRep) |
| 313 | ->SetBalloonText((*iter).second.Text.c_str()); |
| 314 | reinterpret_cast<vtkBalloonRepresentation*>(this->WidgetRep) |
| 315 | ->SetBalloonImage((*iter).second.Image); |
| 316 | this->WidgetRep->StartWidgetInteraction(e); |
| 317 | this->Render(); |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | return 1; |
| 322 | } |
| 323 | |
| 324 | //------------------------------------------------------------------------------ |
| 325 | int vtkBalloonWidget::SubclassEndHoverAction() |
no test coverage detected