guifunctions-interface.h

Go to the documentation of this file.
00001 //     $Id: guifunctions-interface.h,v 1.5 2010-03-07 19:52:44 mbickel Exp $
00002 //
00003 /*
00004     This file is part of Advanced Strategic Command; http://www.asc-hq.de
00005     Copyright (C) 1994-2010  Martin Bickel  and  Marc Schellenberger
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; see the file COPYING. If not, write to the 
00019     Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
00020     Boston, MA  02111-1307  USA
00021 */
00022 
00023 #if defined(karteneditor) && !defined(pbpeditor)
00024 #error the mapeditor is not supposed the gui icons  !
00025 #endif
00026 
00027 
00028 #ifndef guifunctionsinterfaceH
00029 #define guifunctionsinterfaceH
00030 
00031 #include "guiiconhandler.h"
00032 
00033 class AStar3D;
00034 
00035 namespace GuiFunctions {
00036 
00037 class MovementBase : public GuiFunction {
00038    protected:
00039       virtual void parametrizePathFinder( AStar3D& pathFinder ) {};
00040       virtual int getVerticalDirection() = 0;
00041    public:
00042       void execute( const MapCoordinate& pos, ContainerBase* subject, int num );
00043       bool available( const MapCoordinate& pos, ContainerBase* subject, int num );
00044 };
00045    
00046 class Movement : public MovementBase 
00047 {
00048    protected:
00049       virtual void parametrizePathFinder( AStar3D& pathFinder );
00050    public:
00051       bool checkForKey( const SDL_KeyboardEvent* key, int modifier, int num );
00052       Surface& getImage( const MapCoordinate& pos, ContainerBase* subject, int num );
00053       ASCString getName( const MapCoordinate& pos, ContainerBase* subject, int num );
00054       int getVerticalDirection() { return 0; };
00055       bool available( const MapCoordinate& pos, ContainerBase* subject, int num );
00056 };
00057 
00058 
00059 class Cancel : public GuiFunction
00060 {
00061    public:
00062       bool available( const MapCoordinate& pos, ContainerBase* subject, int num );
00063       void execute( const MapCoordinate& pos, ContainerBase* subject, int num );
00064       bool checkForKey( const SDL_KeyboardEvent* key, int modifier, int num );
00065       Surface& getImage( const MapCoordinate& po, ContainerBase* subject, int nums );
00066       ASCString getName( const MapCoordinate& pos, ContainerBase* subject, int num );
00067 };
00068 
00069 }
00070 
00071 #endif
00072 

Generated on Mon May 21 01:26:33 2012 for Advanced Strategic Command by  doxygen 1.5.1