VTK
9.5.20251126
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 <deque>
// for ivar
17
18
VTK_ABI_NAMESPACE_BEGIN
19
class
vtkEventData
;
20
class
vtkVRMenuRepresentation
;
21
22
class
VTKRENDERINGVR_EXPORT
vtkVRMenuWidget
:
public
vtkAbstractWidget
23
{
24
public
:
28
static
vtkVRMenuWidget
*
New
();
29
31
34
vtkTypeMacro(
vtkVRMenuWidget
,
vtkAbstractWidget
);
35
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
37
43
void
SetRepresentation
(
vtkVRMenuRepresentation
* rep);
44
48
void
CreateDefaultRepresentation
()
override
;
49
51
54
vtkGetMacro(
WidgetState
,
int
);
56
57
// Manage the state of the widget
58
enum
WidgetStateType
59
{
60
Start
= 0,
61
Active
62
};
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
void
Show
(
vtkEventData
* ed);
75
void
ShowSubMenu
(
vtkVRMenuWidget
*);
76
77
protected
:
78
vtkVRMenuWidget
();
79
~vtkVRMenuWidget
()
override
;
80
81
int
WidgetState
;
82
83
class
InternalElement;
84
std::deque<InternalElement*>
Menus
;
85
86
// These are the callbacks for this widget
87
static
void
StartMenuAction
(
vtkAbstractWidget
*);
88
static
void
SelectMenuAction
(
vtkAbstractWidget
*);
89
static
void
MoveAction
(
vtkAbstractWidget
*);
90
91
vtkCallbackCommand
*
EventCommand
;
92
static
void
EventCallback
(
93
vtkObject
*
object
,
unsigned
long
event,
void
* clientdata,
void
* calldata);
94
98
static
void
Update
(
vtkAbstractWidget
*);
99
100
private
:
101
vtkVRMenuWidget
(
const
vtkVRMenuWidget
&) =
delete
;
102
void
operator=(
const
vtkVRMenuWidget
&) =
delete
;
103
};
104
VTK_ABI_NAMESPACE_END
105
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkCallbackCommand
supports function callbacks
Definition
vtkCallbackCommand.h:149
vtkCommand
superclass for callback/observer methods
Definition
vtkCommand.h:384
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:25
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:91
vtkVRMenuWidget::WidgetState
int WidgetState
Definition
vtkVRMenuWidget.h:81
vtkVRMenuWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
vtkVRMenuWidget::WidgetStateType
WidgetStateType
Definition
vtkVRMenuWidget.h:59
vtkVRMenuWidget::Active
@ Active
Definition
vtkVRMenuWidget.h:61
vtkVRMenuWidget::Start
@ Start
Definition
vtkVRMenuWidget.h:60
vtkVRMenuWidget::Menus
std::deque< InternalElement * > Menus
Definition
vtkVRMenuWidget.h:84
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
Generated on Wed Nov 26 2025 07:47:56 for VTK by
1.13.2