------------------------------------------------------------------------------
| 307 | |
| 308 | //------------------------------------------------------------------------------ |
| 309 | void 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 | |
| 354 | void vtkInteractorStyleTreeMapHover::HighLightItem(vtkIdType id) |
| 355 | { |
nothing calls this directly
no test coverage detected