VTK  9.7.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 "vtkWrappingHints.h" // For VTK_MARSHALAUTO
22 #include <deque> // for ivar
23 
24 VTK_ABI_NAMESPACE_BEGIN
26 {
27 public:
31  static vtkVRMenuRepresentation* New();
32 
34 
38  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  void BuildRepresentation() override;
46 
48  unsigned long event, void* calldata) override;
50  unsigned long event, void* calldata) override;
52  unsigned long event, void* calldata) override;
54 
56 
59  void ReleaseGraphicsResources(vtkWindow*) override;
61  int RenderOverlay(vtkViewport*) override;
63 
65 
68  void PushFrontMenuItem(const char* name, const char* text, vtkCommand* cmd);
69  void RenameMenuItem(const char* name, const char* text);
70  void RemoveMenuItem(const char* name);
71  void RemoveAllMenuItems();
73 
74  vtkGetMacro(CurrentOption, double);
75 
76 protected:
78  ~vtkVRMenuRepresentation() override;
79 
80  class InternalElement;
81  std::deque<InternalElement*> Menus;
82 
83  double CurrentOption; // count from start of the list
84  double PlacedPos[3];
85  double PlacedDOP[3];
86  double PlacedVUP[3];
87  double PlacedVRight[3];
88  double PlacedOrientation[3];
89 
90 private:
92  void operator=(const vtkVRMenuRepresentation&) = delete;
93 };
94 
95 VTK_ABI_NAMESPACE_END
96 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
abstract specification for Viewports
Definition: vtkViewport.h:46
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:41
platform-independent render window interaction including picking and frame rate control.
superclass for callback/observer methods
Definition: vtkCommand.h:384
std::deque< InternalElement * > Menus
a simple class to control print indentation
Definition: vtkIndent.h:28
int RenderOverlay(vtkViewport *viewport) override
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...
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...
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...