GL Studio C++ Runtime API
OpenGLWindow Class Reference

#include <gls_display_frame.h>

Inheritance diagram for OpenGLWindow:
Fl_Gl_Window

Public Member Functions

void make_current ()
 
void end ()
 
void resizable (OpenGLWindow *win)
 
void resize (int x, int y, int w, int h)
 
void show ()
 
int handle (int)
 
 OpenGLWindow (int x, int y, int w, int h, const char *l, glsDisplayFrame *frame_)
 
void GrabWindow (char *filename)
 
void WindowToLogical (glsDisplayFrame *frame, float x, float y, float &lx, float &ly)
 

Detailed Description

OpenGLWindow is a GL Studio specific implementation of the Fltk Fl_Gl_Window

Constructor & Destructor Documentation

◆ OpenGLWindow()

OpenGLWindow ( int  x,
int  y,
int  w,
int  h,
const char *  l,
glsDisplayFrame frame_ 
)

Constructor for window

Parameters
xInitial x loc of window
yInitial y loc of window
wInitial width of window
hInitial height of window
lWindow title
frame_Display to associate with window

Member Function Documentation

◆ end()

void end ( )

Overload of FLTK end() method. Used to signal FLTK to not make this the "current" window to add widgets to

◆ GrabWindow()

void GrabWindow ( char *  filename)

Grabs the window contents and saves them to an uncompressed 24 bit BMP file

Parameters
filenameName of the file to write a BMP to

◆ handle()

int handle ( int  )

Overload of FLTK event handle routine. This is how mouse and keyboard events get passed in.

Returns
0 if the event was not handled, otherwise non zero (usually 1).

◆ make_current()

void make_current ( )

Overload of FLTK make_current() method. Sets this window as the current OpenGL context

◆ resizable()

void resizable ( OpenGLWindow win)

Overload of FLTK resizable() method.

Parameters
winThe widget to be used as the resizable region.

◆ resize()

void resize ( int  x,
int  y,
int  w,
int  h 
)

Overload of FLTK resize() method. Resizes the window.

Parameters
xNew x coordinate of window on screen
yNew y coordinate of window on screen
wNew width of window in pixels
hNew height of window in pixels

◆ show()

void show ( )

Overload of FLTK show() method. Sets the visible flag for this window, causing it to be shown the next time the FLTK event loop is checked.

◆ WindowToLogical()

void WindowToLogical ( glsDisplayFrame frame,
float  x,
float  y,
float &  lx,
float &  ly 
)

Converts mouse window coordinates to logical simulation coordinates.

Parameters
frameDisplayFrame to convert for
xMouse Device coordinate
yMouse Device coordinate
lxFilled in with logical X coordinate
lyFilled in with logical Y coordinate

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