DUECA/DUSIME
|
A DuecaGLWindow is the interface between the DUECA world and OpenGL drawing. More...
#include <DuecaGLWindow.hxx>
Public Member Functions | |
DuecaGLWindow (const char *window_title, bool pass_passive=false) | |
Constructor with the possibility to specify default screen size and location. | |
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. | |
virtual | ~DuecaGLWindow () |
destructor. | |
bool | setFullScreen (const bool &fs=true) |
Request full screen drawing – or not. | |
bool | setWindow (const std::vector< int > &wpos) |
Set the window position, at least if the window manager will honour this. | |
void | setWindow (int posx, int poxy, int width, int height) |
Set up the window initial position and size. | |
void | openWindow (int priority=-1) |
Do the opening and displaying of the window. | |
void | hide () |
Close the window again. | |
void | show () |
Open the window, after a hide. | |
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. | |
virtual void | keyboard (unsigned char key, int x, int y) |
Called when a key is pressed. | |
virtual void | special (int key, int x, int y) |
Called when a function key is pressed. | |
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. | |
virtual void | passive (int x, int y) |
This is called whenever a mouse motion event comes in, but none of the buttons are pressed. | |
![]() | |
DuecaGLCanvas () | |
Constructor. | |
virtual | ~DuecaGLCanvas () |
destructor. | |
void | selectCursor (int cursor) |
Select a cursor type. | |
void | redraw () |
Indicate that a redraw of the window is needed. | |
void | swapBuffers () |
Swap front and back buffers. | |
void | makeCurrent () |
If you want to do GL work outside the draw routine (add GL lists etc.) the window needs to be current. | |
virtual void | reshape (int x, int y) |
This is called if the size of the window is changed. | |
virtual void | display ()=0 |
This is called whenever the display needs to be redrawn. | |
virtual void | initGL () |
This is called when the window is ready, for first-time set-up. | |
int | getWidth () |
Obtain the current widget width. | |
int | getHeight () |
Obtain the current widget height. | |
int | getXOffset () |
Obtain current widget x-position. | |
int | getYOffset () |
Obtain current widget y-position. | |
GLWindowHelper * | getOpenGLHelper () |
Return a pointer to the GLWindowHelper object. | |
Friends | |
class | FlBasedGLWindow |
Also the Fl window needs special access. | |
Additional Inherited Members | |
![]() | |
void | widgetDestroyed () |
Notification that the window is being destroyed. | |
void | redrawDone () |
Indicate that the redraw has taken place. | |
bool | checkAndMarkInitDone () |
return true if GL initialisation still has to be done, mark that it has been done. | |
![]() | |
GLWindowHelper * | helper |
Defines a class for implementation-dependent data. | |
bool | marked_for_redraw |
Remembers whether the display was already marked for redraw. | |
bool | gl_initialised |
Flag to remember whether GL initialisation has taken place. | |
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.
Constructor with the possibility to specify default screen size and location.
This defaults to windowed mode, full screen (with setFullScreen() call) is still possible.
window_title | Title for the window (shown if not full-screen) |
pass_passive | If true, also passes passive (unclicked) mouse motions. |
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.
Request full screen drawing – or not.
Can be linked to Scheme in a parameter table. Use this call before opening the window with openWindow.
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.
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.
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.
priority | priority level for the manager/thread; used to find the protocol matching the "sweeper" |
Called when a key is pressed.
Prototypes for interation handling. This class adheres to – as much as is practical – the calling conventions for Glut.
Called when a function key is pressed.