VTK
9.2.6
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
=========================================================================*/
22
23
#ifndef vtkVRMenuWidget_h
24
#define vtkVRMenuWidget_h
25
26
#include "
vtkAbstractWidget.h
"
27
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
28
#include "vtkRenderingVRModule.h"
// For export macro
29
#include <deque>
// for ivar
30
31
class
vtkEventData
;
32
class
vtkVRMenuRepresentation
;
33
34
class
VTKRENDERINGVR_EXPORT
vtkVRMenuWidget
:
public
vtkAbstractWidget
35
{
36
public
:
40
static
vtkVRMenuWidget
*
New
();
41
43
46
vtkTypeMacro(
vtkVRMenuWidget
,
vtkAbstractWidget
);
47
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
49
55
void
SetRepresentation
(
vtkVRMenuRepresentation
* rep);
56
60
void
CreateDefaultRepresentation
()
override
;
61
63
66
vtkGetMacro(
WidgetState
,
int
);
68
69
// Manage the state of the widget
70
enum
WidgetStateType
71
{
72
Start
= 0,
73
Active
74
};
75
#if !defined(VTK_LEGACY_REMOVE)
76
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
77
typedef
WidgetStateType
_WidgetState
;
78
#endif
79
81
84
void
PushFrontMenuItem
(
const
char
* name,
const
char
* text,
vtkCommand
* cmd);
85
void
RenameMenuItem
(
const
char
* name,
const
char
* text);
86
void
RemoveMenuItem
(
const
char
* name);
87
void
RemoveAllMenuItems
();
89
90
void
Show
(
vtkEventData
* ed);
91
void
ShowSubMenu
(
vtkVRMenuWidget
*);
92
93
protected
:
94
vtkVRMenuWidget
();
95
~vtkVRMenuWidget
()
override
;
96
97
int
WidgetState
;
98
99
class
InternalElement;
100
std::deque<InternalElement*>
Menus
;
101
102
// These are the callbacks for this widget
103
static
void
StartMenuAction
(
vtkAbstractWidget
*);
104
static
void
SelectMenuAction
(
vtkAbstractWidget
*);
105
static
void
MoveAction
(
vtkAbstractWidget
*);
106
107
vtkCallbackCommand
*
EventCommand
;
108
static
void
EventCallback
(
109
vtkObject
*
object
,
unsigned
long
event,
void
* clientdata,
void
* calldata);
110
114
static
void
Update
(
vtkAbstractWidget
*);
115
116
private
:
117
vtkVRMenuWidget
(
const
vtkVRMenuWidget
&) =
delete
;
118
void
operator=(
const
vtkVRMenuWidget
&) =
delete
;
119
};
120
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkCallbackCommand
supports function callbacks
Definition
vtkCallbackCommand.h:51
vtkCommand
superclass for callback/observer methods
Definition
vtkCommand.h:395
vtkEventData
Definition
vtkEventData.h:69
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:40
vtkObject::vtkObject
vtkObject()
vtkVRMenuRepresentation
Widget representation for vtkVRMenuWidget Implementation of the popup panel representation for the vt...
Definition
vtkVRMenuRepresentation.h:36
vtkVRMenuWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkVRMenuWidget::Update
static void Update(vtkAbstractWidget *)
Update callback to check for the hovered prop.
vtkVRMenuWidget::SetRepresentation
void SetRepresentation(vtkVRMenuRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkVRMenuWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkVRMenuWidget::SelectMenuAction
static void SelectMenuAction(vtkAbstractWidget *)
vtkVRMenuWidget::_WidgetState
WidgetStateType _WidgetState
Definition
vtkVRMenuWidget.h:77
vtkVRMenuWidget::RemoveMenuItem
void RemoveMenuItem(const char *name)
Methods to add/remove items to the menu, called by the menu widget.
vtkVRMenuWidget::~vtkVRMenuWidget
~vtkVRMenuWidget() override
vtkVRMenuWidget::EventCommand
vtkCallbackCommand * EventCommand
Definition
vtkVRMenuWidget.h:107
vtkVRMenuWidget::WidgetState
int WidgetState
Definition
vtkVRMenuWidget.h:97
vtkVRMenuWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
vtkVRMenuWidget::WidgetStateType
WidgetStateType
Definition
vtkVRMenuWidget.h:71
vtkVRMenuWidget::Active
@ Active
Definition
vtkVRMenuWidget.h:73
vtkVRMenuWidget::Start
@ Start
Definition
vtkVRMenuWidget.h:72
vtkVRMenuWidget::Menus
std::deque< InternalElement * > Menus
Definition
vtkVRMenuWidget.h:100
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::vtkVRMenuWidget
vtkVRMenuWidget()
vtkVRMenuWidget::ShowSubMenu
void ShowSubMenu(vtkVRMenuWidget *)
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.
vtkVRMenuWidget::EventCallback
static void EventCallback(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
vtkVRMenuWidget::RemoveAllMenuItems
void RemoveAllMenuItems()
Methods to add/remove items to the menu, called by the menu widget.
vtkVRMenuWidget::Show
void Show(vtkEventData *ed)
vtkVRMenuWidget::StartMenuAction
static void StartMenuAction(vtkAbstractWidget *)
vtkAbstractWidget.h
vtkDeprecation.h
VTK_DEPRECATED_IN_9_2_0
#define VTK_DEPRECATED_IN_9_2_0(reason)
Definition
vtkDeprecation.h:116
Generated on Sun Mar 23 2025 00:00:00 for VTK by
1.13.2