#include <glwindow.h>
Definition at line 39 of file glwindow.h.
Public Types | |
enum | MouseButton { BUTTON_LEFT = 1, BUTTON_MIDDLE = 2, BUTTON_RIGHT = 4, BUTTON_MOD_CTRL = 8, BUTTON_MOD_SHIFT = 0x10, BUTTON_WHEEL_UP = 0x20, BUTTON_WHEEL_DOWN = 0x40 } |
enum | EventType { EVENT_CLOSE, EVENT_EXPOSE } |
Public Member Functions | |
GLWindow (const ImageRef &size, int bpp=24, const std::string &title="GLWindow") | |
GLWindow (const ImageRef &size, const std::string &title, int bpp=24) | |
ImageRef | size () const |
void | set_size (const ImageRef &) |
ImageRef | position () const |
void | set_position (const ImageRef &) |
void | set_cursor_position (const ImageRef &where) |
ImageRef | cursor_position () const |
void | show_cursor (bool show=true) |
void | hide_cursor () |
std::string | title () const |
void | set_title (const std::string &title) |
void | swap_buffers () |
void | handle_events (EventHandler &handler) |
void | get_events (std::vector< Event > &events) |
void | get_events (EventSummary &summary) |
bool | has_events () const |
void | activate () |
void | make_current () |
Classes | |
struct | Event |
class | EventHandler |
Abstract base class for event handlers. Subclass this and override to implement a handler. More... | |
struct | EventSummary |
A summary of multiple events. More... |
Symbols for mouse buttons and modifiers.
BUTTON_LEFT | |
BUTTON_MIDDLE | |
BUTTON_RIGHT | |
BUTTON_MOD_CTRL | |
BUTTON_MOD_SHIFT | |
BUTTON_WHEEL_UP | |
BUTTON_WHEEL_DOWN |
Definition at line 42 of file glwindow.h.
CVD::GLWindow::GLWindow | ( | const ImageRef & | size, | |
int | bpp = 24 , |
|||
const std::string & | title = "GLWindow" | |||
) | [inline] |
Construct a GLWindow of the given size and colour depth, with the given title.
A double-buffered GL context is associated with the window.
Definition at line 96 of file glwindow.h.
References title().
ImageRef CVD::GLWindow::size | ( | ) | const |
Get the size.
void CVD::GLWindow::set_size | ( | const ImageRef & | ) |
Set the size.
ImageRef CVD::GLWindow::position | ( | ) | const |
Get the position.
void CVD::GLWindow::set_position | ( | const ImageRef & | ) |
Set the position.
void CVD::GLWindow::set_cursor_position | ( | const ImageRef & | where | ) |
Set the mouse cursor position.
ImageRef CVD::GLWindow::cursor_position | ( | ) | const |
Get the mouse cursor position.
void CVD::GLWindow::show_cursor | ( | bool | show = true |
) |
void CVD::GLWindow::hide_cursor | ( | ) | [inline] |
std::string CVD::GLWindow::title | ( | ) | const |
void CVD::GLWindow::set_title | ( | const std::string & | title | ) |
Set the title.
void CVD::GLWindow::swap_buffers | ( | ) |
Swap the front and back buffers.
void CVD::GLWindow::handle_events | ( | EventHandler & | handler | ) |
Handle events in the event queue by calling back to the specified handler.
void CVD::GLWindow::get_events | ( | std::vector< Event > & | events | ) |
Store all events in the event queue into Event objects.
void CVD::GLWindow::get_events | ( | EventSummary & | summary | ) |
Make a summary of the events in the queue.
bool CVD::GLWindow::has_events | ( | ) | const |
void CVD::GLWindow::activate | ( | ) |
void CVD::GLWindow::make_current | ( | ) | [inline] |