VTK  9.2.6
vtkVRMenuRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkVRMenuRepresentation.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkVRMenuRepresentation_h
29 #define vtkVRMenuRepresentation_h
30 
31 #include "vtkRenderingVRModule.h" // For export macro
33 #include <deque> // for ivar
34 
35 class VTKRENDERINGVR_EXPORT vtkVRMenuRepresentation : public vtkWidgetRepresentation
36 {
37 public:
41  static vtkVRMenuRepresentation* New();
42 
44 
48  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
55  void BuildRepresentation() override;
56 
58  unsigned long event, void* calldata) override;
60  unsigned long event, void* calldata) override;
62  unsigned long event, void* calldata) override;
64 
66 
69  void ReleaseGraphicsResources(vtkWindow*) override;
71  int RenderOverlay(vtkViewport*) override;
73 
75 
78  void PushFrontMenuItem(const char* name, const char* text, vtkCommand* cmd);
79  void RenameMenuItem(const char* name, const char* text);
80  void RemoveMenuItem(const char* name);
81  void RemoveAllMenuItems();
83 
84  vtkGetMacro(CurrentOption, double);
85 
86 protected:
88  ~vtkVRMenuRepresentation() override;
89 
90  class InternalElement;
91  std::deque<InternalElement*> Menus;
92 
93  double CurrentOption; // count from start of the list
94  double PlacedPos[3];
95  double PlacedDOP[3];
96  double PlacedVUP[3];
97  double PlacedVRight[3];
98  double PlacedOrientation[3];
99 
100 private:
102  void operator=(const vtkVRMenuRepresentation&) = delete;
103 };
104 
105 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
abstract specification for Viewports
Definition: vtkViewport.h:55
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:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
platform-independent render window interaction including picking and frame rate control.
superclass for callback/observer methods
Definition: vtkCommand.h:394
std::deque< InternalElement * > Menus
a simple class to control print indentation
Definition: vtkIndent.h:39
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...