Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
GUIState.h
Go to the documentation of this file.
1
#ifndef GUIState_H
2
#define GUIState_H
3
4
#ifndef NO_APP
5
#include "
OvertureTypes.h
"
6
#endif
7
#include "
GUITypes.h
"
8
9
10
//#include "aString.H"
11
#ifndef NO_APP
12
#include "aString.H"
13
#else
14
#include <string>
15
#ifndef aString
16
#define aString std::string
17
#endif
18
#endif
19
#include "
DialogData.h
"
20
21
#define MAX_SIBLINGS 20
22
23
class
SelectionInfo
24
{
25
public
:
26
SelectionInfo
(){
nSelect
=0;
active
=0;}
// *wdh*
27
// selection(i,0): globalID of object i
28
// selection(i,1): min z-buffer value of object i
29
// selection(i,2): max z-buffer value of object i
30
IntegerArray
selection
;
31
int
nSelect
;
// number of objects that were selected
32
// active == 1 if the object contains a window coordinate, otherwise the rest of the fields are undefined
33
int
active
;
34
GUITypes::real
r
[4];
// window coordinates of the pickBox. r[0]: rMin, r[1]: rMax, r[2]: sMin, r[3]: sMax
35
GUITypes::real
zbMin
;
// z-buffer value of the closest object.
36
// 3D coordinate corresponding to the r window coordinate and the closest selected object.
37
// Only defined if nSelect > 0.
38
GUITypes::real
x
[3];
39
int
globalID
;
// global ID of the closest object. Only defined if nSelect > 0.
40
int
winNumber
;
// window number where the picking occured
41
};
42
43
// class PickInfo3D // maybe change name to PositionInfo ?
44
// {
45
// public:
46
// PickInfo3D(){active=0; inside=0;} // *wdh*
47
// int active; // == 1 if the object contains a point, otherwise the rest of the fields are undefined
48
// GUITypes::real r[3]; // average of pickBox + zBuffer coordinate
49
// int inside; // == 1 if r could be turned into a 3D coordinate
50
// GUITypes::real x[3]; // 3D coordinate. Undefined if inside != 1.
51
// int globalID; // global ID of the picked object. Undefined if inside != 1.
52
// };
53
54
class
GUIState
:
public
DialogData
55
{
56
public
:
57
// Constructors. Can only be called from the friend classes GL_GraphicsInterface or PlotStuff.
58
GUIState
();
// default constructor.
59
~GUIState
();
// destructor
60
61
void
62
setUserMenu
(
const
aString
menu[],
const
aString
& menuTitle);
63
void
64
setUserButtons
(
const
aString
buttons[][2]);
65
void
66
buildPopup
(
const
aString
menu[]);
67
void
68
setAllCommands
();
69
DialogData
&
70
getDialogSibling
(
int
number=-1);
// maybe better to return a pointer since we might run out of internal space
71
72
static
int
73
addPrefix
(
const
aString
label[],
const
aString
& prefix,
aString
cmd[],
const
int
maxCommands);
74
75
GL_GraphicsInterface
*
gl
;
// pointer to the GL_GraphicsInterface object that was used to create this object
76
77
// keep a local copy of all the data!
78
int
nPopup
;
// number of popup commands. 0 if not beeing used
79
aString
*
popupMenu
;
80
81
int
nWindowButtons
;
// number of window buttons. 0 if not beeing used
82
aString
*
windowButtonCommands
;
83
aString
*
windowButtonLabels
;
84
85
int
nPulldown
;
// number of pulldown commands. 0 if not beeing used
86
aString
pulldownTitle
;
87
aString
*
pulldownCommand
;
88
89
GUIState
*
prev
;
90
91
int
nAllCommands
;
92
aString
*
allCommands
;
93
94
int
nDialogSiblings
;
95
DialogData
dialogSiblings
[
MAX_SIBLINGS
];
96
97
protected
:
98
GUIState
(
GUIState
&source);
// copy constructor disabled since it never gets defined
99
void
operator =
(
GUIState
&source);
// assignment operator disabled since it never gets defined
100
101
};
102
103
#endif
Generated on Fri Jan 4 2013 10:17:53 for Overture by
1.8.3