]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/canvas_fwd.hxx
Fix VS2010 lack of fminf
[simgear.git] / simgear / canvas / canvas_fwd.hxx
index 2588460a313221899cfd73d1f888fbec16a92067..3b1b464690dcd8c1783d71de27c4853f2394b5fe 100644 (file)
@@ -29,6 +29,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/weak_ptr.hpp>
 
+#include <map>
 #include <vector>
 
 namespace simgear
@@ -36,20 +37,57 @@ namespace simgear
 namespace canvas
 {
 
-  class Canvas;
-  typedef boost::shared_ptr<Canvas> CanvasPtr;
-  typedef boost::weak_ptr<Canvas> CanvasWeakPtr;
+#define SG_FWD_DECL(name)\
+  class name;\
+  typedef SGSharedPtr<name> name##Ptr;\
+  typedef SGWeakPtr<name> name##WeakPtr;
+
+  SG_FWD_DECL(Canvas)
+  SG_FWD_DECL(Element)
+  SG_FWD_DECL(Group)
+  SG_FWD_DECL(Image)
+  SG_FWD_DECL(Map)
+  SG_FWD_DECL(Path)
+  SG_FWD_DECL(Text)
+  SG_FWD_DECL(Window)
+
+  SG_FWD_DECL(Event)
+  SG_FWD_DECL(CustomEvent)
+  SG_FWD_DECL(DeviceEvent)
+  SG_FWD_DECL(KeyboardEvent)
+  SG_FWD_DECL(MouseEvent)
+
+#undef SG_FWD_DECL
+
+#define SG_FWD_DECL(name)\
+  class name;\
+  typedef boost::shared_ptr<name> name##Ptr;\
+  typedef boost::weak_ptr<name> name##WeakPtr;
+
+  SG_FWD_DECL(Placement)
+  SG_FWD_DECL(SystemAdapter)
+
+#undef SG_FWD_DECL
+
+  class EventManager;
+  class EventVisitor;
+
+  struct EventTarget;
+  typedef std::deque<EventTarget> EventPropagationPath;
+
+  typedef std::map<std::string, const SGPropertyNode*> Style;
+  typedef ElementPtr (*ElementFactory)( const CanvasWeakPtr&,
+                                        const SGPropertyNode_ptr&,
+                                        const Style&,
+                                        Element* );
 
   typedef osg::ref_ptr<osgText::Font> FontPtr;
 
-  class Placement;
-  typedef boost::shared_ptr<Placement> PlacementPtr;
   typedef std::vector<PlacementPtr> Placements;
-  typedef boost::function<Placements( const SGPropertyNode*,
+  typedef boost::function<Placements( SGPropertyNode*,
                                       CanvasPtr )> PlacementFactory;
 
-  class SystemAdapter;
-  typedef boost::shared_ptr<SystemAdapter> SystemAdapterPtr;
+  typedef boost::function<void(const EventPtr&)> EventListener;
 
 } // namespace canvas
 } // namespace simgear