#include <ImageWindow.h>
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 | |
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.
|
|
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. |
1.2.18