Main Page   Compound List   File List   Compound Members   File Members  

ImageSubWindow.h

Go to the documentation of this file.
00001 /**************************************************************************
00008  *
00009  * Source code for Real Time Image Display Library (libRTImageDisplay)
00010  *
00011  * Leeds Vision Group give permission for this code to be copied, modified
00012  * and distributed within the University of Leeds subject to the following
00013  * conditions:-
00014  *
00015  * - The code is not to be used for commercial gain.
00016  * - The code and use thereof will be attributed to the author where
00017  *   appropriate (inluding demonstrations which rely on it's use).
00018  * - All modified, distributions of the source files will retain this header.
00019  *
00020  ****************************************************************************/
00021 
00022 
00023 #ifndef IMAGE_SUB_WINDOW_H
00024 #define IMAGE_SUB_WINDOW_H
00025 
00026 #include <GL/gl.h>
00027 #include <GL/glu.h>
00028 #include <glow.h>
00029 
00030 #include "Image.h"
00031 
00032 
00033 GLOW_NAMESPACE_USING
00034 
00035 #include <ImageWindow.h>
00036 
00037 class ImageSubWindow : public GlowSubwindow
00047 {
00048 public:
00049         
00051         void            (*mouse_press)(Glow::MouseButton button,int x,
00052                                        int y,
00053                                        Glow::Modifiers modifiers,
00054                                        MouseActionType action);
00055 
00057         void            (*graphics_callback)(GlowComponent *parent);
00058 
00059 protected:
00060 /* Protected Data Definitions */
00061         
00062         // Dimensions of the image
00063         unsigned int    width;          
00064         unsigned int    height;         
00065         unsigned int    size;           
00066         float           scalefactor;    
00067         bool            size_changed;
00068 
00069         Image::Type     type;           
00070         GLint           *pixels;        
00071         GLubyte         *data;          
00072         GLubyte         *data_bk;       
00073         
00074         GlowComponent* parent_obj ;     
00075 public:
00076 /* Public Methods */
00077         
00078         ImageSubWindow(GlowComponent* parent,
00079                        int x, int y,
00080                        int width, int height);
00081         ~ImageSubWindow(); 
00082 
00083         void set_display_type(Image::Type t){ type = t; };
00084         void set_zoom(float zoom) ;
00085         void operator << (ImageRGB&);
00086         void operator << (ImageGrey&);
00087         void operator << (Image&);
00088 
00089 protected:
00090 /* Protected Methods */
00091         virtual void    OnEndPaint();
00092         virtual void    OnMouseDown(Glow::MouseButton button,
00093                         int x, int y,
00094                         Glow::Modifiers modifiers);
00095         virtual void    OnMouseUp(Glow::MouseButton button,
00096                         int x, int y,
00097                         Glow::Modifiers modifiers);
00098 
00099         void            repackRGB();
00100         void            repackGrey();
00101 };
00102 
00103 
00104 #endif  // IMAGE_WINDOW_H

Generated on Thu Mar 11 11:43:51 2004 for libRTImageDisplay by doxygen1.2.18