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

ASC_PG_Dialog Class Reference

Adapter class for using Paragui Dialogs in ASC. This class transfers the event control from ASC to Paragui and back. All new dialog classes should be derived from this class. More...

#include <paradialog.h>

Inheritance diagram for ASC_PG_Dialog:

Inheritance graph
[legend]
List of all members.

Public Types

enum  StandardButtonDirectonType { Vertical, Horizontal }

Public Member Functions

 ASC_PG_Dialog (PG_Widget *parent, const PG_Rect &r, const ASCString &windowtext, WindowFlags flags=DEFAULT, const ASCString &style="Window", int heightTitlebar=25)
PG_ButtonAddStandardButton (const ASCString &name)
void StandardButtonDirection (StandardButtonDirectonType dir)
int RunModal ()
 Enter modal mode.

Static Public Member Functions

static PG_Rect centerRectangle (const PG_Rect &rect)

Protected Member Functions

virtual bool closeWindow ()
bool quitModalLoop (int value)
virtual bool eventKeyDown (const SDL_KeyboardEvent *key)
 Overridable Eventhandler for a SDL_KeyboardEvent message.

Protected Attributes

PG_MessageObjectcaller

Detailed Description

Adapter class for using Paragui Dialogs in ASC. This class transfers the event control from ASC to Paragui and back. All new dialog classes should be derived from this class.

Definition at line 125 of file paradialog.h.


Member Enumeration Documentation

enum ASC_PG_Dialog::StandardButtonDirectonType
 

Enumeration values:
Vertical 
Horizontal 

Definition at line 136 of file paradialog.h.


Constructor & Destructor Documentation

ASC_PG_Dialog::ASC_PG_Dialog PG_Widget parent,
const PG_Rect r,
const ASCString windowtext,
WindowFlags  flags = DEFAULT,
const ASCString style = "Window",
int  heightTitlebar = 25
 

Definition at line 412 of file paradialog.cpp.

References PG_Widget::GetTransparency(), WindowCounter::num(), and PG_ThemeWidget::SetTransparency().


Member Function Documentation

PG_Button * ASC_PG_Dialog::AddStandardButton const ASCString name  ) 
 

Definition at line 466 of file paradialog.cpp.

References PG_Rect::Height(), PG_Rect::PG_Rect(), Vertical, and PG_Rect::Width().

Referenced by ChooseTech::ChooseTech(), EditPlayerData::EditPlayerData(), EventEditor::EventEditor(), GotoPosition::GotoPosition(), ImportBI3MapDialog::ImportBI3MapDialog(), ItemLocator::ItemLocator(), MailOptionsDialog::MailOptionsDialog(), MultiLineEditorDialog::MultiLineEditorDialog(), NewMap::NewMap(), NewMessage::NewMessage(), NewStringChooser::NewStringChooser(), and StringEditor::StringEditor().

PG_Rect ASC_PG_Dialog::centerRectangle const PG_Rect rect  )  [static]
 

Definition at line 434 of file paradialog.cpp.

References PG_Application::GetScreenHeight(), and PG_Application::GetScreenWidth().

bool ASC_PG_Dialog::closeWindow  )  [protected, virtual]
 

Reimplemented in VehicleProduction_SelectionWindow, ResourcePlacementDialog, ChanceSettingsDialog, EventAreasDialog, and EventWindChangesDialog.

Definition at line 525 of file paradialog.cpp.

References caller, PG_Widget::QuitModal(), and PG_MessageObject::SetInputFocus().

Referenced by ChangePasswordDialog::ChangePasswordDialog(), VehicleProduction_SelectionWindow::closeWindow(), eventKeyDown(), and SoundSettings::SoundSettings().

bool ASC_PG_Dialog::eventKeyDown const SDL_KeyboardEvent *  key  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_KeyboardEvent message.

This handler is called when a key changed it's state from unpressed to pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
key SDL_KeyboardEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_MessageObject.

Reimplemented in AmmoTransferWindow, VehicleProduction_SelectionWindow, SelectFromMap, InternalAmmoTransferWindow, MessageDialog, ItemSelectorWindow, IngameMessageViewer, and ViewFormattedText.

Definition at line 481 of file paradialog.cpp.

References closeWindow().

Referenced by IngameMessageViewer::eventKeyDown(), and SelectFromMap::eventKeyDown().

bool ASC_PG_Dialog::quitModalLoop int  value  )  [protected]
 

Definition at line 490 of file paradialog.cpp.

References PG_Widget::QuitModal(), and PG_Widget::SetModalStatus().

Referenced by ResourcePlacementDialog::buttonErrorOkEvent(), SoundSettings::buttonEvent(), ResourcePlacementDialog::buttonEvent(), ChanceSettingsDialog::closeWindow(), EventWindChangesDialog::closeWindow(), EventAreasDialog::closeWindow(), ResourcePlacementDialog::closeWindow(), IngameMessageViewer::eventKeyDown(), MessageDialog::eventKeyDown(), FileSelectionWindow::fileNameSelected(), MessageDialog::handleButton(), MultiLineEditorDialog::MultiLineEditorDialog(), VehicleProduction_SelectionWindow::produce(), StringEditor::StringEditor(), and ViewTextQuery::ViewTextQuery().

int ASC_PG_Dialog::RunModal  )  [virtual]
 

Enter modal mode.

Reimplemented from PG_Widget.

Reimplemented in FileFindDialog, PasswordDialog, ItemSelectorWindow, and GotoPosition.

Definition at line 426 of file paradialog.cpp.

References PG_Widget::RunModal().

Referenced by adminGame(), ammoTransferWindow(), ChangeDefaultPasswordDialog::changeDefaultPasswordDialog(), ChangeMapPasswordDialog::changeMapPasswordDialog(), chooseTechnology(), ConfirmExitDialog::confirmExitDialog(), createevent(), createNewMap(), SoundSettings::diag(), editEmailOptions(), editGameOptions(), editMap(), editPlayerData(), editpolygon(), editProduction(), editString2(), errorMessageDialog(), eventEditor(), TargetCoordinateLocator::eventMouseButtonDown(), execaction(), execuseraction2(), ReplayGuiFunctions::ReplayRecord::execute(), CargoGuiFunctions::UnitProduction::execute(), GameDialog::gameDialog(), GameOptionsDialog::gameOptionsDialog(), PBEMServer::getSession(), getxy_building(), help(), helpAbout(), importBI3Map(), infoMessageDialog(), internalAmmoTransferWindow(), locateItemByID(), MessageSelectionWindow::messageSelected(), MultiLineEditor(), MultiPlayerDialog::multiPlayerDialog(), new_choice_dlg(), new_chooseString(), newmessage(), newreminder(), OptionsDialog::optionsDialog(), pbpplayerstatistics(), researchinfo(), resourceAnalysis(), resourcePlacementDialog(), trunreplay::run(), GotoPosition::RunModal(), PasswordDialog::RunModal(), FileFindDialog::RunModal(), SaveGameDialog::saveGameDialog(), selectFields(), selectFile(), selectunit(), selectUnitFromMap(), setmapparameters(), Reinforcements::setup(), DisplayImmediateMessage::setup(), setupalliances(), setupPlayers(), showAllUnitPositions(), showCargoSummary(), AI::showFieldInformation(), showGameParameters(), showMemoryFootprint(), showPlayerTime(), ChooseTech::showPrerequisites(), showSDLInfo(), showSearchPath(), showtechnology(), showUnitEndurance(), SinglePlayerDialog::singlePlayerDialog(), SoundSettings::soundSettings(), unitProductionAnalysis(), viewFont(), viewmessage(), viewmessages(), viewMiningPower(), viewterraininfo(), viewtext2(), viewtextquery(), viewUnitSetinfo(), warningMessageDialog(), weathercast(), and weatherConfigurationDialog().

void ASC_PG_Dialog::StandardButtonDirection StandardButtonDirectonType  dir  ) 
 

Definition at line 461 of file paradialog.cpp.

Referenced by EditPlayerData::EditPlayerData(), MailOptionsDialog::MailOptionsDialog(), and NewMap::NewMap().


Member Data Documentation

PG_MessageObject* ASC_PG_Dialog::caller [protected]
 

Definition at line 129 of file paradialog.h.

Referenced by ChangePasswordDialog::ChangePasswordDialog(), and closeWindow().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:16:09 2008 for Advanced Strategic Command by  doxygen 1.4.2