Advanced Strategic Command
edglobal.h
Go to the documentation of this file.
1 /*
2  This file is part of Advanced Strategic Command; http://www.asc-hq.de
3  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; see the file COPYING. If not, write to the
17  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  Boston, MA 02111-1307 USA
19 */
20 
21 //*Actions fr Editor
22 
23 #ifndef edglobalH
24 #define edglobalH
25 
26 #include "ed_mapcomponent.h"
27 
28 extern int infomessage( char* formatstring, ... );
29 
30 const int execactionscount = 116;
31 
32 extern const char* execactionnames[execactionscount];
33 
151 
152  };
153 
154 class SelectionHolder : public sigc::trackable {
155  const Placeable* currentItem;
156  int actplayer;
157  int currentWeather;
158 
159  public:
160  SelectionHolder() : currentItem(NULL), actplayer(0), currentWeather(0),brushSize(1) {};
161 
162  int getPlayer() { return actplayer; };
163  void setPlayer( int player );
164  sigc::signal<void,int> playerChanged;
165 
166  void setWeather( int weather );
167  int getWeather() { return currentWeather; };
168 
169  int brushSize;
170  const Placeable* getSelection();
171  void setSelection( const Placeable& component ) ;
172  void pickup ( MapField* fld );
173 
174  sigc::signal<void,const Placeable*> selectionChanged;
175  void clear();
176 };
177 
179 
180 
181 
182 extern void execaction_ev(int code);
183 extern void execaction(int code);
184 
185 #endif
const Placeable * getSelection()
Definition: edglobal.cpp:220
int getPlayer()
Definition: edglobal.h:162
sigc::signal< void, const Placeable * > selectionChanged
Definition: edglobal.h:174
int getWeather()
Definition: edglobal.h:167
void pickup(MapField *fld)
Definition: edglobal.cpp:225
a single field of the map
Definition: mapfield.h:26
int infomessage(char *formatstring,...)
Definition: edglobal.cpp:251
void setSelection(const Placeable &component)
Definition: edglobal.cpp:191
SelectionHolder selection
Definition: edglobal.cpp:189
tuseractions
Definition: edglobal.h:34
void setPlayer(int player)
Definition: edglobal.cpp:198
void execaction_ev(int code)
Definition: edglobal.cpp:1026
sigc::signal< void, int > playerChanged
Definition: edglobal.h:164
const int execactionscount
Definition: edglobal.h:30
void setWeather(int weather)
Definition: edglobal.cpp:212
const char * execactionnames[execactionscount]
Definition: edglobal.cpp:68
void execaction(int code)
this executes all functions that use legacy Eventhandling
Definition: edglobal.cpp:427