ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CustomVtkCaptionWidget.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "qPCL.h"
16 #include <vtkCallbackCommand.h>
17 #include <vtkCaptionWidget.h>
18 #include <vtkCommand.h>
19 #include <vtkObject.h>
20 #include <vtkSmartPointer.h>
21 
22 // Forward declaration
23 class cc2DLabel;
24 
25 class QPCL_ENGINE_LIB_API CustomVtkCaptionWidget : public vtkCaptionWidget {
26 public:
28 
30 
31  void SetHandleEnabled(bool state);
32 
34  void SetAssociatedLabel(cc2DLabel* label);
35 
37  cc2DLabel* GetAssociatedLabel() const { return m_associatedLabel; }
38 
39 protected:
41  ~CustomVtkCaptionWidget() override;
42 
44  static void OnWidgetInteraction(vtkObject* caller,
45  unsigned long eventId,
46  void* clientData,
47  void* callData);
48 
51 
52 private:
54  void operator=(const CustomVtkCaptionWidget&) = delete;
55 };
vtkTypeMacro(CustomVtkCaptionWidget, vtkCaptionWidget)
static CustomVtkCaptionWidget * New()
vtkSmartPointer< vtkCallbackCommand > m_interactionCallback
cc2DLabel * GetAssociatedLabel() const
Get the associated cc2DLabel.
2D label (typically attached to points)
Definition: ecv2DLabel.h:22
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15