MCPcopy Create free account
hub / github.com/Kitware/VTK / SubclassHoverAction

Method SubclassHoverAction

Interaction/Widgets/vtkBalloonWidget.cxx:292–322  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

290
291//------------------------------------------------------------------------------
292int 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//------------------------------------------------------------------------------
325int vtkBalloonWidget::SubclassEndHoverAction()

Callers 1

HoverActionMethod · 0.80

Calls 10

GetFirstNodeMethod · 0.80
RenderMethod · 0.65
UnRegisterMethod · 0.45
GetAssemblyPathMethod · 0.45
findMethod · 0.45
GetViewPropMethod · 0.45
endMethod · 0.45
RegisterMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected