Advanced Strategic Command
Classes | Macros | Functions | Variables
alliancesetup.cpp File Reference
#include <sstream>
#include <pgimage.h>
#include <pglistboxbaseitem.h>
#include <pgtooltiphelp.h>
#include "../iconrepository.h"
#include "../gamemap.h"
#include "../paradialog.h"
#include "playersetup.h"
#include "alliancesetup.h"
#include "../actions/diplomacycommand.h"
#include "../dialog.h"
Include dependency graph for alliancesetup.cpp:

Go to the source code of this file.

Classes

class  ListBoxImageItem< SelectionType >
 
class  DiplomaticModeChooser< SelectionType >
 
class  AllianceSetupWindow
 

Macros

#define calcx(counter)   (sqaureWidth + nameLength + spacing + counter * (colWidth + spacing) )
 
#define calcy(counter)   (barOverhang + counter * (lineHeight + spacing))
 

Functions

template<typename SelectionType >
int getItemNum ()
 
template<typename SelectionType >
const char * getStateName (int s)
 
template<>
int getItemNum< DiplomaticStates > ()
 
template<>
const char * getStateName< DiplomaticStates > (int s)
 
template<>
int getItemNum< AllianceSetupWidget::DiplomaticTransitions > ()
 
template<>
const char * getStateName< AllianceSetupWidget::DiplomaticTransitions > (int s)
 
ASCString getDiplomaticStateImage (DiplomaticStates s)
 
ASCString getDiplomaticStateImage (AllianceSetupWidget::DiplomaticTransitions s)
 
bool setupalliances (GameMap *actmap, AllianceSetupWidget::ApplyStrategy *strategy, bool supervisor)
 runs the Alliance-Setup dialog. More...
 

Variables

const int diplomaticStateIconSize = 20
 
const int diplomaticStateIconSpace = 2
 

Macro Definition Documentation

#define calcx (   counter)    (sqaureWidth + nameLength + spacing + counter * (colWidth + spacing) )
#define calcy (   counter)    (barOverhang + counter * (lineHeight + spacing))

Function Documentation

ASCString getDiplomaticStateImage ( DiplomaticStates  s)
ASCString getDiplomaticStateImage ( AllianceSetupWidget::DiplomaticTransitions  s)
template<typename SelectionType >
int getItemNum ( )

Definition at line 40 of file alliancesetup.cpp.

Definition at line 54 of file alliancesetup.cpp.

References diplomaticStateNum.

template<>
int getItemNum< DiplomaticStates > ( )

Definition at line 47 of file alliancesetup.cpp.

References diplomaticStateNum.

template<typename SelectionType >
const char* getStateName ( int  s)

Definition at line 43 of file alliancesetup.cpp.

template<>
const char* getStateName< AllianceSetupWidget::DiplomaticTransitions > ( int  s)

Definition at line 57 of file alliancesetup.cpp.

References diplomaticStateNames.

template<>
const char* getStateName< DiplomaticStates > ( int  s)

Definition at line 50 of file alliancesetup.cpp.

References diplomaticStateNames.

bool setupalliances ( GameMap actmap,
AllianceSetupWidget::ApplyStrategy strategy,
bool  supervisor = false 
)

runs the Alliance-Setup dialog.

Returns
if the view should be recalculated

Definition at line 368 of file alliancesetup.cpp.

References AllianceSetupWindow::isSomethingChanged(), and ASC_PG_Dialog::RunModal().

Referenced by editAlliances(), and execaction_pg().

Variable Documentation

const int diplomaticStateIconSize = 20
const int diplomaticStateIconSpace = 2