// statobjact.hpp -- static object actions // // Written by Frederic Bouvier, started May 2002. // // Copyright (C) 2002 Frederic Bouvier - fredb@users.sourceforge.net // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // 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. // // $Id: statobjact.hpp,v 1.5 2004/02/04 22:38:49 fredb2 Exp $ #ifndef _statobjact_hpp_ #define _statobjact_hpp_ #include #include "action.hpp" class FGSD_MoveStaticObjectAction : public FGSD_Action { public: FGSD_MoveStaticObjectAction(); FGSD_MoveStaticObjectAction( const char *__name, double __lon, double __lat, double __elev, double __hdg, double __xdepl, double __ydepl ); bool undo(); bool redo( bool __step = false ); std::string name() const; std::string description() const; bool combine( FGSD_Action *__action ); FGSD_ActionID type() const; void *convertTo( FGSD_ActionID __id ); FGSD_Action *clone() const; bool getPosition( bool undo, double &lon, double &lat ) const; bool save( const char *__project, SGPropertyNode *__node ); bool load( const char *__project, SGPropertyNode *__node ); static FGSD_ActionID _id; private: std::string _name; std::string _path; double _lon; double _lat; double _elev; double _hdg; double _xdepl; double _ydepl; }; class FGSD_ChangeStaticObjectAction : public FGSD_Action { public: FGSD_ChangeStaticObjectAction(); FGSD_ChangeStaticObjectAction( const char *__name, double __lon, double __lat, double __elev, double __hdg, double __rot ); ~FGSD_ChangeStaticObjectAction(); bool undo(); bool redo( bool __step = false ); std::string name() const; std::string description() const; bool combine( FGSD_Action *__action ); FGSD_ActionID type() const; void *convertTo( FGSD_ActionID __id ); FGSD_Action *clone() const; bool getPosition( bool undo, double &lon, double &lat ) const; bool save( const char *__project, SGPropertyNode *__node ); bool load( const char *__project, SGPropertyNode *__node ); static FGSD_ActionID _id; private: std::string _name; std::string _path; double _lon; double _lat; double _elev; double _hdg; double _rot; }; class FGSD_AddRemoveStaticObjectAction : public FGSD_Action { public: FGSD_AddRemoveStaticObjectAction( bool __add ); FGSD_AddRemoveStaticObjectAction( bool __add, const char *__name, double __lon, double __lat, double __elev, double __hdg, std::vector __textures ); bool undo(); bool redo( bool __step = false ); std::string name() const; std::string description() const; FGSD_ActionID type() const; void *convertTo( FGSD_ActionID __id ); FGSD_Action *clone() const; bool getPosition( bool undo, double &lon, double &lat ) const; bool save( const char *__project, SGPropertyNode *__node ); bool load( const char *__project, SGPropertyNode *__node ); static FGSD_ActionID _id; private: bool _add; std::string _name; std::string _path; std::vector _textures; double _lon; double _lat; double _elev; double _hdg; }; #endif