VTK
9.1.0
Rendering
VR
vtkVRMenuWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkVRMenuWidget.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
=========================================================================*/
23
#ifndef vtkVRMenuWidget_h
24
#define vtkVRMenuWidget_h
25
26
#include "
vtkAbstractWidget.h
"
27
#include "vtkRenderingVRModule.h"
// For export macro
28
#include <deque>
// for ivar
29
30
class
vtkEventData
;
31
class
vtkVRMenuRepresentation
;
32
class
vtkPropMap;
33
class
vtkProp
;
34
35
class
VTKRENDERINGVR_EXPORT
vtkVRMenuWidget
:
public
vtkAbstractWidget
36
{
37
public
:
41
static
vtkVRMenuWidget
*
New
();
42
44
47
vtkTypeMacro(
vtkVRMenuWidget
,
vtkAbstractWidget
);
48
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
50
56
void
SetRepresentation
(
vtkVRMenuRepresentation
* rep);
57
61
void
CreateDefaultRepresentation
()
override
;
62
64
67
vtkGetMacro(WidgetState,
int
);
69
70
// Manage the state of the widget
71
enum
_WidgetState
72
{
73
Start = 0,
74
Active
75
};
76
78
81
void
PushFrontMenuItem
(
const
char
*
name
,
const
char
* text,
vtkCommand
* cmd);
82
void
RenameMenuItem
(
const
char
*
name
,
const
char
* text);
83
void
RemoveMenuItem
(
const
char
*
name
);
84
void
RemoveAllMenuItems
();
86
87
void
Show
(
vtkEventData
* ed);
88
void
ShowSubMenu
(
vtkVRMenuWidget
*);
89
90
protected
:
91
vtkVRMenuWidget
();
92
~vtkVRMenuWidget
()
override
;
93
94
int
WidgetState
;
95
96
class
InternalElement;
97
std::deque<InternalElement*>
Menus
;
98
99
// These are the callbacks for this widget
100
static
void
StartMenuAction
(
vtkAbstractWidget
*);
101
static
void
SelectMenuAction
(
vtkAbstractWidget
*);
102
static
void
MoveAction
(
vtkAbstractWidget
*);
103
104
vtkCallbackCommand
*
EventCommand
;
105
static
void
EventCallback
(
106
vtkObject
*
object
,
unsigned
long
event,
void
* clientdata,
void
* calldata);
107
111
static
void
Update
(
vtkAbstractWidget
*);
112
113
private
:
114
vtkVRMenuWidget
(
const
vtkVRMenuWidget
&) =
delete
;
115
void
operator=(
const
vtkVRMenuWidget
&) =
delete
;
116
};
117
#endif
vtkCommand
superclass for callback/observer methods
Definition:
vtkCommand.h:394
vtkVRMenuWidget::WidgetState
int WidgetState
Definition:
vtkVRMenuWidget.h:94
vtkVRMenuWidget::StartMenuAction
static void StartMenuAction(vtkAbstractWidget *)
vtkEventData
Definition:
vtkEventData.h:69
vtkVRMenuWidget::PushFrontMenuItem
void PushFrontMenuItem(const char *name, const char *text, vtkCommand *cmd)
Methods to add/remove items to the menu, called by the menu widget.
vtkAbstractWidget.h
vtkVRMenuWidget::Update
static void Update(vtkAbstractWidget *)
Update callback to check for the hovered prop.
vtkVRMenuWidget::vtkVRMenuWidget
vtkVRMenuWidget()
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:82
vtkVRMenuWidget::_WidgetState
_WidgetState
Definition:
vtkVRMenuWidget.h:72
vtkVRMenuWidget::RenameMenuItem
void RenameMenuItem(const char *name, const char *text)
Methods to add/remove items to the menu, called by the menu widget.
vtkVRMenuWidget::New
static vtkVRMenuWidget * New()
Instantiate the object.
vtkVRMenuWidget::RemoveMenuItem
void RemoveMenuItem(const char *name)
Methods to add/remove items to the menu, called by the menu widget.
vtkVRMenuWidget::Show
void Show(vtkEventData *ed)
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:66
vtkVRMenuRepresentation
Widget representation for vtkVRMenuWidget Implementation of the popup panel representation for the vt...
Definition:
vtkVRMenuRepresentation.h:44
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkVRMenuWidget::SetRepresentation
void SetRepresentation(vtkVRMenuRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkVRMenuWidget::Menus
std::deque< InternalElement * > Menus
Definition:
vtkVRMenuWidget.h:96
vtkVRMenuWidget::SelectMenuAction
static void SelectMenuAction(vtkAbstractWidget *)
vtkVRMenuWidget::EventCallback
static void EventCallback(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
vtkX3D::name
@ name
Definition:
vtkX3D.h:225
vtkProp
abstract superclass for all actors, volumes and annotations
Definition:
vtkProp.h:76
vtkVRMenuWidget
3D widget to display a menu in VR
Definition:
vtkVRMenuWidget.h:36
vtkVRMenuWidget::~vtkVRMenuWidget
~vtkVRMenuWidget() override
vtkVRMenuWidget::EventCommand
vtkCallbackCommand * EventCommand
Definition:
vtkVRMenuWidget.h:104
vtkCallbackCommand
supports function callbacks
Definition:
vtkCallbackCommand.h:154
vtkVRMenuWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkVRMenuWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkVRMenuWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
vtkVRMenuWidget::RemoveAllMenuItems
void RemoveAllMenuItems()
Methods to add/remove items to the menu, called by the menu widget.
vtkVRMenuWidget::ShowSubMenu
void ShowSubMenu(vtkVRMenuWidget *)
Generated on Fri Nov 5 2021 00:11:18 for VTK by
1.8.20