-
Notifications
You must be signed in to change notification settings - Fork 3
/
PositionDialog.cpp
48 lines (36 loc) · 1.02 KB
/
PositionDialog.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <Vrui/Vrui>
#include "PositionDialog.h"
#include "GLMotif/WidgetFactory.h"
GLMotif::PopupWindow* PositionDialog::createDialog()
{
WidgetFactory factory;
GLMotif::PopupWindow* window = factory.createPopupWindow("PositionPopup", "Position");
GLMotif::RowColumn* positionRC = factory.createRowColumn("PositionRC", 3);
factory.setLayout(positionRC);
//factory.createLabel("PositionLabel", "Position");
//factory.createLabel("DummyLabel1", "");
//factory.createLabel("DummyLabel2", "");
x = factory.createTextField("xTextField", 12);
y = factory.createTextField("yTextField", 12);
z = factory.createTextField("zTextField", 12);
positionRC->manageChild();
return window;
}
void PositionDialog::setPosition(Vrui::Point position)
{
setX(position[0]);
setY(position[1]);
setZ(position[2]);
}
void PositionDialog::setX(double xvalue)
{
x->setValue(xvalue);
}
void PositionDialog::setY(double yvalue)
{
y->setValue(yvalue);
}
void PositionDialog::setZ(double zvalue)
{
z->setValue(zvalue);
}