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

tdialogbox Class Reference

#include <dlg_box.h>

Inheritance diagram for tdialogbox:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 tdialogbox ()
void init (void)
void buildgraphics (void)
virtual void changecoordinates (void)
virtual void run (void)
void done (void)
virtual char checkvalue (int id, void *p)
void editfield (pbutton pb)
void editfield (int id)
void toggleswitch (pbutton pb)
virtual void enablebutton (int id)
virtual void disablebutton (int id)
virtual void execbutton (pbutton pb, char mouse)
void showbutton (int id)
void hidebutton (int id)
void setscrollspeed (char id, int speed)
void rebuildtaborder (void)
void showtabmark (int b)
virtual void setclipping (void)
virtual void paint (void)
virtual void redrawall (void)
virtual void redrawall2 (int xx1, int yy1, int xx2, int yy2)
virtual int getcapabilities (void)
void repaintdisplay (void)

Public Attributes

int textcolor
int starty
int ms
void * tp
char imagesaved
const char * title
int windowstyle
ttaborder taborder [100]
int tabcount
int markedtab
int disablecolor
int boxstatus

Static Public Attributes

static collategraphicoperationspcgo = NULL

Protected Member Functions

virtual void redraw (void)
virtual void setvirtualframebuf (void)
virtual void copyvirtualframebuf (void)
void newknopf (int xx1, int yy1, int xx2, int yy2)
void knopfdruck (int xx1, int yy1, int xx2, int yy2)
void knopf (int xx1, int yy1, int xx2, int yy2)
void newknopfdruck4 (int xx1, int yy1, int xx2, int yy2)
void newknopfdruck3 (int xx1, int yy1, int xx2, int yy2)
void newknopfdruck2 (int xx1, int yy1, int xx2, int yy2)
void newknopfdruck (int xx1, int yy1, int xx2, int yy2)
void rahmen (bool invers, int x1, int y1, int x2, int y2)
void rahmen (bool invers, tmouserect rect)
void rahmen3 (const char *txt, int x1, int y1, int x2, int y2, int style)
void bar (tmouserect rect, int color)
void bar (int x1, int y1, int x2, int y2, int color)
virtual void dispeditstring (char *st, int x1, int y1)
void stredit (char *s, int x1, int y1, int wdth, int max)
virtual int gettextwdth_stredit (char *txt, pfont font)
virtual void lne (int x1, int y1, char *s, int position, char einfuegen)
void intedit (int *st, int x1, int y1, int wdth, int min, int max)
void paintsurface2 (int xx1, int yy1, int xx2, int yy2)
void paintsurface (int xx1, int yy1, int xx2, int yy2)
virtual ~tdialogbox ()

Protected Attributes

int virtualbufoffset
pdialogbox next
pdialogbox prev
int dlg_mode
char knopfsuccessful

Static Protected Attributes

static pdialogbox first = NULL

Constructor & Destructor Documentation

tdialogbox::tdialogbox  ) 
 

Definition at line 139 of file dlg_box.cpp.

References activefontsettings, tfontsettings::background, black, boxstatus, tfontsettings::color, dlg_mode, first, tfontsettings::font, getcapabilities(), tfontsettings::markcolor, next, npush, prev, red, schriften, setEventRouting(), Schriften::smallarial, and virtualbufoffset.

tdialogbox::~tdialogbox  )  [protected, virtual]
 

Definition at line 2509 of file dlg_box.cpp.

References activefontsettings, boxstatus, dlg_mode, done(), first, next, npop, pcgo, prev, redrawall2(), repaintDisplay, setEventRouting(), tdlgengine::x1, tdlgengine::xsize, tdlgengine::y1, and tdlgengine::ysize.


Member Function Documentation

void tdialogbox::bar int  x1,
int  y1,
int  x2,
int  y2,
int  color
[protected]
 

Definition at line 540 of file dlg_box.cpp.

References bar().

void tdialogbox::bar tmouserect  rect,
int  color
[protected]
 

Definition at line 535 of file dlg_box.cpp.

References tmouserect::x1, tmouserect::x2, tmouserect::y1, and tmouserect::y2.

Referenced by bar(), UnitPropertyEditor::buttonpressed(), tmapgenerator::buttonpressed(), enablebutton(), execbutton(), tplayerselall::init(), tshownewtanks::init(), tresearchinfo::init(), ttributepayments::init(), UnitPropertyEditor::init(), tplayerchange::init(), paintsurface2(), redraw(), tmapgenerator::resetmapfield(), tstringselect::resettextfield(), setclipping(), and tmapgenerator::showmontlayer().

void tdialogbox::buildgraphics void   ) 
 

Reimplemented in thelpsystem.

Definition at line 1178 of file dlg_box.cpp.

References activefontsettings, agmp, asc_malloc(), boxstatus, tfontsettings::color, dlg_mode, dlg_notitle, dlg_wintitle, getimage(), getmousestatus(), imagesaved, imagesize(), mousevisible(), ms, paint(), pcgo, rebuildtaborder(), redraw(), tgraphmodeparameters::resolutionx, tgraphmodeparameters::resolutiony, textcolor, tp, windowstyle, tdlgengine::x1, tdlgengine::xsize, tdlgengine::y1, and tdlgengine::ysize.

Referenced by thelpsystem::buildgraphics(), tplayerselall::init(), tshownewtanks::init(), tgiveunitawaydlg::init(), tchoosetechlevel::init(), tresearchinfo::init(), ttributepayments::init(), MirrorMap::init(), EditArchivalInformation::init(), tminestrength::init(), tres::init(), UnitPropertyEditor::init(), EditAiParam::init(), BuildingValues::init(), tplayerchange::init(), tputresourcesdlg::init(), tmapgenerator::init(), StringEdit::init(), tgetid::init(), tstringselect::init(), tdisplaymessage::init(), MultilineEdit::init(), tchoosezoomlevel::init(), ResizeMap::init(), tbi3preferences::init(), tviewanytext::init(), tchoice_dlg::init(), and tchoosetechnology::run().

void tdialogbox::changecoordinates void   )  [virtual]
 

Definition at line 354 of file dlg_box.cpp.

char tdialogbox::checkvalue int  id,
void *  p
[virtual]
 

Reimplemented in ResizeMap, and MirrorMap.

Definition at line 1642 of file dlg_box.cpp.

Referenced by editfield().

void tdialogbox::copyvirtualframebuf void   )  [protected, virtual]
 

Definition at line 259 of file dlg_box.cpp.

References agmp, getmousestatus(), hgmp, tgraphmodeparameters::linearaddress, mousevisible(), ms, npop, npush, putspritetexture(), tdlgengine::x1, tdlgengine::xsize, tdlgengine::y1, and tdlgengine::ysize.

Referenced by paint().

void tdialogbox::disablebutton int  id  )  [virtual]
 

Definition at line 991 of file dlg_box.cpp.

References activefontsettings, centertext, disablecolor, tdlgengine::firstbutton, itoa(), lefttext, line(), npop, npush, paintsurface2(), rebuildtaborder(), rectangle(), schriften, showtext2(), Schriften::smallarial, tdlgengine::x1, and tdlgengine::y1.

Referenced by redraw(), and showbutton().

void tdialogbox::dispeditstring char *  st,
int  x1,
int  y1
[protected, virtual]
 

Definition at line 1987 of file dlg_box.cpp.

References showtext2().

Referenced by intedit(), and stredit().

void tdialogbox::done void   ) 
 

Reimplemented in thelpsystem, and tstringselect.

Definition at line 1233 of file dlg_box.cpp.

References activefontsettings, asc_free(), boxstatus, first, tdlgengine::firstbutton, getmousestatus(), imagesaved, mousevisible(), ms, npop, putimage(), repaintDisplay, tp, tdlgengine::x1, and tdlgengine::y1.

Referenced by bi3preferences(), EditArchivalInformation::buttonpressed(), changebuildingvalues(), changeminestrength(), changeresource(), changeunitvalues(), choosetechlevel(), choosetechnology(), choosezoomlevel(), tstringselect::done(), thelpsystem::done(), editArchivalInformation(), editjournal(), editString(), NewVehicleTypeDetection::evalbuffer(), execaction(), execuseraction(), getid(), giveunitaway(), legacy_choice_dlg(), tloadBImap::LoadFromFile(), mapgenerator(), mirrorMap(), playerchange(), playerselall(), removemessage(), researchinfo(), resizemap(), UnitTypeTransformation::run(), settributepayments(), viewjournal(), viewVisibilityStatistics(), and ~tdialogbox().

void tdialogbox::editfield int  id  ) 
 

Definition at line 1649 of file dlg_box.cpp.

References editfield(), and tdlgengine::firstbutton.

void tdialogbox::editfield pbutton  pb  ) 
 

Definition at line 1660 of file dlg_box.cpp.

References activefontsettings, tfontsettings::background, checkvalue(), tfontsettings::color, dblue, tfontsettings::font, intedit(), tfontsettings::length, schriften, Schriften::smallarial, stredit(), textcolor, tdlgengine::x1, and tdlgengine::y1.

Referenced by editfield(), execbutton(), and tchoosezoomlevel::run().

void tdialogbox::enablebutton int  id  )  [virtual]
 

Definition at line 858 of file dlg_box.cpp.

References activefontsettings, bar(), centertext, fatalError(), tdlgengine::firstbutton, itoa(), lefttext, lightgray, line(), max(), newknopf(), npop, npush, collategraphicoperations::off(), collategraphicoperations::on(), paintsurface(), paintsurface2(), rahmen(), rebuildtaborder(), schriften, showtext2(), showtext3(), Schriften::smallarial, textcolor, tdlgengine::x1, and tdlgengine::y1.

Referenced by tputresourcesdlg::buttonpressed(), tmapgenerator::buttonpressed(), execbutton(), UnitPropertyEditor::init(), redraw(), thelpsystem::repaintscrollbar(), tviewanytext::repaintscrollbar(), tchoosetechnology::run(), and showbutton().

void tdialogbox::execbutton pbutton  pb,
char  mouse
[virtual]
 

Definition at line 1264 of file dlg_box.cpp.

References activefontsettings, agmp, asc_free(), asc_malloc(), tfontsettings::background, bar(), black, tdlgengine::buttonpressed(), tfontsettings::color, editfield(), enablebutton(), first, tfontsettings::font, getimage(), getmousestatus(), imagesize(), tfontsettings::justify, knopfsuccessful, lefttext, tfontsettings::length, lightgray, min(), mouseinrect(), mouseparams, mousevisible(), newknopfdruck(), newknopfdruck3(), newknopfdruck4(), collategraphicoperations::off(), paintsurface2(), putimage(), rahmen(), rectangle(), releasetimeslice(), tgraphmodeparameters::resolutiony, schriften, showbutton(), showtext2(), Schriften::smallarial, starty, tmousesettings::taste, textcolor, ticker, toggleswitch(), tmousesettings::x, tdlgengine::x1, tmousesettings::y, and tdlgengine::y1.

Referenced by StringEdit::run(), tgetid::run(), and run().

int tdialogbox::getcapabilities void   )  [virtual]
 

Reimplemented in tviewanytext, and EditAiParam.

Definition at line 178 of file dlg_box.cpp.

Referenced by tdialogbox().

int tdialogbox::gettextwdth_stredit char *  txt,
pfont  font
[protected, virtual]
 

Definition at line 2218 of file dlg_box.cpp.

References gettextwdth().

Referenced by stredit().

void tdialogbox::hidebutton int  id  ) 
 

Definition at line 740 of file dlg_box.cpp.

References tdlgengine::firstbutton, and rebuildtaborder().

void tdialogbox::init void   ) 
 

Reimplemented in tbi3preferences, ResizeMap, tchoosezoomlevel, MultilineEdit, tgetid, StringEdit, tstringselect, tmapgenerator, tplayerchange, BuildingValues, EditAiParam, UnitPropertyEditor, tres, tminestrength, EditArchivalInformation, MirrorMap, tputresourcesdlg, tchoosetechnology, ttributepayments, tresearchinfo, tchoosetechlevel, and tplayerselall.

Definition at line 312 of file dlg_box.cpp.

References activefontsettings, actmap, GameMap::actplayer, boxstatus, darkgray, disablecolor, dlg_3dtitle, dlg_in3d, dlg_mode, tdlgengine::firstbutton, getplayercolor(), tfontsettings::height, imagesaved, tfontsettings::length, markedtab, npush, starty, tabcount, taborder, textcolor, title, windowstyle, tdlgengine::x1, tdlgengine::xsize, tdlgengine::y1, and tdlgengine::ysize.

Referenced by tplayerselall::init(), tshownewtanks::init(), tgiveunitawaydlg::init(), tchoosetechlevel::init(), tresearchinfo::init(), ttributepayments::init(), tchoosetechnology::init(), MirrorMap::init(), EditArchivalInformation::init(), tminestrength::init(), tres::init(), UnitPropertyEditor::init(), EditAiParam::init(), BuildingValues::init(), tplayerchange::init(), tputresourcesdlg::init(), tmapgenerator::init(), StringEdit::init(), tgetid::init(), tstringselect::init(), tviewtextquery::init(), thelpsystem::init(), tdisplaymessage::init(), MultilineEdit::init(), tchoosezoomlevel::init(), ResizeMap::init(), tbi3preferences::init(), tviewanytext::init(), and tchoice_dlg::init().

void tdialogbox::intedit int *  st,
int  x1,
int  y1,
int  wdth,
int  min,
int  max
[protected]
 

Definition at line 2250 of file dlg_box.cpp.

References activefontsettings, ct_einf, ct_ende, ct_entf, ct_left, ct_pos1, ct_right, ct_stp, cto_einf, cto_ende, cto_enter, cto_entf, cto_esc, cto_invvalue, cto_left, cto_pos1, cto_right, cto_stp, dispeditstring(), displaymessage(), tfontsettings::font, getkeysyms(), gettextwdth(), tfont::height, tfontsettings::height, itoa(), tfontsettings::justify, keypress(), lefttext, lne(), mouseinrect(), mouseparams, releasetimeslice(), and tmousesettings::taste.

Referenced by editfield().

void tdialogbox::knopf int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 122 of file dlgraph.cpp.

References paintsurface2(), and rahmen().

Referenced by redraw().

void tdialogbox::knopfdruck int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 134 of file dlgraph.cpp.

References asc_free(), asc_malloc(), getimage(), imagesize(), knopfsuccessful, mouseparams, mousevisible(), putimage(), rahmen(), releasetimeslice(), tmousesettings::taste, tmousesettings::x, and tmousesettings::y.

void tdialogbox::lne int  x1,
int  y1,
char *  s,
int  position,
char  einfuegen
[protected, virtual]
 

Definition at line 2224 of file dlg_box.cpp.

References activefontsettings, tfontsettings::font, gettextwdth(), tfont::height, and xorline().

Referenced by intedit(), and stredit().

void tdialogbox::newknopf int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 180 of file dlgraph.cpp.

References paintsurface2(), and rahmen().

Referenced by enablebutton().

void tdialogbox::newknopfdruck int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 302 of file dlgraph.cpp.

References asc_free(), asc_malloc(), getimage(), imagesize(), knopfsuccessful, line(), mouseparams, mousevisible(), putimage(), releasetimeslice(), tmousesettings::taste, tmousesettings::x, and tmousesettings::y.

Referenced by execbutton().

void tdialogbox::newknopfdruck2 int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 194 of file dlgraph.cpp.

References asc_free(), asc_malloc(), getimage(), imagesize(), knopfsuccessful, line(), mouseparams, mousevisible(), putimage(), releasetimeslice(), tmousesettings::taste, tmousesettings::x, and tmousesettings::y.

void tdialogbox::newknopfdruck3 int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 260 of file dlgraph.cpp.

References asc_free(), asc_malloc(), getimage(), imagesize(), putimage(), and rahmen().

Referenced by execbutton().

void tdialogbox::newknopfdruck4 int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 283 of file dlgraph.cpp.

References asc_free(), asc_malloc(), getimage(), imagesize(), putimage(), and rahmen().

Referenced by execbutton().

void tdialogbox::paint void   )  [virtual]
 

Definition at line 290 of file dlg_box.cpp.

References agmp, copyvirtualframebuf(), hgmp, next, redraw(), setclipping(), and setvirtualframebuf().

Referenced by buildgraphics(), redrawall(), redrawall2(), and run().

void tdialogbox::paintsurface int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 2499 of file dlg_box.cpp.

References paintsurface2(), tdlgengine::x1, and tdlgengine::y1.

Referenced by enablebutton().

void tdialogbox::paintsurface2 int  xx1,
int  yy1,
int  xx2,
int  yy2
[protected]
 

Definition at line 2490 of file dlg_box.cpp.

References bar(), dialogtexture, lightgray, and puttexture().

Referenced by disablebutton(), enablebutton(), execbutton(), knopf(), newknopf(), and paintsurface().

void tdialogbox::rahmen bool  invers,
tmouserect  rect
[protected]
 

Definition at line 116 of file dlgraph.cpp.

References rahmen(), tmouserect::x1, tmouserect::x2, tmouserect::y1, and tmouserect::y2.

void tdialogbox::rahmen bool  invers,
int  x1,
int  y1,
int  x2,
int  y2
[protected]
 

Definition at line 97 of file dlgraph.cpp.

References darkgray, line(), and white.

Referenced by thelpsystem::buildgraphics(), enablebutton(), execbutton(), tresearchinfo::init(), ttributepayments::init(), tmapgenerator::init(), tstringselect::init(), knopf(), knopfdruck(), newknopf(), newknopfdruck3(), newknopfdruck4(), rahmen(), redraw(), tviewanytext::redraw(), and tstringselect::resettextfield().

void tdialogbox::rahmen3 const char *  txt,
int  x1,
int  y1,
int  x2,
int  y2,
int  style
[protected]
 

Definition at line 1716 of file dlg_box.cpp.

References activefontsettings, black, tfontsettings::font, gettextwdth(), tfont::height, tfontsettings::justify, lefttext, tfontsettings::length, line(), npop, npush, schriften, showtext2(), and Schriften::smallarial.

Referenced by ttributepayments::init().

void tdialogbox::rebuildtaborder void   ) 
 

Definition at line 649 of file dlg_box.cpp.

References tdlgengine::firstbutton, markedtab, showtabmark(), tabcount, taborder, tdlgengine::x1, and tdlgengine::y1.

Referenced by buildgraphics(), disablebutton(), enablebutton(), hidebutton(), and showbutton().

void tdialogbox::redraw void   )  [protected, virtual]
 

Reimplemented in tviewanytext.

Definition at line 1111 of file dlg_box.cpp.

References txlattables::a, activefontsettings, actmap, GameMap::actplayer, tfontsettings::background, bar(), blue, centertext, tfontsettings::color, disablebutton(), dlg_3dtitle, dlg_in3d, dlg_notitle, dlg_wintitle, enablebutton(), tdlgengine::firstbutton, tfontsettings::font, tfontsettings::height, tfontsettings::justify, knopf(), Schriften::large, tfontsettings::length, rahmen(), schriften, showtext2(), Schriften::smallarial, starty, textcolor, title, white, windowstyle, tdlgengine::x1, xlattables, tdlgengine::xsize, tdlgengine::y1, and tdlgengine::ysize.

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

void tdialogbox::redrawall void   )  [virtual]
 

Definition at line 222 of file dlg_box.cpp.

References paint(), prev, redrawall(), and repaintDisplay.

Referenced by redrawall().

void tdialogbox::redrawall2 int  xx1,
int  yy1,
int  xx2,
int  yy2
[virtual]
 

Definition at line 231 of file dlg_box.cpp.

References paint(), prev, repaintDisplay, tdlgengine::x1, tdlgengine::xsize, tdlgengine::y1, and tdlgengine::ysize.

Referenced by run(), and ~tdialogbox().

void tdialogbox::repaintdisplay void   ) 
 

Definition at line 186 of file dlg_box.cpp.

void tdialogbox::run void   )  [virtual]
 

Reimplemented in tchoice_dlg, tbi3preferences, ResizeMap, tchoosezoomlevel, tviewanytext, tmessagedlg, MultilineEdit, tdisplaymessage, thelpsystem, tgetid, ChooseString, StringEdit, tstringselect, tmapgenerator, tplayerchange, BuildingValues, StringSelector, EditAiParam, UnitPropertyEditor, tres, tminestrength, EditArchivalInformation, MirrorMap, tputresourcesdlg, tchoosetechnology, ttributepayments, tresearchinfo, tchoosetechlevel, tgiveunitawaydlg, tplayerselall, tshownewtanks, and PlayListSelector.

Definition at line 1475 of file dlg_box.cpp.

References agmp, ct_invvalue, ct_shift_tab, ct_tab, cto_invvalue, dlg_mode, execbutton(), tdlgengine::firstbutton, getkeysyms(), getmousestatus(), keypress(), markedtab, mouseparams, mousevisible(), paint(), pcgo, prev, tdlgengine::prntkey, redrawall2(), releasetimeslice(), repaintDisplay, tgraphmodeparameters::resolutionx, tgraphmodeparameters::resolutiony, showtabmark(), tabcount, taborder, tmousesettings::taste, tdlgengine::taste, tmousesettings::x, tdlgengine::x1, xorrectangle(), tdlgengine::xsize, tmousesettings::y, tdlgengine::y1, and tdlgengine::ysize.

Referenced by tplayerselall::run(), tshownewtanks::run(), tgiveunitawaydlg::run(), tchoosetechlevel::run(), tresearchinfo::run(), ttributepayments::run(), tchoosetechnology::run(), MirrorMap::run(), EditArchivalInformation::run(), tminestrength::run(), tres::run(), UnitPropertyEditor::run(), EditAiParam::run(), BuildingValues::run(), tplayerchange::run(), tputresourcesdlg::run(), tmapgenerator::run(), StringEdit::run(), tgetid::run(), tstringselect::run(), thelpsystem::run(), tdisplaymessage::run(), tmessagedlg::run(), tchoosezoomlevel::run(), ResizeMap::run(), tbi3preferences::run(), tviewanytext::run(), and tchoice_dlg::run().

void tdialogbox::setclipping void   )  [virtual]
 

Definition at line 252 of file dlg_box.cpp.

References bar(), next, setclipping(), tdlgengine::x1, tdlgengine::xsize, tdlgengine::y1, and tdlgengine::ysize.

Referenced by paint(), and setclipping().

void tdialogbox::setscrollspeed char  id,
int  speed
 

Definition at line 812 of file dlg_box.cpp.

References tdlgengine::firstbutton.

Referenced by thelpsystem::init(), and tviewanytext::init().

void tdialogbox::setvirtualframebuf void   )  [protected, virtual]
 

Definition at line 245 of file dlg_box.cpp.

References agmp, tvirtualscreenbuf::buf, hgmp, tgraphmodeparameters::linearaddress, tgraphmodeparameters::scanlinelength, and tgraphmodeparameters::windowstatus.

Referenced by paint().

void tdialogbox::showbutton int  id  )  [virtual]
</
 

Implements tdlgengine.

Definition at line 705 of file dlg_box.cpp.

References disablebutton(), enablebutton(), tdlgengine::firstbutton, getmousestatus(), mousevisible(), and rebuildtaborder().

Referenced by execbutton(), and tstringselect::run().