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

Method OnLeftButtonUp

Views/Infovis/vtkInteractorStyleTreeMapHover.cxx:309–352  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

307
308//------------------------------------------------------------------------------
309void vtkInteractorStyleTreeMapHover::OnLeftButtonUp()
310{
311 // Get the id of the object underneath the mouse
312 int x = this->Interactor->GetEventPosition()[0];
313 int y = this->Interactor->GetEventPosition()[1];
314 this->FindPokedRenderer(x, y);
315
316#if 0
317 vtkRenderer* r = this->CurrentRenderer;
318 if (r == nullptr)
319 {
320 return;
321 }
322
323 if (!r->HasViewProp(this->Balloon))
324 {
325 r->AddActor(this->Balloon);
326 this->Balloon->SetRenderer(r);
327 }
328
329 double loc[2] = {x, y};
330 this->Balloon->EndWidgetInteraction(loc);
331#endif
332
333 this->CurrentSelectedId = GetTreeMapIdAtPos(x, y);
334
335 // Get the pedigree id of this object and
336 // send out an event with that id as data
337 vtkIdType id = this->CurrentSelectedId;
338 vtkAbstractArray* absArray =
339 this->Layout->GetOutput()->GetVertexData()->GetAbstractArray("PedigreeVertexId");
340 if (absArray)
341 {
342 vtkIdTypeArray* idArray = vtkArrayDownCast<vtkIdTypeArray>(absArray);
343 if (idArray)
344 {
345 id = idArray->GetValue(this->CurrentSelectedId);
346 }
347 }
348 this->InvokeEvent(vtkCommand::UserEvent, &id);
349
350 this->HighLightCurrentSelectedItem();
351 Superclass::OnLeftButtonUp();
352}
353
354void vtkInteractorStyleTreeMapHover::HighLightItem(vtkIdType id)
355{

Callers

nothing calls this directly

Calls 12

OnLeftButtonUpFunction · 0.85
GetAbstractArrayMethod · 0.80
GetVertexDataMethod · 0.80
InvokeEventMethod · 0.80
FindPokedRendererMethod · 0.45
HasViewPropMethod · 0.45
AddActorMethod · 0.45
SetRendererMethod · 0.45
EndWidgetInteractionMethod · 0.45
GetOutputMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected