VTK
9.6.20260415
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Rendering
VR
vtkVRMenuWidget.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
10
11
#ifndef vtkVRMenuWidget_h
12
#define vtkVRMenuWidget_h
13
14
#include "
vtkAbstractWidget.h
"
15
#include "vtkRenderingVRModule.h"
// For export macro
16
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
17
#include <deque>
// for ivar
18
19
VTK_ABI_NAMESPACE_BEGIN
20
class
vtkEventData
;
21
class
vtkVRMenuRepresentation
;
22
23
class
VTKRENDERINGVR_EXPORT
VTK_MARSHALAUTO
vtkVRMenuWidget
:
public
vtkAbstractWidget
24
{
25
public
:
29
static
vtkVRMenuWidget
*
New
();
30
32
35
vtkTypeMacro(
vtkVRMenuWidget
,
vtkAbstractWidget
);
36
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
38
44
void
SetRepresentation
(
vtkVRMenuRepresentation
* rep);
45
49
void
CreateDefaultRepresentation
()
override
;
50
52
55
vtkGetMacro(
WidgetState
,
int
);
57
58
// Manage the state of the widget
59
enum
WidgetStateType
60
{
61
Start
= 0,
62
Active
63
};
64
66
69
void
PushFrontMenuItem
(
const
char
* name,
const
char
* text,
vtkCommand
* cmd);
70
void
RenameMenuItem
(
const
char
* name,
const
char
* text);
71
void
RemoveMenuItem
(
const
char
* name);
72
void
RemoveAllMenuItems
();
74
75
void
Show
(
vtkEventData
* ed);
76
void
ShowSubMenu
(
vtkVRMenuWidget
*);
77
78
protected
:
79
vtkVRMenuWidget
();
80
~vtkVRMenuWidget
()
override
;
81
82
int
WidgetState
;
83
84
class
InternalElement;
85
std::deque<InternalElement*>
Menus
;
86
87
// These are the callbacks for this widget
88
static
void
StartMenuAction
(
vtkAbstractWidget
*);
89
static
void
SelectMenuAction
(
vtkAbstractWidget
*);
90
static
void
MoveAction
(
vtkAbstractWidget
*);
91
92
vtkCallbackCommand
*
EventCommand
;
93
static
void
EventCallback
(
94
vtkObject
*
object
,
unsigned
long
event,
void
* clientdata,
void
* calldata);
95
99
static
void
Update
(
vtkAbstractWidget
*);
100
101
private
:
102
vtkVRMenuWidget
(
const
vtkVRMenuWidget
&) =
delete
;
103
void
operator=(
const
vtkVRMenuWidget
&) =
delete
;
104
};
105
VTK_ABI_NAMESPACE_END
106
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkCallbackCommand
supports function callbacks
Definition
vtkCallbackCommand.h:149
vtkCommand
superclass for callback/observer methods
Definition
vtkCommand.h:385
vtkEventData
Definition
vtkEventData.h:58
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkObject::vtkObject
vtkObject()
vtkVRMenuRepresentation
Widget representation for vtkVRMenuWidget Implementation of the popup panel representation for the vt...
Definition
vtkVRMenuRepresentation.h:26
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::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:92
vtkVRMenuWidget::WidgetState
int WidgetState
Definition
vtkVRMenuWidget.h:82
vtkVRMenuWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
vtkVRMenuWidget::WidgetStateType
WidgetStateType
Definition
vtkVRMenuWidget.h:60
vtkVRMenuWidget::Active
@ Active
Definition
vtkVRMenuWidget.h:62
vtkVRMenuWidget::Start
@ Start
Definition
vtkVRMenuWidget.h:61
vtkVRMenuWidget::Menus
std::deque< InternalElement * > Menus
Definition
vtkVRMenuWidget.h:85
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
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:60
Generated on Wed Apr 15 2026 07:39:35 for VTK by
1.13.2