Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Data Fields | Globals

repaintevent.h

Go to the documentation of this file.
00001 //--- < REPAINTEVENT.H > --------| ViewGraph - A Flexible Graph view Framework |
00002 //
00003 // Defines events that cause part/all of a camera/
00004 // all cameras to repaint. 
00005 // 
00006 //
00007 // $Author: botik32 $
00008 // $Revision: 1.2 $
00009 // $Date: 2004/04/13 16:20:29 $
00010 //-----------------------------------------------------------------------------/
00011 
00012 #ifndef REPAINTEVENT_H
00013 #define REPAINTEVENT_H
00014 
00015 #include <cZUI/event.h>
00016 
00017 class BaseSceneNode;
00018 
00019 /// RepaintEvents cause part or all window to repaint
00020 class RepaintEvent : public Event{
00021 public:
00022         RepaintEvent( Camera *, const char * );
00023         static const char *type;
00024         bool is_type( const char * );
00025 };
00026 
00027 /// Will cause all cameras to repaint
00028 class RepaintAllEvent : public RepaintEvent
00029 {
00030 public:
00031         RepaintAllEvent();
00032         static const char* type;
00033 };
00034 
00035 class RepaintCameraEvent : public RepaintEvent
00036 {
00037 public:
00038         RepaintCameraEvent( Camera * );
00039         static const char* type;
00040 };
00041 
00042 // WARNING:
00043 // Use of this event for highlighting repaint 
00044 // is deprecated. See the context mechanism
00045 // in the Camera class:
00046 // c->get_scene_context()->register_data();
00047 //
00048 // RepaintRect may be initiated at the request 
00049 // of a leaf that needed redraw. In such cases
00050 // RepaintRect will store the troublemaker's 
00051 // address and some data associated with the 
00052 // poor bastard. Upon processing, the requestor 
00053 // may retrieve this data and figure out the 
00054 // redrawing actions it should take.
00055 //
00056 // Please note that this event CANNOT have 
00057 // data when sent into the timed queue via 
00058 // GraphWindow::enqueue_event()
00059 // because it was intended to pass local data
00060 // (from the stack) and thus that data will
00061 // become invalid when the event reaches
00062 // processing.
00063 class RepaintRectEvent : public RepaintEvent
00064 {
00065 protected:
00066         double x1, y1, x2, y2;
00067         BaseSceneNode *requestor;
00068         void *data;
00069 public:
00070         static const char* type;
00071         RepaintRectEvent( Camera *, double, double, 
00072                                 double, double, BaseSceneNode* =0,
00073                                 void* =0 );
00074         void get_rect( double&, double&, double&, double& );
00075         BaseSceneNode* get_requestor( void );
00076         void* get_data( void );
00077 };
00078 
00079 class InvalidateRectEvent : public Event
00080 {
00081 protected:
00082         double x1, y1, x2, y2;
00083 public:
00084         static const char* type;
00085         InvalidateRectEvent( Camera *, double, double, 
00086                                 double, double );
00087         void get_rect( double&, double&, double&, double& );
00088 };
00089 
00090 #endif
00091 
00092 /// $Log: repaintevent.h,v $
00093 /// Revision 1.2  2004/04/13 16:20:29  botik32
00094 /// Added camera to widget event CheckboxToggledEvent
00095 ///
00096 /// Revision 1.1.1.1  2004/03/26 10:50:23  botik32
00097 /// Initial release
00098 ///
00099 /// Revision 1.1.1.1  2004/03/26 08:53:33  botik
00100 /// initial import
00101 ///
00102 ///
00103 /// Revision 1.4  2003/11/20 18:40:48  botik
00104 /// Got borderlayer to work satisfactory.
00105 /// Changed xpsdl driver to check bounds
00106 /// on rect update and clear
00107 ///
00108 /// Revision 1.3  2003/11/19 16:14:52  botik
00109 /// Got repaint_rect to work right and changed ActiveLeaf
00110 /// accordingly.
00111 ///
00112 /// Revision 1.2  2003/11/17 23:38:45  botik
00113 /// Fixed the framework to work with multiple cameras on
00114 /// one window. There is a clear bug that does not clear
00115 /// the upper camera.
00116 /// Changed scrolling to remove flicker when multiple
00117 /// cameras are present on a window.
00118 /// Scrolling is still slow.
00119 ///
00120 /// Revision 1.1  2003/11/04 18:28:06  botik
00121 /// Added external and internal repaint events
00122 ///
00123 

Generated on Wed Jun 23 18:47:21 2004 for cZUI by doxygen 1.3.5