Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

GlutDisplay Class Reference

#include <glut_display.hxx>

Inheritance diagram for GlutDisplay:

Inheritance graph
[legend]
Collaboration diagram for GlutDisplay:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GlutDisplay (int w, int h)
virtual ~GlutDisplay ()
void draw_lines (std::vector< Line > &lines, Color color, int wide=0)
void draw_line (float x1, float y1, float x2, float y2, Color color, int wide=0)
void draw_rect (float x1, float y1, float x2, float y2, Color color)
void draw_fill_rect (float x1, float y1, float x2, float y2, Color color)
void draw_circle (float x, float y, float r, Color color)
void draw_circles (std::vector< Circle > &circles, Color color)
void draw_fill_circle (float x, float y, float r, Color color)
void draw_string (float x, float y, const std::string &str, Color color)
void draw_string_centered (float x, float y, const std::string &str, Color color)
void clear ()
void flip ()
void flip (int x1, int y1, int x2, int y2)
void set_fullscreen (bool fullscreen)
bool get_fullscreen ()
int get_width ()
int get_height ()
bool get_key (int key)
int get_mouse_x ()
int get_mouse_y ()
void run ()
void reshape_func (int w, int h)
void display_func ()
void mouse_func (int button, int button_state, int x, int y)
void idle_func ()
void keyboard_func (unsigned char key, int x, int y)
void mouse_motion_func (int x, int y)
void set_clip_rect (int x1, int y1, int x2, int y2)

Static Public Member Functions

GlutDisplay * instance ()

Constructor & Destructor Documentation

GlutDisplay::GlutDisplay int    w,
int    h
 

Definition at line 69 of file glut_display.cxx.

References Settings::alphablending, Settings::antialiasing, Settings::screen_height, Settings::screen_width, and settings.

GlutDisplay::~GlutDisplay   [virtual]
 

Definition at line 123 of file glut_display.cxx.


Member Function Documentation

void GlutDisplay::clear   [virtual]
 

Implements GraphicContext.

Definition at line 272 of file glut_display.cxx.

void GlutDisplay::display_func  
 

Definition at line 299 of file glut_display.cxx.

References ScreenManager::instance(), and ScreenManager::run_once().

Referenced by display_func().

void GlutDisplay::draw_circle float    x,
float    y,
float    r,
Color    color
[virtual]
 

Implements GraphicContext.

Definition at line 189 of file glut_display.cxx.

References Color::a, Color::b, Color::g, and Color::r.

Referenced by draw_circles().

void GlutDisplay::draw_circles std::vector< Circle > &    circles,
Color    color
[virtual]
 

Implements GraphicContext.

Definition at line 180 of file glut_display.cxx.

References draw_circle().

void GlutDisplay::draw_fill_circle float    x,
float    y,
float    r,
Color    color
[virtual]
 

Implements GraphicContext.

Definition at line 206 of file glut_display.cxx.

References Color::a, Color::b, Color::g, and Color::r.

void GlutDisplay::draw_fill_rect float    x1,
float    y1,
float    x2,
float    y2,
Color    color
[virtual]
 

Implements GraphicContext.

Definition at line 167 of file glut_display.cxx.

References Color::a, Color::b, Color::g, and Color::r.

void GlutDisplay::draw_line float    x1,
float    y1,
float    x2,
float    y2,
Color    color,
int    wide = 0
[virtual]
 

Implements GraphicContext.

Definition at line 142 of file glut_display.cxx.

References Color::a, Color::b, Color::g, and Color::r.

void GlutDisplay::draw_lines std::vector< Line > &    lines,
Color    color,
int    wide = 0
[virtual]
 

Implements GraphicContext.

Definition at line 128 of file glut_display.cxx.

void GlutDisplay::draw_rect float    x1,
float    y1,
float    x2,
float    y2,
Color    color
[virtual]
 

Implements GraphicContext.

Definition at line 153 of file glut_display.cxx.

References Color::a, Color::b, Color::g, and Color::r.

void GlutDisplay::draw_string float    x,
float    y,
const std::string &    str,
Color    color
[virtual]
 

Implements GraphicContext.

Definition at line 225 of file glut_display.cxx.

References Color::a, Color::b, Color::g, and Color::r.

Referenced by draw_string_centered().

void GlutDisplay::draw_string_centered float    x,
float    y,
const std::string &    str,
Color    color
[virtual]
 

Implements GraphicContext.

Definition at line 247 of file glut_display.cxx.

References draw_string().

void GlutDisplay::flip int    x1,
int    y1,
int    x2,
int    y2
[virtual]
 

Implements GraphicContext.

Definition at line 284 of file glut_display.cxx.

void GlutDisplay::flip   [virtual]
 

FIXME: flip should be handled outsite of GraphicContext

Implements GraphicContext.

Definition at line 278 of file glut_display.cxx.

bool GlutDisplay::get_fullscreen   [inline]
 

Definition at line 65 of file glut_display.hxx.

int GlutDisplay::get_height   [inline, virtual]
 

Implements GraphicContext.

Definition at line 68 of file glut_display.hxx.

bool GlutDisplay::get_key int    key [virtual]
 

Returns:
true if the button with the given keycode is currently pressed, false otherwise

Implements InputContext.

Definition at line 254 of file glut_display.cxx.

int GlutDisplay::get_mouse_x   [virtual]
 

Returns:
mouse x coordinate

Implements InputContext.

Definition at line 260 of file glut_display.cxx.

int GlutDisplay::get_mouse_y   [virtual]
 

Returns:
mouse y coordinate

Implements InputContext.

Definition at line 266 of file glut_display.cxx.

int GlutDisplay::get_width   [inline, virtual]
 

Implements GraphicContext.

Definition at line 67 of file glut_display.hxx.

void GlutDisplay::idle_func  
 

Definition at line 345 of file glut_display.cxx.

References ScreenManager::instance(), ScreenManager::is_finished(), and ScreenManager::run_once().

Referenced by idle_func().

GlutDisplay* GlutDisplay::instance   [inline, static]
 

Definition at line 45 of file glut_display.hxx.

Referenced by display_func(), idle_func(), keyboard_func(), mouse_func(), mouse_motion_func(), and reshape_func().

void GlutDisplay::keyboard_func unsigned char    key,
int    x,
int    y
 

Definition at line 364 of file glut_display.cxx.

References Event::button, BUTTON_ACTIONCAM, BUTTON_CLEAR, BUTTON_DELETE, BUTTON_DUPLICATE, BUTTON_ESCAPE, BUTTON_EVENT, BUTTON_FIX, BUTTON_HIDEDOTS, BUTTON_QUICKLOAD0, BUTTON_QUICKLOAD1, BUTTON_QUICKLOAD2, BUTTON_QUICKLOAD3, BUTTON_QUICKLOAD4, BUTTON_QUICKLOAD5, BUTTON_QUICKLOAD6, BUTTON_QUICKLOAD7, BUTTON_QUICKLOAD8, BUTTON_QUICKLOAD9, BUTTON_QUICKSAVE0, BUTTON_QUICKSAVE1, BUTTON_QUICKSAVE2, BUTTON_QUICKSAVE3, BUTTON_QUICKSAVE4, BUTTON_QUICKSAVE5, BUTTON_QUICKSAVE6, BUTTON_QUICKSAVE7, BUTTON_QUICKSAVE8, BUTTON_QUICKSAVE9, BUTTON_REDO, BUTTON_RUN, BUTTON_SETVELOCITY, BUTTON_TOGGLESLOWMO, BUTTON_UNDO, BUTTON_ZOOM_IN, BUTTON_ZOOM_OUT, InputContext::events, ButtonEvent::id, ButtonEvent::pressed, and Event::type.

Referenced by keyboard_func().

void GlutDisplay::mouse_func int    button,
int    button_state,
int    x,
int    y
 

Definition at line 305 of file glut_display.cxx.

References Event::button, BUTTON_EVENT, BUTTON_PRIMARY, BUTTON_SECONDARY, BUTTON_TERTIARY, BUTTON_ZOOM_IN, BUTTON_ZOOM_OUT, InputContext::events, ButtonEvent::id, ButtonEvent::pressed, and Event::type.

Referenced by mouse_func().

void GlutDisplay::mouse_motion_func int    x,
int    y
 

Definition at line 513 of file glut_display.cxx.

Referenced by mouse_motion_func().

void GlutDisplay::reshape_func int    w,
int    h
 

Definition at line 291 of file glut_display.cxx.

Referenced by reshape_func().

void GlutDisplay::run  
 

Definition at line 116 of file glut_display.cxx.

void GlutDisplay::set_clip_rect int    x1,
int    y1,
int    x2,
int    y2
[virtual]
 

Implements GraphicContext.

Definition at line 539 of file glut_display.cxx.

void GlutDisplay::set_fullscreen bool    fullscreen
 

Definition at line 521 of file glut_display.cxx.


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 10:25:15 2003 for Construo by doxygen1.3-rc3