GlutWindow Class Reference

Inherits GlWindow.

List of all members.

Public Member Functions

void make_current ()
 GlutWindow (int w, int h, const char *)
 GlutWindow (int x, int y, int w, int h, const char *)
 ~GlutWindow ()

Public Attributes

int number
int menu [3]
void(* display )()
void(* overlaydisplay )()
void(* reshape )(int w, int h)
void(* keyboard )(uchar, int x, int y)
void(* mouse )(int b, int state, int x, int y)
void(* motion )(int x, int y)
void(* passivemotion )(int x, int y)
void(* entry )(int)
void(* visibility )(int)
void(* special )(int, int x, int y)

Protected Member Functions

void draw ()
void draw_overlay ()
int handle (int)


Detailed Description

Window subclass used to emulate GLUT. See the glut.h header file for more details on GLUT emulation.

Each GLUT window is an instance of this class. You may find it useful to manipulate instances directly rather than use GLUT window id's. These may be created without opening the display, and thus can fit better into FLTK's method of creating windows.

The current GLUT window is available in the global variable ::glut_window.


Constructor & Destructor Documentation

GlutWindow::GlutWindow int  w,
int  h,
const char *  t
 

The constructor is the same as glutCreateWindow() except it does not show() the window or make the window current.

GlutWindow::~GlutWindow  ) 
 

The destructor is the same as glutDestroyWindow().


Member Function Documentation

void GlutWindow::draw void   )  [protected, virtual]
 

Calls the display() callback provided by the GLUT-using program.

Implements GlWindow.

void GlutWindow::make_current  ) 
 

make_current() is the same as glutSetWindow(number). If the window has not had show() called on it yet, some functions that assumme an OpenGL context will not work. If you do show() the window, call make_current() again to set the context.

Reimplemented from GlWindow.


The documentation for this class was generated from the following files:
Sun Jan 7 00:55:17 2007. FLTK ©2006 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.