VTK  9.3.1
vtkVRMenuRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkVRMenuRepresentation_h
17 #define vtkVRMenuRepresentation_h
18 
19 #include "vtkRenderingVRModule.h" // For export macro
21 #include <deque> // for ivar
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKRENDERINGVR_EXPORT vtkVRMenuRepresentation : public vtkWidgetRepresentation
25 {
26 public:
30  static vtkVRMenuRepresentation* New();
31 
33 
37  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  void BuildRepresentation() override;
45 
47  unsigned long event, void* calldata) override;
49  unsigned long event, void* calldata) override;
51  unsigned long event, void* calldata) override;
53 
55 
58  void ReleaseGraphicsResources(vtkWindow*) override;
60  int RenderOverlay(vtkViewport*) override;
62 
64 
67  void PushFrontMenuItem(const char* name, const char* text, vtkCommand* cmd);
68  void RenameMenuItem(const char* name, const char* text);
69  void RemoveMenuItem(const char* name);
70  void RemoveAllMenuItems();
72 
73  vtkGetMacro(CurrentOption, double);
74 
75 protected:
77  ~vtkVRMenuRepresentation() override;
78 
79  class InternalElement;
80  std::deque<InternalElement*> Menus;
81 
82  double CurrentOption; // count from start of the list
83  double PlacedPos[3];
84  double PlacedDOP[3];
85  double PlacedVUP[3];
86  double PlacedVRight[3];
87  double PlacedOrientation[3];
88 
89 private:
91  void operator=(const vtkVRMenuRepresentation&) = delete;
92 };
93 
94 VTK_ABI_NAMESPACE_END
95 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
abstract specification for Viewports
Definition: vtkViewport.h:44
virtual void ComplexInteraction(vtkRenderWindowInteractor *, vtkAbstractWidget *, unsigned long, void *)
virtual void EndComplexInteraction(vtkRenderWindowInteractor *, vtkAbstractWidget *, unsigned long, void *)
virtual void StartComplexInteraction(vtkRenderWindowInteractor *, vtkAbstractWidget *, unsigned long, void *)
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
platform-independent render window interaction including picking and frame rate control.
superclass for callback/observer methods
Definition: vtkCommand.h:383
std::deque< InternalElement * > Menus
a simple class to control print indentation
Definition: vtkIndent.h:28
Widget representation for vtkVRMenuWidget Implementation of the popup panel representation for the vt...
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
define the API for widget / widget representation
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...