DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
dueca::DuecaGLWindow Class Reference

A DuecaGLWindow is the interface between the DUECA world and OpenGL drawing. More...

#include <DuecaGLWindow.hxx>

Inheritance diagram for dueca::DuecaGLWindow:
Inheritance graph
[legend]
Collaboration diagram for dueca::DuecaGLWindow:
Collaboration graph
[legend]

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.
 

Friends

class FlBasedGLWindow
 Also the Fl window needs special access.
 

Detailed Description

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 & Destructor Documentation

◆ 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_titleTitle for the window (shown if not full-screen)
pass_passiveIf 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.

Member Function Documentation

◆ 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
prioritypriority level for the manager/thread; used to find the protocol matching the "sweeper"

◆ 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.

The documentation for this class was generated from the following file: