Advanced Strategic Command
gameevent_dialogs.h
Go to the documentation of this file.
1 
5 // $Id: gameevent_dialogs.h,v 1.10 2010-04-05 12:48:49 mbickel Exp $
6 
7 /*
8  This file is part of Advanced Strategic Command; http://www.asc-hq.de
9  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; see the file COPYING. If not, write to the
23  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
24  Boston, MA 02111-1307 USA
25 */
26 
27 
28 #ifndef gameevent_dialogsH
29 #define gameevent_dialogsH
30 
31 #include <list>
32 
33 #include "mappolygons.h"
34 #include "gameevents.h"
35 #include "dlg_box.h"
36 #include "research.h"
37 #include "researchexecution.h"
38 
39 #include "dialogs/fieldmarker.h"
40 
41 
43  public:
44  virtual void showTechnology( const Technology* tech, const Gadgets& newGadgetsAvailable );
45 };
46 
47 extern void selectFields( FieldAddressing::Fields& fields );
48 extern bool chooseWeather( int& weather );
49 extern bool chooseTerrain( int& terrainID );
50 extern bool chooseObject ( int& objectID );
51 extern void editpolygon (Poly_gon& poly);
52 extern void getxy_building(int *x,int *y);
53 extern int selectunit ( int unitnetworkid );
54 extern void playerselall( int *playerbitmap);
55 extern bool chooseVehicleType( int& vehicleTypeID );
56 
58  private:
60  int& objectNum;
61  void cut( const MapCoordinate& pos );
62  CoordinateList cutPositions;
63 
64  protected:
65  bool mark();
66  virtual bool isOk();
67  public:
68  ReinforcementSelector( CoordinateList& list, GameMap* map, MemoryStreamStorage& buffer, int& objNum ) : SelectFromMap( list, map ), buf( buffer), objectNum(objNum) {};
69 };
70 
71 
72 class BitMapEditor : public ASC_PG_Dialog {
73  public:
74  typedef int BitType;
75  private:
76  BitType& reference;
77  PG_PropertyEditor* propertyEditor;
78  bool values[64];
79  int bitCount;
80 
81  bool ok();
82 
83  public:
84  BitMapEditor( BitType& value, const ASCString& title, const vector<ASCString>& names );
85 };
86 
87 
88 #endif
An in-memory storage of streamed data.
Definition: basestrm.h:172
void editpolygon(Poly_gon &poly)
Definition: edmisc.cpp:807
int selectunit(int unitnetworkid)
operating with polygons on tje map
Interface for some basic classes from which all of ASC's dialogs are derived.
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14
void selectFields(FieldAddressing::Fields &fields)
Interface to the event handling of ASC.
void playerselall(int *playerbitmap)
Coordinate on the twodimensional map.
Definition: typen.h:202
Adapter class for using Paragui Dialogs in ASC. This class transfers the event control from ASC to Pa...
Definition: paradialog.h:127
bool chooseVehicleType(int &vehicleTypeID)
bool chooseWeather(int &weather)
virtual void showTechnology(const Technology *tech, const Gadgets &newGadgetsAvailable)
void getxy_building(int *x, int *y)
vector< MapCoordinate > CoordinateList
Definition: fieldmarker.h:45
vector< MapCoordinate > Fields
Definition: gameevents.h:89
bool chooseTerrain(int &terrainID)
ReinforcementSelector(CoordinateList &list, GameMap *map, MemoryStreamStorage &buffer, int &objNum)
BitMapEditor(BitType &value, const ASCString &title, const vector< ASCString > &names)
Everything related to research.
bool chooseObject(int &objectID)
The map. THE central structure of ASC, which holds everything not globally available together...
Definition: gamemap.h:182