edglobal.h

Go to the documentation of this file.
00001 /*
00002     This file is part of Advanced Strategic Command; http://www.asc-hq.de
00003     Copyright (C) 1994-2010  Martin Bickel  and  Marc Schellenberger
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; see the file COPYING. If not, write to the 
00017     Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
00018     Boston, MA  02111-1307  USA
00019 */
00020 
00021 //*Actions fr Editor
00022 
00023 #ifndef edglobalH
00024 #define edglobalH
00025 
00026 #include "ed_mapcomponent.h"
00027 
00028 extern int infomessage( char* formatstring, ... );
00029 
00030 const int execactionscount = 116;
00031 
00032 extern const char*  execactionnames[execactionscount];
00033 
00034 enum tuseractions {
00035      act_end,
00036      act_help,
00037      act_seteditmode,
00038      act_selbodentyp,
00039      act_selbodentypAll,
00040      act_selunit,
00041      act_selcolor,
00042      act_selbuilding,
00043      act_selobject,
00044      act_selobjectAll,
00045      act_selmine,
00046      act_selweather,
00047      act_setupalliances,
00048      act_setupplayers,
00049      act_toggleresourcemode,
00050      act_changeunitdir,
00051      act_asc_resource,
00052      act_maptopcx,
00053      act_loadmap,
00054      act_changeplayers,
00055      act_newmap,
00056      act_polymode,
00057      act_repaintdisplay,
00058      act_unitinfo,
00059      act_viewmap,
00060      act_about,
00061      act_createresources,
00062      act_changecargo,
00063      act_changeresources,
00064      act_changeterraindir,
00065      act_events,
00066      act_fillmode,
00067      act_mapgenerator,
00068      act_setactivefieldvals,
00069      act_deletething,
00070      act_showpalette,
00071      act_changeminestrength,
00072      act_changemapvals,
00073      act_changeproduction,
00074      act_savemap,
00075      act_changeunitvals,
00076      act_mirrorcursorx,
00077      act_mirrorcursory,
00078      act_placemine,
00079      act_placething,
00080      act_deleteunit,
00081      act_deletebuilding,
00082      act_deleteobject,
00083      act_deletetopmostobject,
00084      act_deleteallobjects,
00085      act_deletemine,
00086      act_aboutbox,
00087      act_savemapas,
00088      act_endpolyfieldmode,
00089      act_smoothcoasts,
00090      act_import_bi_map,
00091      act_seperator,
00092      act_bi_resource,
00093      act_resizemap,
00094      act_insert_bi_map,
00095      act_setzoom,
00096      act_movebuilding,
00097      act_setactweatherglobal,
00098      act_setmapparameters,
00099      act_terraininfo,
00100      act_setunitfilter,
00101      act_selectgraphicset,
00102      act_unitsettransformation,
00103      act_unitSetInformation,
00104      act_switchmaps,
00105      act_transformMap,
00106      act_editArchivalInformation,
00107      act_displayResourceComparison,
00108      act_specifyunitproduction,
00109      act_pasteFromClipboard,
00110      act_copyToClipboard,
00111      act_cutToClipboard,
00112      act_saveClipboard,
00113      act_readClipBoard,
00114      act_setTurnNumber,
00115      act_showPipeNet,
00116      act_editResearch,
00117      act_editResearchPoints,
00118      act_generateTechTree,
00119      act_editTechAdapter,
00120      act_resetPlayerData,
00121      act_createresources2,
00122      act_setactnewweather,
00123      act_primaryAction, 
00124      act_playerStrengthSummary,
00125      act_increase_zoom,
00126      act_decrease_zoom,
00127      act_editpreferences,
00128      act_clearresources,
00129      act_dumpBuilding,
00130      act_dumpVehicle,
00131      act_dumpObject,
00132      act_pbpstatistics,
00133      act_exchangeGraphics,
00134      act_openControlPanel,
00135      act_releaseControlPanel,
00136      act_dumpAllVehicleDefinitions,
00137      act_clearSelection,
00138      act_dumpAllBuildings,
00139      act_locateItemByID,
00140      act_mirrorMap,
00141      act_copyArea,
00142      act_pasteArea,
00143      asc_nullPointerCrash,
00144      asc_testFunction,
00145      act_unitGuideDialog,
00146      act_runLuaScript,
00147      act_runTranslationScript,
00148      act_dumpAllTerrain,
00149      act_dumpAllObjects,
00150      act_showweapnrange
00151 
00152  };
00153 
00154 class SelectionHolder : public SigC::Object {
00155      const Placeable* currentItem;
00156      int actplayer;
00157      int currentWeather;
00158      
00159   public:
00160      SelectionHolder() : currentItem(NULL), actplayer(0), currentWeather(0),brushSize(1) {};
00161  
00162      int getPlayer() { return actplayer; };
00163      void setPlayer( int player );
00164      SigC::Signal1<void,int> playerChanged;
00165      
00166      void setWeather( int weather );
00167      int getWeather() { return currentWeather; };
00168      
00169      int brushSize;
00170      const Placeable* getSelection();
00171      void setSelection( const Placeable& component ) ;
00172      void pickup ( MapField* fld );
00173      
00174      SigC::Signal1<void,const Placeable*> selectionChanged;
00175      void clear(); 
00176 };
00177  
00178 extern SelectionHolder selection;
00179 
00180   
00181  
00182 extern void         execaction_ev(int code);
00183 extern void         execaction(int code);
00184 
00185 #endif

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