00001 //--- < ZOOMABLEVIEW.H > --------| ViewGraph - A Flexible Graph view Framework | 00002 // 00003 // This is the abstract class for a zoomable view. 00004 // See ZoomableSurfaceView and ZoomableObjectView 00005 // for their non-abstract descendants. 00006 // 00007 // 00008 // $Author: botik32 $ 00009 // $Revision: 1.3 $ 00010 // $Date: 2004/05/03 21:02:01 $ 00011 //-----------------------------------------------------------------------------/ 00012 00013 #ifndef ZOOMABLEVIEW_H 00014 #define ZOOMABLEVIEW_H 00015 00016 #include <cZUI/scrollableview.h> 00017 00018 class ZoomableView : public ScrollableView{ 00019 public: 00020 virtual double zoom( double factor )=0; 00021 virtual double get_zoom( void )=0; 00022 virtual double get_thickness1( void )=0; 00023 virtual void pen( unsigned char r, unsigned char g, 00024 unsigned char b, double thickness )=0; 00025 virtual void get_pen( unsigned char& r, 00026 unsigned char& g, unsigned char& b, double& thickness )=0; 00027 virtual void clear_rect( double, double, double, double )=0; 00028 virtual void repaint_rect( double, double, double, double )=0; 00029 virtual void get_rect( double&, double&, double&, double& )=0; 00030 ZoomableView( SurfaceDriver *, int, int, int, int, 00031 unsigned char, unsigned char, unsigned char ); 00032 }; 00033 00034 #endif 00035 00036 /// $Log: zoomableview.h,v $ 00037 /// Revision 1.3 2004/05/03 21:02:01 botik32 00038 /// Significant changes and many bugfixes. 00039 /// ScrollableView now has a background color used to 00040 /// tell SurfaceDriver to clear with. 00041 /// SurfaceDriver's clear() requires a color now 00042 /// Added SceneEvents for all node additions/removals 00043 /// in GroupNode and Camera. 00044 /// Added paint_selected and paint_selected_invalid 00045 /// to ActiveLeaf 00046 /// Modified ActiveLeaf's mouse_down and mouse_up 00047 /// handler signatures to accept an Event* instead of 00048 /// Camera* 00049 /// - Many more bugfixes 00050 /// 00051 /// Revision 1.2 2004/04/09 17:15:08 botik32 00052 /// Changes in interface: added get_pen to scrollableview and 00053 /// surfacedriver 00054 /// 00055 /// Revision 1.1.1.1 2004/03/26 10:50:26 botik32 00056 /// Initial release 00057 /// 00058 /// Revision 1.1.1.1 2004/03/26 08:53:33 botik 00059 /// initial import 00060 /// 00061 /// 00062 /// Revision 1.10 2003/11/24 20:45:29 botik 00063 /// Merged four features from surfacecamera into camera. 00064 /// Modified ScrollableView to hold a width/height of 00065 /// the viewport and to report it to whoever asks. 00066 /// Added scenex, sceney fields to Event. 00067 /// Added coordinate transform for all messages, done 00068 /// at camera level. This should speed up drawability 00069 /// and mouseover checks. 00070 /// 00071 /// Repaint and mouse detection work now over arbitrary 00072 /// magnification. 00073 /// Borderlayer is broken and scrolling segfaults in 00074 /// a weird way. 00075 /// 00076 /// Revision 1.9 2003/11/24 16:12:10 botik 00077 /// Halfway through major redesign of a view's geometric 00078 /// parameters. This will influence zooming and repainting. 00079 /// 00080 /// Revision 1.8 2003/11/20 00:32:41 botik 00081 /// Changed the way repaint works by using a screen 00082 /// rectangle as intermediate event. 00083 /// Added get_screenrect to Camera 00084 /// Added screen2scenerect to Camera 00085 /// 00086 /// Revision 1.7 2003/11/17 18:39:37 botik 00087 /// Added rectangle to surface driver. 00088 /// Sdxpsdl line and rectangle bugfixes 00089 /// 00090 /// Revision 1.6 2003/11/17 13:46:34 botik 00091 /// Removed default cursor from scrollableview 00092 /// Changed message handling behaviour for GroupNode 00093 /// to recognize broadcast messages 00094 /// Changed message handling behaviour for BaseSceneNode 00095 /// to recognize broadcast messages 00096 /// Added NodeTranslateMessage to message module 00097 /// Added handling of NodeTranslateMessage for LeafNode 00098 /// 00099 /// Revision 1.5 2003/11/15 16:45:18 botik 00100 /// Added ActiveLeaf node allowing for much easier scene 00101 /// node creation. 00102 /// Added default_cursor to scrollableview. 00103 /// Numerous bugfixes. 00104 /// MouseIn/Out now changes cursor. 00105 /// 00106 /// Revision 1.4 2003/11/13 18:50:18 botik 00107 /// Fixed (almost) clear and update rect behaviour. 00108 /// Added update_rect to framework and sdl wrapper. 00109 /// Added mouse_in/mouse_out handling 00110 /// Fixed message handling 00111 /// Many small bugfixes 00112 /// 00113 /// Revision 1.3 2003/11/13 12:50:51 botik 00114 /// Refined the event handling architecture 00115 /// Got the event handling to recognize and treat mouse 00116 /// events accordingly 00117 /// Important fixes to ./Makefile 00118 /// 00119 /// Revision 1.2 2003/11/09 15:23:01 botik 00120 /// Got GraphDisplay to compile and run. 00121 /// 00122 /// Revision 1.1 2003/10/21 17:39:00 botik 00123 /// Added preliminary scene support 00124 ///