#include <Flu_GL_Window.h>
Inheritance diagram for Flu_GL_Window:
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) |
The passed function must have the following signature: (void *user_data). | |
void | setResizeFunc (void(*cb)(int, int, void *), void *cbd=NULL) |
The passed function must have the following signature: (int width, int height, void *user_data). | |
void | setDrawFunc (void(*cb)(void *), void *cbd=NULL) |
The passed function must have the following signature: (void *user_data). | |
void | setMouseWheelFunc (void(*cb)(int, int, int, int, void *), void *cbd=NULL) |
The passed function must have the following signature: (int dx, int dy, int x, int y). | |
void | setMouseDownFunc (void(*cb)(int, int, int, void *), void *cbd=NULL) |
The passed function must have the following signature: (int button, int x, int y, void *user_data). | |
void | setMouseUpFunc (void(*cb)(int, int, int, void *), void *cbd=NULL) |
The passed function must have the following signature: (int button, int x, int y, void *user_data). | |
void | setMouseDragFunc (void(*cb)(int, int, void *), void *cbd=NULL) |
The passed function must have the following signature: (int x, int y, void *user_data). | |
void | setMouseMoveFunc (void(*cb)(int, int, void *), void *cbd=NULL) |
The passed function must have the following signature:(int x, int y, void *user_data). | |
void | setMouseEnterFunc (void(*cb)(void *), void *cbd=NULL) |
The passed function must have the following signature: (void *user_data). | |
void | setMouseExitFunc (void(*cb)(void *), void *cbd=NULL) |
The passed function must have the following signature: (void *user_data). | |
void | setKeyboardFunc (void(*cb)(int, int, int, void *), void *cbd=NULL) |
The passed function must have the following signature: (int key, int x, int y, void *user_data). | |
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 |
|
Setting this to
Default is |
|
|
|
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 passed function must have the following signature: (int key, int x, int y, void *user_data). key is which key generated the event, and x and y represent where in the OpenGL context the event ocurred. |
|
The passed function must have the following signature: (int button, int x, int y, void *user_data).
button is which mouse button generated the event: { |
|
The passed function must have the following signature: (int x, int y, void *user_data). x and y represent where in the OpenGL context the event ocurred. |
|
The passed function must have the following signature:(int x, int y, void *user_data). x and y represent where in the OpenGL context the event ocurred. |
|
The passed function must have the following signature: (int button, int x, int y, void *user_data).
button is which mouse button generated the event: { |
|
The passed function must have the following signature: (int dx, int dy, int x, int y). dx and dy represent the amount of movement of the mouse wheel (usually 1 or -1), and x and y represent where in the OpenGL context the event ocurred. |
|
The passed function must have the following signature: (int width, int height, void *user_data). width and height represent the new size of the OpenGL context |