Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

dlg_box.h File Reference

Interface for some basic classes from which all of ASC's dialogs are derived. More...

#include "newfont.h"
#include "events.h"
#include "basegfx.h"

Include dependency graph for dlg_box.h:

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

Go to the source code of this file.

Defines

#define dlg_wintitle   1
#define dlg_in3d   2
#define dlg_notitle   4
#define dlg_3dtitle   8
#define linesshown   13

Typedefs

typedef tdialogboxpdialogbox

Functions

void displaymessage (const char *formatstring, int num,...)
 displays a dialog box with a message
void displaymessage (const ASCString &text, int num)
 displays a dialog box with a message
void removemessage (void)
 closes a message dialog box that has been opened by displaymessage()
void help (int id)
 displays a dialogbog with the given help topic
void viewtext2 (int id)
 displays a dialogbog with the given message
int viewtextquery (int id, const char *title, const char *s1, const char *s2)
int getplayercolor (int i)
void strrd8u (int l, char *s)
void strrd8d (int l, char *s)
void strrd8n (int l, char *s)
char * strrrd8u (int l)
char * strrrd8d (int l)
char * strrrd8n (int l)
ASCString readtextmessage (int id)
 returns the message with the given ID from the message system.
int getid (const char *title, int lval, int min, int max)
ASCString editString (const ASCString &title, const ASCString &defaultValue="")
int chooseString (const ASCString &title, const vector< ASCString > &entries, int defaultEntry=-1)
 displays a dialogbox which lets you chose one of a number of strings.
pair< int, int > chooseString (const ASCString &title, const vector< ASCString > &entries, const vector< ASCString > &buttons, int defaultEntry=-1)
 displays a dialogbox which lets you chose one of a number of strings.

Variables

int actdisplayedmessage
long lastdisplayedmessageticker
tvirtualscreenbuf virtualscreenbuf


Detailed Description

Interface for some basic classes from which all of ASC's dialogs are derived.

Definition in file dlg_box.h.


Define Documentation

#define dlg_3dtitle   8
 

Definition at line 35 of file dlg_box.h.

Referenced by tdialogbox::init(), and tdialogbox::redraw().

#define dlg_in3d   2
 

Definition at line 33 of file dlg_box.h.

Referenced by tplayerselall::init(), ttributepayments::init(), tminestrength::init(), tres::init(), UnitPropertyEditor::init(), EditAiParam::init(), BuildingValues::init(), tplayerchange::init(), tmapgenerator::init(), StringEdit::init(), tgetid::init(), tstringselect::init(), thelpsystem::init(), tdialogbox::init(), tviewanytext::init(), tdialogbox::redraw(), and tshowhistoryinit().

#define dlg_notitle   4
 

Definition at line 34 of file dlg_box.h.

Referenced by tdialogbox::buildgraphics(), tdisplaymessage::init(), tchoice_dlg::init(), and tdialogbox::redraw().

#define dlg_wintitle   1
 

Definition at line 32 of file dlg_box.h.

Referenced by tdialogbox::buildgraphics(), and tdialogbox::redraw().

#define linesshown   13
 

Definition at line 386 of file dlg_box.h.

Referenced by thelpsystem::buildgraphics(), and tviewanytext::redraw().


Typedef Documentation

typedef class tdialogbox* pdialogbox
 

Definition at line 152 of file dlg_box.h.


Function Documentation

pair<int,int> chooseString const ASCString title,
const vector< ASCString > &  entries,
const vector< ASCString > &  buttons,
int  defaultEntry = -1
 

displays a dialogbox which lets you chose one of a number of strings.

Parameters:
title the title of the dialog box
entries the list of strings
buttons the names of the buttons that are going to be displayed
defaultEntry the entry that is selected by default (-1 if none)
Returns:
button-number, selected index

Definition at line 3803 of file dlg_box.cpp.

References tstringselect::action, tstringselect::done(), tstringselect::init(), legacyEventSystemActive(), new_chooseString(), tstringselect::redline, and ChooseString::run().

int chooseString const ASCString title,
const vector< ASCString > &  entries,
int  defaultEntry = -1
 

displays a dialogbox which lets you chose one of a number of strings.

Parameters:
title the title of the dialog box
entries the list of strings
defaultEntry the entry that is selected by default (-1 if none)
Returns:
the selected index or -1 if nothing was selected

Definition at line 3793 of file dlg_box.cpp.

References chooseString().

void displaymessage const ASCString text,
int  num
 

displays a dialog box with a message

Parameters:
text the text
num 0 normal text, the dialog box will stay visible until removemessage() is called 1 red text for error message 2 fatal error, the program will be closed 3 normal text

Definition at line 1864 of file dlg_box.cpp.

References displayLogMessage(), and legacyEventSystemActive().

void displaymessage const char *  formatstring,
int  num,
  ...
 

displays a dialog box with a message

Parameters:
formatstring the text, which may contain the same format arguments as sprintf
num 0 normal text, the dialog box will stay visible until removemessage() is called 1 red text for error message 2 fatal error, the program will be closed 3 normal text

Definition at line 1847 of file dlg_box.cpp.

References displaymessage().

ASCString editString const ASCString title,
const ASCString defaultValue = ""
 

Definition at line 3899 of file dlg_box.cpp.

References tdialogbox::done(), StringEdit::init(), StringEdit::nt, StringEdit::onCancel, StringEdit::org, StringEdit::ReturnOriginal, StringEdit::run(), and StringEdit::text.

Referenced by editTechAdapter(), FileTransfer::enterfilename(), and getbipath().

int getid const char *  title,
int  lval,
int  min,
int  max
 

Definition at line 3706 of file dlg_box.cpp.

References tdialogbox::done(), tgetid::init(), tgetid::max, tgetid::mid, tgetid::min, tgetid::nt, tgetid::onCancel, tgetid::ReturnOriginal, and tgetid::run().

Referenced by UnitPropertyEditor::buttonpressed(), editInt(), execaction(), ChangeGameParameter::setup(), DisplayEllipse::setup(), and ChangeBuildingOwner::setup().

int getplayercolor int  i  ) 
 

Definition at line 301 of file dlg_box.cpp.

References actmap.

Referenced by tdialogbox::init().

void help int  id  ) 
 

displays a dialogbog with the given help topic

See also:
viewtext2(int)

Definition at line 3290 of file dlg_box.cpp.

References readtextmessage(), ASC_PG_Dialog::RunModal(), and PG_Widget::Show().

Referenced by execaction_pg(), execuseraction(), MailOptionsDialog::MailOptionsDialog(), tmapgenerator::run(), and tplayerchange::run().

ASCString readtextmessage int  id  ) 
 

returns the message with the given ID from the message system.

This system spans the helpfiles and the message files associated with the maps

Definition at line 3052 of file dlg_box.cpp.

References actmap, displayLogMessage(), tfindfile::getnextname(), GameMap::PreferredFilenames::mapname, GameMap::preferredFileNames, tnstream::reading, tnstream::readTextString(), s1, and strrr().

Referenced by execaction(), help(), helpAbout(), thelpsystem::init(), MailOptionsDialog::MailOptionsDialog(), viewtext2(), viewtextmessage(), and ViewTextQuery::ViewTextQuery().

void removemessage void   ) 
 

closes a message dialog box that has been opened by displaymessage()

Definition at line 1974 of file dlg_box.cpp.

References tdialogbox::boxstatus, and tdialogbox::done().

Referenced by k_loadmap().

void strrd8d int  l,
char *  s
 

Definition at line 55 of file dlg_box.cpp.

References itoa(), and minmalq.

void strrd8n int  l,
char *  s
 

Definition at line 65 of file dlg_box.cpp.

References itoa(), and minmalq.

void strrd8u int  l,
char *  s
 

Definition at line 60 of file dlg_box.cpp.

References itoa(), and minmalq.

char* strrrd8d int  l  ) 
 

Definition at line 71 of file dlg_box.cpp.

References itoa(), minmalq, and strrstring.

Referenced by displaywindspeed().

char* strrrd8n int  l  ) 
 

Definition at line 85 of file dlg_box.cpp.

References itoa(), minmalq, and strrstring.

char* strrrd8u int  l  ) 
 

Definition at line 78 of file dlg_box.cpp.

References itoa(), minmalq, and strrstring.

void viewtext2 int  id  ) 
 

displays a dialogbog with the given message

See also:
help(int)

Definition at line 3300 of file dlg_box.cpp.

References readtextmessage(), ASC_PG_Dialog::RunModal(), and PG_Widget::Show().

Referenced by gamethread(), and next_turn().

int viewtextquery int  id,
const char *  title,
const char *  s1,
const char *  s2
 

Definition at line 3398 of file dlg_box.cpp.

References legacy_viewtextquery(), legacyEventSystemActive(), ASC_PG_Dialog::RunModal(), and PG_Widget::Show().

Referenced by authenticateUser(), and changePassword().


Variable Documentation

int actdisplayedmessage
 

Definition at line 95 of file dlg_box.cpp.

Referenced by infomessage().

long lastdisplayedmessageticker
 

Definition at line 96 of file dlg_box.cpp.

Referenced by infomessage().

tvirtualscreenbuf virtualscreenbuf
 

Definition at line 99 of file dlg_box.cpp.

Referenced by gamethread(), and main().


Generated on Tue Jun 24 01:39:46 2008 for Advanced Strategic Command by  doxygen 1.4.2