Main Page   Compound List   File List   Compound Members   File Members  

ImageWindow Class Reference

An openGL/GLUT/GLOW window class that extends GlowWindow. More...

#include <ImageWindow.h>

List of all members.

Public Methods

 ~ImageWindow ()
 points mouse_press at a function, note can use specific fns from elsewhere


Public Attributes

void(* mouse_press )(Glow::MouseButton button, int x, int y, Glow::Modifiers modifiers, MouseActionType action)
 Pointer to mouse callback function (this may be user set).

void(* mouse_move )(int x, int y)
 Pointer to mouse move callback function (this may be user set).

void(* graphics_callback )(GlowComponent *parent)
 Pointer to graphics render callback function (this may be user set).


Protected Methods

virtual void OnEndPaint ()
 Main window painting method.

virtual void OnMouseDown (Glow::MouseButton button, int x, int y, Glow::Modifiers modifiers)
 Calls mouse_press() when the mouse is depressed :-(.

virtual void OnMouseUp (Glow::MouseButton button, int x, int y, Glow::Modifiers modifiers)
 Calls mouse_press() when the mouse is released :-).

virtual void OnMouseMotion (int x, int y)
 Calls mouse_move() when mouse is moved.

void grab_rgb ()
 Grabs window buffer into rgb array gd_ptr.

void grab_grey ()
 Grabs window buffer (Luminance) into rgb array gd_ptr Doesn't work well as luminance (R+G+B) is clipped to 255.


Protected Attributes

unsigned int width
 width of image to display

unsigned int height
 height of image to display


Detailed Description

An openGL/GLUT/GLOW window class that extends GlowWindow.

Added functionality allows images (Image/ImageRGB/ImageGrey) to be piped into the window and the display automatically refreshed with these images. Public mouse handler and graphics handler callback function pointers (and default functions) are included to add user functionality without inheritance.

Definition at line 16 of file ImageWindow.h.


Member Function Documentation

void ImageWindow::OnEndPaint   [protected, virtual]
 

Main window painting method.

WARNING: When inheriting from ImageWindow the display grabbing code at the end of this method should be replicated in any replacement OnEndPaint() method or the >> operator will not work properly! (i.e cause program to hang)

Definition at line 132 of file ImageWindow.cpp.

References grab_grey(), grab_rgb(), graphics_callback, height, and width.


The documentation for this class was generated from the following files:
Generated on Thu Mar 11 11:43:51 2004 for libRTImageDisplay by doxygen1.2.18