00001 //--- < LAYERNODE.H > -----------| ViewGraph - A Flexible Graph view Framework | 00002 // 00003 // Layer nodes provide layered display 00004 // and quick turining on/off of layer 00005 // display in a view. 00006 // 00007 // $Author: botik32 $ 00008 // $Revision: 1.3 $ 00009 // $Date: 2004/05/14 18:35:08 $ 00010 //-----------------------------------------------------------------------------/ 00011 00012 #ifndef LAYERNODE_H 00013 #define LAYERNODE_H 00014 00015 #include <map> 00016 #include <cZUI/groupnode.h> 00017 00018 00019 class LayerNode : public GroupNode 00020 { 00021 protected: 00022 std::map<Camera*,bool> enabled; 00023 public: 00024 LayerNode( bool cache_br = true ); 00025 // LayerNode takes care of CameraOn/CameraOff 00026 // messages in addition to GroupNode's handler. 00027 bool handle_event( Event * ); 00028 bool is_enabled( Camera*c ){ 00029 if( enabled.count(c) ) 00030 return enabled[c]; 00031 return true; 00032 }; 00033 }; 00034 00035 #endif 00036 00037 /// $Log: layernode.h,v $ 00038 /// Revision 1.3 2004/05/14 18:35:08 botik32 00039 /// Fixed a bug related to HUDGroups and a few that I do not 00040 /// remember now. 00041 /// 00042 /// Revision 1.2 2004/05/03 21:02:01 botik32 00043 /// Significant changes and many bugfixes. 00044 /// ScrollableView now has a background color used to 00045 /// tell SurfaceDriver to clear with. 00046 /// SurfaceDriver's clear() requires a color now 00047 /// Added SceneEvents for all node additions/removals 00048 /// in GroupNode and Camera. 00049 /// Added paint_selected and paint_selected_invalid 00050 /// to ActiveLeaf 00051 /// Modified ActiveLeaf's mouse_down and mouse_up 00052 /// handler signatures to accept an Event* instead of 00053 /// Camera* 00054 /// - Many more bugfixes 00055 /// 00056 /// Revision 1.1.1.1 2004/03/26 10:50:23 botik32 00057 /// Initial release 00058 /// 00059 /// Revision 1.1.1.1 2004/03/26 08:53:33 botik 00060 /// initial import 00061 /// 00062 /// 00063 /// Revision 1.4 2003/11/08 18:54:59 botik 00064 /// Changed handle_event to return bool 00065 /// 00066 /// Revision 1.3 2003/10/30 14:49:50 botik 00067 /// Changes to layernode to support state across 00068 /// multiple cameras 00069 /// 00070 /// Revision 1.2 2003/10/30 14:21:43 botik 00071 /// Modified layernode to handle CameraOn/CameraOff events 00072 /// 00073 /// Revision 1.1 2003/10/24 16:29:10 botik 00074 /// Added more scene support: special scene nodes as well as a 00075 /// camera class that acts as glue between the graph master and the 00076 /// surface. 00077 /// 00078