X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fviewmgr.hxx;h=ea4470fbb6a93bbd0dd78d416b611b3fcb83166c;hb=18d1593c42c2df60d7fb44ace722ca3e8a7fd82c;hp=922d3561cc6ee5a0f3688c1831f38e3927f344fd;hpb=4c10ef139c109c80ba6a17ee669c6feaacc26a95;p=flightgear.git diff --git a/src/Main/viewmgr.hxx b/src/Main/viewmgr.hxx index 922d3561c..ea4470fbb 100644 --- a/src/Main/viewmgr.hxx +++ b/src/Main/viewmgr.hxx @@ -16,7 +16,7 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -24,11 +24,7 @@ #ifndef _VIEWMGR_HXX #define _VIEWMGR_HXX - -#ifndef __cplusplus -# error This library requires C++ -#endif - +#include #include #include @@ -37,11 +33,10 @@ # include #endif -#include - +#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 config_list; + typedef vector > viewer_list; viewer_list views; + SGVec3d abs_viewer_position; int current;