00001 //--- < SURFACECAMERA.H > -------| ViewGraph - A Flexible Graph view Framework | 00002 // 00003 // This class implements a surface camera 00004 // (for non-magnification-aware objects) 00005 // 00006 // 00007 // $Author: botik32 $ 00008 // $Revision: 1.3 $ 00009 // $Date: 2004/05/03 21:02:01 $ 00010 //-----------------------------------------------------------------------------/ 00011 00012 #ifndef SURFACECAMERA_H 00013 #define SURFACECAMERA_H 00014 00015 #include <cZUI/zoomablesurfaceview.h> 00016 #include <cZUI/camera.h> 00017 00018 class SurfaceDriver; 00019 class SurfaceCamera; 00020 00021 class SurfaceCamera : public Camera 00022 { 00023 private: 00024 bool created_view; 00025 protected: 00026 int xpos, ypos; 00027 public: 00028 SurfaceCamera( const char *name, int w, int h ); 00029 SurfaceCamera( const char *name, SurfaceDriver *, 00030 unsigned char pbkgr = 0, 00031 unsigned char pbkgg = 0, 00032 unsigned char pbkgb = 0, 00033 int xp=0, int yp=0, 00034 int w=-1, int h=-1 00035 ); 00036 SurfaceCamera( const char *name, ZoomableSurfaceView *, 00037 ZoomableView * ); 00038 ~SurfaceCamera(); 00039 }; 00040 00041 00042 #endif 00043 00044 /// $Log: surfacecamera.h,v $ 00045 /// Revision 1.3 2004/05/03 21:02:01 botik32 00046 /// Significant changes and many bugfixes. 00047 /// ScrollableView now has a background color used to 00048 /// tell SurfaceDriver to clear with. 00049 /// SurfaceDriver's clear() requires a color now 00050 /// Added SceneEvents for all node additions/removals 00051 /// in GroupNode and Camera. 00052 /// Added paint_selected and paint_selected_invalid 00053 /// to ActiveLeaf 00054 /// Modified ActiveLeaf's mouse_down and mouse_up 00055 /// handler signatures to accept an Event* instead of 00056 /// Camera* 00057 /// - Many more bugfixes 00058 /// 00059 /// Revision 1.2 2004/04/20 08:55:51 botik32 00060 /// Major interface change. 00061 /// Added HUDView in Camera; switch_to_HUDmode for Camera 00062 /// BaseSceneNode: internal implementation changes; 00063 /// Major changes in HUDGroup behaviour 00064 /// 00065 /// Revision 1.1.1.1 2004/03/26 10:50:24 botik32 00066 /// Initial release 00067 /// 00068 /// Revision 1.1.1.1 2004/03/26 08:53:33 botik 00069 /// initial import 00070 /// 00071 /// 00072 /// Revision 1.13 2003/12/30 11:11:03 botik 00073 /// Fixed a few memory leak bugs (definitely lost memory) 00074 /// 00075 /// Revision 1.12 2003/11/24 20:45:29 botik 00076 /// Merged four features from surfacecamera into camera. 00077 /// Modified ScrollableView to hold a width/height of 00078 /// the viewport and to report it to whoever asks. 00079 /// Added scenex, sceney fields to Event. 00080 /// Added coordinate transform for all messages, done 00081 /// at camera level. This should speed up drawability 00082 /// and mouseover checks. 00083 /// 00084 /// Repaint and mouse detection work now over arbitrary 00085 /// magnification. 00086 /// Borderlayer is broken and scrolling segfaults in 00087 /// a weird way. 00088 /// 00089 /// Revision 1.11 2003/11/24 16:12:10 botik 00090 /// Halfway through major redesign of a view's geometric 00091 /// parameters. This will influence zooming and repainting. 00092 /// 00093 /// Revision 1.10 2003/11/20 00:32:41 botik 00094 /// Changed the way repaint works by using a screen 00095 /// rectangle as intermediate event. 00096 /// Added get_screenrect to Camera 00097 /// Added screen2scenerect to Camera 00098 /// 00099 /// Revision 1.9 2003/11/18 13:54:06 botik 00100 /// Got the borderlayer to scroll well. 00101 /// 00102 /// Revision 1.8 2003/11/17 23:38:45 botik 00103 /// Fixed the framework to work with multiple cameras on 00104 /// one window. There is a clear bug that does not clear 00105 /// the upper camera. 00106 /// Changed scrolling to remove flicker when multiple 00107 /// cameras are present on a window. 00108 /// Scrolling is still slow. 00109 /// 00110 /// Revision 1.7 2003/11/17 13:46:34 botik 00111 /// Removed default cursor from scrollableview 00112 /// Changed message handling behaviour for GroupNode 00113 /// to recognize broadcast messages 00114 /// Changed message handling behaviour for BaseSceneNode 00115 /// to recognize broadcast messages 00116 /// Added NodeTranslateMessage to message module 00117 /// Added handling of NodeTranslateMessage for LeafNode 00118 /// 00119 /// Revision 1.6 2003/11/15 16:45:18 botik 00120 /// Added ActiveLeaf node allowing for much easier scene 00121 /// node creation. 00122 /// Added default_cursor to scrollableview. 00123 /// Numerous bugfixes. 00124 /// MouseIn/Out now changes cursor. 00125 /// 00126 /// Revision 1.5 2003/11/11 23:18:31 botik 00127 /// Got sdlxp driver to work, fixed a few architecture 00128 /// errors and some bugs 00129 /// 00130 /// Revision 1.4 2003/11/09 18:05:37 botik 00131 /// Contrib/borderlayer works! Fixed a lot of small bugs. 00132 /// 00133 /// Revision 1.3 2003/11/09 15:23:01 botik 00134 /// Got GraphDisplay to compile and run. 00135 /// 00136 /// Revision 1.2 2003/10/28 15:43:55 botik 00137 /// More work on event framework and camera composition and 00138 /// z-ordering 00139 /// 00140 /// Revision 1.1 2003/10/24 16:29:10 botik 00141 /// Added more scene support: special scene nodes as well as a 00142 /// camera class that acts as glue between the graph master and the 00143 /// surface. 00144 ///