FLTK Utility Library and Widget Collection (FLU): Flu_GL_Window class Reference

Main Page | Class Hierarchy | Class List | File List | Class Members

# Flu_GL_Window Class Reference

A class designed to supply an easier, more functional FLTK GL window, with callback functionality similar to GLUT. More...

`#include <Flu_GL_Window.h>`

List of all members.

## Public Member Functions
| Flu_GL_Window (int x, int y, int w, int h, const char *label=0)
| Normal FLTK widget constructor.
| Flu_GL_Window (int w, int h, const char *label=0)
| Top-level window constructor.
virtual | ~Flu_GL_Window ()
| Default destructor.
void | redraw ()
| Force this window to redraw.
bool | is_context_valid ()
| `true` if the OpenGL context managed by this window is valid to take OpenGL calls, `false` otherwise
void | cartesianInput (bool b)
| Setting this to `true` will report mouse input in cartesian coordinates instead of window coordinates.
bool | cartesianInput () const
| `true` if mouse input is reported in cartesian coordinates, `false` otherwise
Drawing/Input Callback Registration
The registered functions will be called on the indicated event.
void | setInitFunc (void(*cb)(void *), void *cbd=NULL)
void | setResizeFunc (void(*cb)(int, int, void *), void *cbd=NULL)
void | setDrawFunc (void(*cb)(void *), void *cbd=NULL)
void | setMouseWheelFunc (void(*cb)(int, int, int, int, void *), void *cbd=NULL)
void | setMouseDownFunc (void(*cb)(int, int, int, void *), void *cbd=NULL)
void | setMouseUpFunc (void(*cb)(int, int, int, void *), void *cbd=NULL)
void | setMouseDragFunc (void(*cb)(int, int, void *), void *cbd=NULL)
void | setMouseMoveFunc (void(*cb)(int, int, void *), void *cbd=NULL)
void | setMouseEnterFunc (void(*cb)(void *), void *cbd=NULL)
void | setMouseExitFunc (void(*cb)(void *), void *cbd=NULL)
void | setKeyboardFunc (void(*cb)(int, int, int, void *), void *cbd=NULL)
## Static Public Member Functions
void | setAllInitFunc (void(*cb)(void *), void *cbd=NULL)
| Set a function that will be called each time a new OpenGL context is created.
## Protected Attributes
void(* | _drawCB )(void *)
void * | _drawCBD
void(* | _resizeCB )(int, int, void *)
void * | _resizeCBD
void(* | _initCB )(void *)
void * | _initCBD
void(* | _mouseWheelCB )(int, int, int, int, void *)
void * | _mouseWheelCBD
void(* | _mouseDownCB )(int, int, int, void *)
void * | _mouseDownCBD
void(* | _mouseUpCB )(int, int, int, void *)
void * | _mouseUpCBD
void(* | _mouseDragCB )(int, int, void *)
void * | _mouseDragCBD
void(* | _mouseMoveCB )(int, int, void *)
void * | _mouseMoveCBD
void(* | _keyboardCB )(int, int, int, void *)
void * | _keyboardCBD
void(* | _enterCB )(void *)
void * | _enterCBD
void(* | _exitCB )(void *)
void * | _exitCBD

## Detailed Description

A class designed to supply an easier, more functional FLTK GL window, with callback functionality similar to GLUT.

## Member Function Documentation

void Flu_GL_Window::cartesianInput | ( | bool | b | ) | `[inline]`

| Setting this to `true` will report mouse input in cartesian coordinates instead of window coordinates. Default is `true`

bool Flu_GL_Window::is_context_valid | ( |  | ) | `[inline]`

| `true` if the OpenGL context managed by this window is valid to take OpenGL calls, `false` otherwise Note: This does not mean this context is the current one taking OpenGL calls, only that it *can* take calls when it becomes current.

void Flu_GL_Window::setAllInitFunc | ( | void(* | cb)(void *),
|  | void * | cbd = NULL
| ) | `[inline, static]`

| Set a function that will be called each time a new OpenGL context is created. This is useful for doing something globally specific for all contexts, such as loading OpenGL API entrypoints under Windows.

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

- Flu_GL_Window.h