]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/canvas_fwd.hxx
Add simple keyboard event demo application.
[simgear.git] / simgear / canvas / canvas_fwd.hxx
index a72baf62e4bbec4b3c29916b019514b2b1b21e86..3b1b464690dcd8c1783d71de27c4853f2394b5fe 100644 (file)
@@ -39,8 +39,8 @@ namespace canvas
 
 #define SG_FWD_DECL(name)\
   class name;\
-  typedef boost::shared_ptr<name> name##Ptr;\
-  typedef boost::weak_ptr<name> name##WeakPtr;
+  typedef SGSharedPtr<name> name##Ptr;\
+  typedef SGWeakPtr<name> name##WeakPtr;
 
   SG_FWD_DECL(Canvas)
   SG_FWD_DECL(Element)
@@ -49,16 +49,37 @@ namespace canvas
   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& );
+                                        const Style&,
+                                        Element* );
 
   typedef osg::ref_ptr<osgText::Font> FontPtr;
 
@@ -66,6 +87,8 @@ namespace canvas
   typedef boost::function<Placements( SGPropertyNode*,
                                       CanvasPtr )> PlacementFactory;
 
+  typedef boost::function<void(const EventPtr&)> EventListener;
+
 } // namespace canvas
 } // namespace simgear