]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/viewmgr.hxx
Merge branch 'jt/runway' into next
[flightgear.git] / src / Main / viewmgr.hxx
index c328a9d701db37bb75bef1d922a47c96f6c5a78d..ea4470fbb6a93bbd0dd78d416b611b3fcb83166c 100644 (file)
 #ifndef _VIEWMGR_HXX
 #define _VIEWMGR_HXX
 
-
-#ifndef __cplusplus                                                          
-# error This library requires C++
-#endif                                   
-
+#include <vector>
 
 #include <simgear/compiler.h>
 #include <simgear/structure/subsystem_mgr.hxx>
 #  include <config.h>
 #endif
 
-#include <vector>
-
+#include "fg_props.hxx"
 #include "viewer.hxx"
 
-SG_USING_STD(vector);
+using std::vector;
 
 
 // Define a structure containing view information
@@ -91,10 +86,12 @@ public:
     }
     inline FGViewer *next_view() {
        setView((current+1 < (int)views.size()) ? (current + 1) : 0);
+       view_number->fireValueChanged();
        return views[current];
     }
     inline FGViewer *prev_view() {
        setView((0 < current) ? (current - 1) : (views.size() - 1));
+       view_number->fireValueChanged();
        return views[current];
     }
 
@@ -151,8 +148,11 @@ private:
     int getView () const;
     void setView (int newview);
 
-    typedef vector < FGViewer * > viewer_list;
+    SGPropertyNode_ptr view_number;
+    vector<SGPropertyNode_ptr> config_list;
+    typedef vector<SGSharedPtr<FGViewer> > viewer_list;
     viewer_list views;
+    SGVec3d abs_viewer_position;
 
     int current;