A DuecaGLWindow is the interface between the DUECA world and OpenGL drawing.
More...
|
| DuecaGLWindow (const char *window_title, bool pass_passive=false) |
| Constructor with the possibility to specify default screen size and location. More...
|
|
DO_NOT_DOCUMENT | DuecaGLWindow (const char *window_title, bool dummy1, bool dummy2, bool dummy3=true, bool dummy4=true, bool mouse_passive=true) |
| Backwards compatible constructor. More...
|
|
virtual | ~DuecaGLWindow () |
| destructor. More...
|
|
bool | setFullScreen (const bool &fs=true) |
| Request full screen drawing – or not. More...
|
|
bool | setWindow (const std::vector< int > &wpos) |
| Set the window position, at least if the window manager will honour this. More...
|
|
void | setWindow (int posx, int poxy, int width, int height) |
| Set up the window initial position and size. More...
|
|
void | openWindow (int priority=-1) |
| Do the opening and displaying of the window. More...
|
|
void | hide () |
| Close the window again. More...
|
|
void | show () |
| Open the window, after a hide. More...
|
|
int | getXOffset () const |
| Get x offset.
|
|
int | getYOffset () const |
| Get y offset.
|
|
bool | passPassive () |
| get the flag that determines whether passive mouse motions are to be given. More...
|
|
|
virtual void | keyboard (unsigned char key, int x, int y) |
| Called when a key is pressed. More...
|
|
virtual void | special (int key, int x, int y) |
| Called when a function key is pressed. More...
|
|
virtual void | mouse (int button, int state, int x, int y) |
| This is called whenever a mouse button event comes in.
|
|
virtual void | motion (int x, int y) |
| This is called whenever a mouse motion event comes in. More...
|
|
virtual void | passive (int x, int y) |
| This is called whenever a mouse motion event comes in, but none of the buttons are pressed. More...
|
|
A DuecaGLWindow is the interface between the DUECA world and OpenGL drawing.
Independently of the windowing toolkit that is used – provided that this toolkit is GL capable – you can use the DuecaGLWindow to open and manipulate a GL view.
◆ DuecaGLWindow() [1/2]
dueca::DuecaGLWindow::DuecaGLWindow |
( |
const char * |
window_title, |
|
|
bool |
pass_passive = false |
|
) |
| |
Constructor with the possibility to specify default screen size and location.
This defaults to windowed mode, full screen (with setFullScreen() call) is still possible.
- Parameters
-
window_title | Title for the window (shown if not full-screen) |
pass_passive | If true, also passes passive (unclicked) mouse motions. |
◆ DuecaGLWindow() [2/2]
DO_NOT_DOCUMENT dueca::DuecaGLWindow::DuecaGLWindow |
( |
const char * |
window_title, |
|
|
bool |
dummy1, |
|
|
bool |
dummy2, |
|
|
bool |
dummy3 = true , |
|
|
bool |
dummy4 = true , |
|
|
bool |
mouse_passive = true |
|
) |
| |
Backwards compatible constructor.
Arguments, except mouse_passive, are ignored.
◆ ~DuecaGLWindow()
virtual dueca::DuecaGLWindow::~DuecaGLWindow |
( |
| ) |
|
|
virtual |
◆ setFullScreen()
bool dueca::DuecaGLWindow::setFullScreen |
( |
const bool & |
fs = true | ) |
|
Request full screen drawing – or not.
Can be linked to Scheme in a parameter table. Use this call before opening the window with openWindow.
◆ setWindow() [1/2]
bool dueca::DuecaGLWindow::setWindow |
( |
const std::vector< int > & |
wpos | ) |
|
Set the window position, at least if the window manager will honour this.
Can be linked to Scheme in a parameter table. Use this call before opening the window with openWindow.
◆ setWindow() [2/2]
void dueca::DuecaGLWindow::setWindow |
( |
int |
posx, |
|
|
int |
poxy, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Set up the window initial position and size.
Honouring of initial position depends on the window manager. Use this call before opening the window with openWindow.
◆ openWindow()
void dueca::DuecaGLWindow::openWindow |
( |
int |
priority = -1 | ) |
|
Do the opening and displaying of the window.
In your module, preferably place this call in the "complete()" method. At this time, all GL stuff is in place, while the system is normally not yet running real-time.
- Parameters
-
priority | priority level for the manager/thread; used to find the protocol matching the "sweeper" |
◆ hide()
void dueca::DuecaGLWindow::hide |
( |
| ) |
|
◆ show()
void dueca::DuecaGLWindow::show |
( |
| ) |
|
Open the window, after a hide.
◆ keyboard()
virtual void dueca::DuecaGLWindow::keyboard |
( |
unsigned char |
key, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
|
virtual |
Called when a key is pressed.
Prototypes for interation handling. This class adheres to – as much as is practical – the calling conventions for Glut.
◆ special()
virtual void dueca::DuecaGLWindow::special |
( |
int |
key, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
|
virtual |
Called when a function key is pressed.
- Todo:
- Does not currently work under gtk.
◆ motion()
virtual void dueca::DuecaGLWindow::motion |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
virtual |
This is called whenever a mouse motion event comes in.
◆ passive()
virtual void dueca::DuecaGLWindow::passive |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
virtual |
This is called whenever a mouse motion event comes in, but none of the buttons are pressed.
◆ passPassive()
bool dueca::DuecaGLWindow::passPassive |
( |
| ) |
|
|
inline |
get the flag that determines whether passive mouse motions are to be given.
◆ FlBasedGLWindow
friend class FlBasedGLWindow |
|
friend |
Also the Fl window needs special access.
The documentation for this class was generated from the following file:
- /usr/src/packages/BUILD/extra/DuecaGLWindow.hxx