dialog.h File Reference

Interface for all the dialog boxes used by the game and the mapeditor. More...

#include <sigc++/sigc++.h>
#include "ascstring.h"
#include "dlg_box.h"
#include "password.h"
#include "typen.h"
#include "actions/actionresult.h"

Include dependency graph for dialog.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tviewanytext
class  tparagraph
class  tmessagedlg
class  MultilineEdit

Typedefs

typedef tparagraphpparagraph

Functions

void displaymessage2 (const char *formatstring,...)
 displays a message in the status line of ASC
void dispmessage2 (int id, const char *st=NULL)
 displays a message in the message line
void dispmessage2 (const ActionResult &result)
char mix3colors (int p1, int p2, int p3)
char mix2colors (int a, int b)
char mix4colors (int a, int b, int c, int d)
void bi3preferences (void)
 the dialog box for setting up how to load bi3 graphics and maps. Since ASC now uses its own graphics, this dialog is not used any more.
void resizemap (void)
 a dialog box that lets a user resize the active map. Should only be used in the mapeditor
void choosezoomlevel (void)
void viewUnitSetinfo (void)
int choice_dlg (const ASCString &title, const ASCString &leftButton, const ASCString &rightButton)
void selectgraphicset (void)
int editInt (const ASCString &title, int defaultValue, int minValue=0, int maxValue=maxint)
void displayActionError (const ActionResult &result, const ASCString &additionalInfo="")

Variables

const int dbluedark = 248


Detailed Description

Interface for all the dialog boxes used by the game and the mapeditor.

Definition in file dialog.h.


Typedef Documentation

typedef class tparagraph* pparagraph

Definition at line 104 of file dialog.h.


Function Documentation

void bi3preferences ( void   ) 

the dialog box for setting up how to load bi3 graphics and maps. Since ASC now uses its own graphics, this dialog is not used any more.

Definition at line 1124 of file dialog.cpp.

References tdialogbox::done(), tbi3preferences::init(), and tbi3preferences::run().

Referenced by executeUserAction().

int choice_dlg ( const ASCString title,
const ASCString leftButton,
const ASCString rightButton 
)

displays a dialog with two buttons, to select one of them

Parameters:
title,: the message text; printf style arguments allowed
leftButton the text on the left button
rightButton the text on the right button
Returns:
1 if the left button has been pressed; 2 if the right button has been pressed

Definition at line 616 of file dialog.cpp.

References legacy_choice_dlg(), legacyEventSystemActive(), and new_choice_dlg().

Referenced by checkforreplay(), checkforvictory(), NextTurnStrategy_AskUser::continueWhenLastPlayer(), execaction_pg(), CargoGuiFunctions::RecycleUnitCommandButton::execute(), GuiFunctions::EndTurn::execute(), GuiFunctions::SelfDestructIcon::execute(), executeUserAction(), FileSelectionWindow::fileNameSelected(), SavegameSelectionWindow::fileNameSelected(), gamethread(), generateTechTree(), mapeditorMainThread(), BuildingItem::place(), ObjectItem::place(), VehicleProduction_SelectionWindow::removeProductionLine(), runPendingTasks(), FileTransfer::send(), tmapgenerator::setmap(), DisplayEllipse::setup(), and viewOwnReplay().

void choosezoomlevel ( void   ) 

Definition at line 1324 of file dialog.cpp.

References displaymap(), tdialogbox::done(), tchoosezoomlevel::init(), and tchoosezoomlevel::run().

void displayActionError ( const ActionResult result,
const ASCString additionalInfo = "" 
)

Definition at line 2170 of file dialog.cpp.

References errorMessage(), ActionResult::getCode(), ActionResult::getMessage(), and getmessage().

Referenced by trunreplay::execnextreplaymove(), CargoGuiFunctions::UnitProduction::execute(), CargoGuiFunctions::UnitTraining::execute(), CargoGuiFunctions::RefuelUnitCommand::execute(), CargoGuiFunctions::TransferUnitControl::execute(), CargoGuiFunctions::RecycleUnitCommandButton::execute(), GuiFunctions::PowerSwitch::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::EnableReactionfire::execute(), GuiFunctions::DisableReactionfire::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::PutMineStage2::execute(), GuiFunctions::RemoveMine::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::SelfDestructIcon::execute(), executeUserAction(), ChooseTech::ok(), InternalAmmoTransferHandler::performTransfer(), VehicleProduction_SelectionWindow::removeProductionLine(), BuildingControlWindow::repair(), tgiveunitawaydlg::run(), and AddProductionLine_SelectionItemFactory::vehicleTypeSelected().

void displaymessage2 ( const char *  formatstring,
  ... 
)

displays a message in the status line of ASC

Definition at line 544 of file asc-mainscreen.cpp.

void dispmessage2 ( const ActionResult result  ) 

Definition at line 466 of file dialog.cpp.

References dispmessage2(), ActionResult::getCode(), and ActionResult::getMessage().

void dispmessage2 ( int  id,
const char *  st = NULL 
)

displays a message in the message line

Definition at line 472 of file dialog.cpp.

References displaymessage2(), getmessage(), s1, and s2.

int editInt ( const ASCString title,
int  defaultValue,
int  minValue = 0,
int  maxValue = maxint 
)

Definition at line 2165 of file dialog.cpp.

References getid().

Referenced by editResearchPoints(), TurnPassed::setup(), ResourceTribute::setup(), WindChange::setup(), DisplayMessage::setup(), ChangeBuildingDamage::setup(), NextMap::setup(), ChangeDiplomaticStatus::setup(), ChangePlayerState::setup(), SetViewSharing::setup(), and AddResources::setup().

char mix2colors ( int  a,
int  b 
)

char mix3colors ( int  p1,
int  p2,
int  p3 
)

char mix4colors ( int  a,
int  b,
int  c,
int  d 
)

void resizemap ( void   ) 

a dialog box that lets a user resize the active map. Should only be used in the mapeditor

Definition at line 1256 of file dialog.cpp.

References displaymap(), tdialogbox::done(), ResizeMap::init(), and ResizeMap::run().

Referenced by execaction().

void selectgraphicset ( void   ) 

Definition at line 2153 of file dialog.cpp.

References actmap, displaymap(), getGraphicSetIdFromFilename(), GameMap::graphicset, and selectFile().

Referenced by execaction_pg(), and executeUserAction().

void viewUnitSetinfo ( void   ) 

Definition at line 1369 of file dialog.cpp.

References actmap, ContainerBaseType::description, fieldvisiblenow(), GameMap::getCursor(), GameMap::getField(), Player::getName(), GameMap::getPlayer(), ContainerBaseType::id, LoadableItemType::location, ContainerBaseType::name, ASC_PG_Dialog::RunModal(), ASCString::toString(), SingleUnitSet::unit, and unitSets.

Referenced by execaction(), and executeUserAction().


Variable Documentation

const int dbluedark = 248

Definition at line 37 of file dialog.h.


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