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

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

# Flu_GL_Canvas Class Reference

An easy to derive from class providing an OpenGL canvas for drawing. More...

`#include <Flu_GL_Canvas.h>`

Inheritance diagram for Flu_GL_Canvas:

List of all members.

## Public Member Functions
| Flu_GL_Canvas (int x, int y, int w, int h, const char *label=0)
| Normal FLTK widget constructor.
virtual | ~Flu_GL_Canvas ()
| Default destructor.
virtual void | init ()
| Called when the canvas is first created.
virtual void | reshape (int width, int height)
| Called when the canvas is resized.
virtual void | render ()
| Called when the canvas needs to be drawn.
virtual void | mouse_wheel (int dx, int dy, int x, int y)
| Called when the mouse scrolly wheel is scrolled.
virtual void | mouse_button_down (int button, int x, int y)
| Called when a mouse button is pressed.
virtual void | mouse_button_up (int button, int x, int y)
| Called when a mouse button is released.
virtual void | mouse_drag (int x, int y)
| Called when the mouse is moved with a button pressed.
virtual void | mouse_move (int x, int y)
| Called when the mouse is moved without a button pressed.
virtual void | mouse_enter ()
| Called when the mouse enters the canvas.
virtual void | mouse_exit ()
| Called when the mouse leaves the canvas.
virtual void | keyboard (int key, int x, int y)
| Called when a key on the keyboard is pressed.

## Detailed Description

An easy to derive from class providing an OpenGL canvas for drawing.

## Member Function Documentation

virtual void Flu_GL_Canvas::keyboard | ( | int | key,
|  | int | x,
|  | int | y
| ) | `[inline, virtual]`

| Called when a key on the keyboard is pressed. key is which key generated the event, and x and y represent where in the OpenGL context the event ocurred.

virtual void Flu_GL_Canvas::mouse_button_down | ( | int | button,
|  | int | x,
|  | int | y
| ) | `[inline, virtual]`

| Called when a mouse button is pressed. button is which mouse button generated the event: { `FL_LEFT_MOUSE` | `FL_RIGHT_MOUSE` | `FL_MIDDLE_MOUSE` }, and x and y represent where in the OpenGL context the event ocurred.

virtual void Flu_GL_Canvas::mouse_button_up | ( | int | button,
|  | int | x,
|  | int | y
| ) | `[inline, virtual]`

| Called when a mouse button is released. button is which mouse button generated the event: { `FL_LEFT_MOUSE` | `FL_RIGHT_MOUSE` | `FL_MIDDLE_MOUSE` }, and x and y represent where in the OpenGL context the event ocurred.

virtual void Flu_GL_Canvas::mouse_drag | ( | int | x,
|  | int | y
| ) | `[inline, virtual]`

| Called when the mouse is moved with a button pressed. x and y represent where in the OpenGL context the event ocurred.

virtual void Flu_GL_Canvas::mouse_move | ( | int | x,
|  | int | y
| ) | `[inline, virtual]`

| Called when the mouse is moved without a button pressed. x and y represent where in the OpenGL context the event ocurred.

virtual void Flu_GL_Canvas::mouse_wheel | ( | int | dx,
|  | int | dy,
|  | int | x,
|  | int | y
| ) | `[inline, virtual]`

| Called when the mouse scrolly wheel is scrolled. 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.

virtual void Flu_GL_Canvas::reshape | ( | int | width,
|  | int | height
| ) | `[inline, virtual]`

| Called when the canvas is resized. width and height represent the new size of the OpenGL context

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

- Flu_GL_Canvas.h