#include <GLWWindowManager.h>

Public Member Functions | |
| void | addWindow (const unsigned state, GLWWindow *window, KeyboardKey *key=0, bool visible=false) |
| bool | showWindow (unsigned id) |
| bool | hideWindow (unsigned id) |
| bool | windowVisible (unsigned id) |
| bool | moveToFront (unsigned id) |
| bool | windowInCurrentState (unsigned id) |
| void | sortWindowLevels () |
| unsigned int | getFocus (int x, int y) |
| void | loadPositions () |
| void | savePositions () |
| void | clear () |
| GLWWindow * | getWindowByName (const char *name) |
| virtual void | enterState (const unsigned state) |
| virtual void | draw (const unsigned state) |
| virtual void | simulate (const unsigned state, float simTime) |
| virtual void | keyboardCheck (const unsigned state, float frameTime, char *buffer, unsigned int keyState, KeyboardHistory::HistoryElement *history, int hisCount, bool &skipRest) |
| virtual void | mouseDown (const unsigned state, GameState::MouseButton button, int x, int y, bool &skipRest) |
| virtual void | mouseUp (const unsigned state, GameState::MouseButton button, int x, int y, bool &skipRest) |
| virtual void | mouseDrag (const unsigned state, GameState::MouseButton button, int x, int y, int dx, int dy, bool &skipRest) |
| virtual void | mouseWheel (const unsigned state, int x, int y, int z, bool &skipRest) |
| virtual bool | getMenuItems (const char *menuName, std::list< GLMenuItem > &result) |
| virtual void | menuSelection (const char *menuName, const int position, GLMenuItem &item) |
Static Public Member Functions | |
| static GLWWindowManager * | instance () |
Protected Member Functions | |
| void | setCurrentEntry (const unsigned state) |
Protected Attributes | |
| std::map< unsigned, bool > | windowVisibility_ |
| std::map< unsigned, GLWWindow * > | idToWindow_ |
| std::map< unsigned, StateEntry > | stateEntrys_ |
| StateEntry * | currentStateEntry_ |
| unsigned int | changeEpoc_ |
Static Protected Attributes | |
| static GLWWindowManager * | instance_ = 0 |
Private Member Functions | |
| GLWWindowManager () | |
| virtual | ~GLWWindowManager () |
Classes | |
| struct | StateEntry |
Definition at line 31 of file GLWWindowManager.h.
| GLWWindowManager::GLWWindowManager | ( | ) | [private] |
Definition at line 44 of file GLWWindowManager.cpp.
References DIALOG_ASSERT, Image::getBits(), S3D::getDataFile(), MainMenuDialog::instance(), LANG_RESOURCE, ImageFactory::loadImage(), and setCurrentEntry().
| GLWWindowManager::~GLWWindowManager | ( | ) | [private, virtual] |
Definition at line 63 of file GLWWindowManager.cpp.
| GLWWindowManager * GLWWindowManager::instance | ( | ) | [static] |
Definition at line 34 of file GLWWindowManager.cpp.
References instance_.
Referenced by ClientWindowSetup::addCommonComponents(), ClientWindowSetup::addStateWindows(), ClientState::addWindowManager(), AdminCheckDialog::adminResult(), TipDialog::buttonDown(), SoundDialog::buttonDown(), SkipDialog::buttonDown(), SkipAllDialog::buttonDown(), SettingsSubSelectDialog::buttonDown(), SettingsSelectDialog::buttonDown(), SaveSelectDialog::buttonDown(), SaveDialog::buttonDown(), RulesDialog::buttonDown(), ResignDialog::buttonDown(), QuitDialog::buttonDown(), PlayerDialog::buttonDown(), NetworkSelectDialog::buttonDown(), MsgBoxDialog::buttonDown(), ModSubSelectDialog::buttonDown(), ModSelectDialog::buttonDown(), LogDialog::buttonDown(), KibitzingDialog::buttonDown(), InventoryDialog::buttonDown(), HUDDialog::buttonDown(), GiftMoneyDialog::buttonDown(), BuyAccessoryDialog::buttonDown(), AuthDialog::buttonDown(), AdminDialog::buttonDown(), AdminAuthDialog::buttonDown(), TutorialConditionWindowVisible::checkCondition(), ClientMain::clientMain(), ScoreDialog::display(), GiftMoneyDialog::display(), AdminCheckDialog::display(), AutoDefenseDialog::displayCurrent(), GLMenu::draw(), GLWWindow::drawMaximizedWindow(), AutoDefenseDialog::finished(), RulesDialog::hide(), ClientInitializeHandler::initialize(), GLWTalkBox::keyDown(), GLWWindow::loadPosition(), HelpButtonDialog::VolumeMenu::menuOpened(), TankMenus::PlayerMenu::menuSelection(), StartDialog::mouseDown(), PlayerDialog::nextPlayer(), TutorialDialog::processHighlight(), ClientConnectionAuthHandler::processMessage(), ProgressDialogSync::progressChange(), GLWWindow::savePosition(), ClientWindowSetup::setupGameWindows(), ClientWindowSetup::setupStartWindows(), GLWChannelText::setVisible(), MsgBoxDialog::show(), SkipAllDialog::simulate(), TutorialDialog::url(), and SkipAllDialog::windowInit().
| void GLWWindowManager::addWindow | ( | const unsigned | state, | |
| GLWWindow * | window, | |||
| KeyboardKey * | key = 0, |
|||
| bool | visible = false | |||
| ) |
Definition at line 151 of file GLWWindowManager.cpp.
References GLWidget::getId(), idToWindow_, stateEntrys_, and windowVisibility_.
Referenced by ClientWindowSetup::addCommonComponents(), ClientWindowSetup::addStateWindows(), ClientWindowSetup::setupGameWindows(), and ClientWindowSetup::setupStartWindows().
| bool GLWWindowManager::showWindow | ( | unsigned | id | ) |
Definition at line 162 of file GLWWindowManager.cpp.
References changeEpoc_, GLWPanel::display(), idToWindow_, moveToFront(), and windowVisibility_.
Referenced by AdminCheckDialog::adminResult(), SettingsSelectDialog::buttonDown(), QuitDialog::buttonDown(), ModSelectDialog::buttonDown(), GiftMoneyDialog::buttonDown(), BuyAccessoryDialog::buttonDown(), AutoDefenseDialog::displayCurrent(), RulesDialog::hide(), ClientInitializeHandler::initialize(), keyboardCheck(), GLWWindow::loadPosition(), HelpButtonDialog::VolumeMenu::menuOpened(), TankMenus::PlayerMenu::menuSelection(), menuSelection(), StartDialog::mouseDown(), ClientConnectionAuthHandler::processMessage(), MsgBoxDialog::show(), and SkipAllDialog::windowInit().
| bool GLWWindowManager::hideWindow | ( | unsigned | id | ) |
Definition at line 244 of file GLWWindowManager.cpp.
References changeEpoc_, GLWPanel::hide(), idToWindow_, and windowVisibility_.
Referenced by AdminCheckDialog::adminResult(), TipDialog::buttonDown(), SoundDialog::buttonDown(), SkipDialog::buttonDown(), SkipAllDialog::buttonDown(), SettingsSubSelectDialog::buttonDown(), SettingsSelectDialog::buttonDown(), SaveSelectDialog::buttonDown(), SaveDialog::buttonDown(), RulesDialog::buttonDown(), ResignDialog::buttonDown(), QuitDialog::buttonDown(), PlayerDialog::buttonDown(), NetworkSelectDialog::buttonDown(), MsgBoxDialog::buttonDown(), ModSubSelectDialog::buttonDown(), ModSelectDialog::buttonDown(), KibitzingDialog::buttonDown(), InventoryDialog::buttonDown(), HUDDialog::buttonDown(), GiftMoneyDialog::buttonDown(), BuyAccessoryDialog::buttonDown(), AuthDialog::buttonDown(), AdminDialog::buttonDown(), AdminAuthDialog::buttonDown(), ScoreDialog::display(), GiftMoneyDialog::display(), AdminCheckDialog::display(), AutoDefenseDialog::finished(), keyboardCheck(), GLWTalkBox::keyDown(), GLWWindow::loadPosition(), menuSelection(), StartDialog::mouseDown(), PlayerDialog::nextPlayer(), SkipAllDialog::simulate(), TutorialDialog::url(), and SkipAllDialog::windowInit().
| bool GLWWindowManager::windowVisible | ( | unsigned | id | ) |
Definition at line 232 of file GLWWindowManager.cpp.
References windowVisibility_.
Referenced by TutorialConditionWindowVisible::checkCondition(), draw(), getFocus(), getMenuItems(), keyboardCheck(), menuSelection(), mouseDown(), mouseDrag(), mouseUp(), mouseWheel(), GLWWindow::savePosition(), setCurrentEntry(), and simulate().
| bool GLWWindowManager::moveToFront | ( | unsigned | id | ) |
Definition at line 183 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWidget::getId(), sortWindowLevels(), and GLWWindowManager::StateEntry::windows_.
Referenced by showWindow().
| bool GLWWindowManager::windowInCurrentState | ( | unsigned | id | ) |
Definition at line 264 of file GLWWindowManager.cpp.
References currentStateEntry_, GLWidget::getId(), and GLWWindowManager::StateEntry::windows_.
Referenced by getMenuItems(), and menuSelection().
| void GLWWindowManager::sortWindowLevels | ( | ) |
Definition at line 207 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWWindow::getWindowLevel(), int(), and GLWWindowManager::StateEntry::windows_.
Referenced by moveToFront(), setCurrentEntry(), and GLWChannelText::setVisible().
| unsigned int GLWWindowManager::getFocus | ( | int | x, | |
| int | y | |||
| ) |
Definition at line 323 of file GLWWindowManager.cpp.
References currentStateEntry_, GLWidget::getH(), GLWidget::getId(), GLWidget::getW(), GLWidget::getX(), GLWidget::getY(), GLWidget::inBox(), GLWWindowManager::StateEntry::windows_, and windowVisible().
Referenced by GLMenu::draw().
| void GLWWindowManager::loadPositions | ( | ) |
Definition at line 561 of file GLWWindowManager.cpp.
References S3D::dialogMessage(), file, S3D::formatStringBuffer(), GLViewPort::getHeight(), GLWidget::getName(), XMLNode::getNamedChild(), XMLFile::getParserError(), XMLFile::getRootNode(), S3D::getSettingsFile(), GLViewPort::getWidth(), idToWindow_, GLWWindow::loadPosition(), XMLFile::readFile(), and LangStringUtil::strcmp().
Referenced by ClientInitializeHandler::initialize().
| void GLWWindowManager::savePositions | ( | ) |
Definition at line 622 of file GLWWindowManager.cpp.
References XMLNode::addChild(), GLWWindow::eSavePosition, GLViewPort::getHeight(), GLWidget::getName(), S3D::getSettingsFile(), GLViewPort::getWidth(), GLWWindow::getWindowState(), GLWidget::getX(), GLWidget::getY(), idToWindow_, OptionsDisplay::instance(), GLWWindow::savePosition(), and XMLNode::writeToFile().
Referenced by ClientMain::clientMain().
| void GLWWindowManager::clear | ( | ) |
Definition at line 68 of file GLWWindowManager.cpp.
References currentStateEntry_, idToWindow_, setCurrentEntry(), stateEntrys_, and windowVisibility_.
| GLWWindow * GLWWindowManager::getWindowByName | ( | const char * | name | ) |
Definition at line 308 of file GLWWindowManager.cpp.
References currentStateEntry_, GLWidget::getName(), LangStringUtil::strcmp(), and GLWWindowManager::StateEntry::windows_.
Referenced by TutorialConditionWindowVisible::checkCondition(), and TutorialDialog::processHighlight().
| void GLWWindowManager::enterState | ( | const unsigned | state | ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 282 of file GLWWindowManager.cpp.
References currentStateEntry_, setCurrentEntry(), and GLWWindowManager::StateEntry::state_.
| void GLWWindowManager::draw | ( | const unsigned | state | ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 289 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWWindow::draw(), GLWidget::getId(), setCurrentEntry(), GLWWindowManager::StateEntry::state_, GLWWindowManager::StateEntry::windows_, and windowVisible().
Referenced by ProgressDialogSync::progressChange().
| void GLWWindowManager::simulate | ( | const unsigned | state, | |
| float | simTime | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 345 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWidget::getId(), setCurrentEntry(), GLWPanel::simulate(), GLWWindowManager::StateEntry::state_, GLWWindowManager::StateEntry::windows_, and windowVisible().
Referenced by ProgressDialogSync::progressChange().
| void GLWWindowManager::keyboardCheck | ( | const unsigned | state, | |
| float | frameTime, | |||
| char * | buffer, | |||
| unsigned int | keyState, | |||
| KeyboardHistory::HistoryElement * | history, | |||
| int | hisCount, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 364 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWidget::getId(), hideWindow(), KeyboardKey::keyDown(), GLWWindow::keyDown(), KeyboardHistory::HistoryElement::sdlKey, setCurrentEntry(), showWindow(), GLWWindowManager::StateEntry::state_, GLWWindowManager::StateEntry::windowKeys_, GLWWindowManager::StateEntry::windows_, and windowVisible().
| void GLWWindowManager::mouseDown | ( | const unsigned | state, | |
| GameState::MouseButton | button, | |||
| int | x, | |||
| int | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 418 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWidget::getId(), GLWWindow::mouseDown(), setCurrentEntry(), GLWWindowManager::StateEntry::state_, GLWWindowManager::StateEntry::windows_, and windowVisible().
| void GLWWindowManager::mouseUp | ( | const unsigned | state, | |
| GameState::MouseButton | button, | |||
| int | x, | |||
| int | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 438 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWidget::getId(), GLWWindow::mouseUp(), setCurrentEntry(), GLWWindowManager::StateEntry::state_, GLWWindowManager::StateEntry::windows_, and windowVisible().
| void GLWWindowManager::mouseDrag | ( | const unsigned | state, | |
| GameState::MouseButton | button, | |||
| int | x, | |||
| int | y, | |||
| int | dx, | |||
| int | dy, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 458 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWidget::getId(), GLWWindow::mouseDrag(), setCurrentEntry(), GLWWindowManager::StateEntry::state_, GLWWindowManager::StateEntry::windows_, and windowVisible().
| void GLWWindowManager::mouseWheel | ( | const unsigned | state, | |
| int | x, | |||
| int | y, | |||
| int | z, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 479 of file GLWWindowManager.cpp.
References changeEpoc_, currentStateEntry_, GLWidget::getId(), GLWWindow::mouseWheel(), setCurrentEntry(), GLWWindowManager::StateEntry::state_, GLWWindowManager::StateEntry::windows_, and windowVisible().
| bool GLWWindowManager::getMenuItems | ( | const char * | menuName, | |
| std::list< GLMenuItem > & | result | |||
| ) | [virtual] |
Reimplemented from GLMenuI.
Definition at line 500 of file GLWWindowManager.cpp.
References currentStateEntry_, GLWidget::getId(), GLWidget::getName(), GLWWindow::getToolTip(), idToWindow_, LANG_RESOURCE, windowInCurrentState(), and windowVisible().
| void GLWWindowManager::menuSelection | ( | const char * | menuName, | |
| const int | position, | |||
| GLMenuItem & | item | |||
| ) | [virtual] |
Reimplemented from GLMenuI.
Definition at line 527 of file GLWWindowManager.cpp.
References currentStateEntry_, GLWidget::getId(), GLWidget::getName(), hideWindow(), idToWindow_, showWindow(), windowInCurrentState(), and windowVisible().
| void GLWWindowManager::setCurrentEntry | ( | const unsigned | state | ) | [protected] |
Definition at line 77 of file GLWWindowManager.cpp.
References currentStateEntry_, GLWPanel::display(), GLWidget::getId(), GLWPanel::hide(), sortWindowLevels(), GLWWindowManager::StateEntry::state_, stateEntrys_, GLWWindow::windowInit(), GLWWindowManager::StateEntry::windows_, and windowVisible().
Referenced by clear(), draw(), enterState(), GLWWindowManager(), keyboardCheck(), mouseDown(), mouseDrag(), mouseUp(), mouseWheel(), and simulate().
GLWWindowManager * GLWWindowManager::instance_ = 0 [static, protected] |
std::map<unsigned, bool> GLWWindowManager::windowVisibility_ [protected] |
Definition at line 81 of file GLWWindowManager.h.
Referenced by addWindow(), clear(), hideWindow(), showWindow(), and windowVisible().
std::map<unsigned, GLWWindow *> GLWWindowManager::idToWindow_ [protected] |
Definition at line 82 of file GLWWindowManager.h.
Referenced by addWindow(), clear(), getMenuItems(), hideWindow(), loadPositions(), menuSelection(), savePositions(), and showWindow().
std::map<unsigned, StateEntry> GLWWindowManager::stateEntrys_ [protected] |
Definition at line 92 of file GLWWindowManager.h.
Referenced by addWindow(), clear(), and setCurrentEntry().
StateEntry* GLWWindowManager::currentStateEntry_ [protected] |
Definition at line 93 of file GLWWindowManager.h.
Referenced by clear(), draw(), enterState(), getFocus(), getMenuItems(), getWindowByName(), keyboardCheck(), menuSelection(), mouseDown(), mouseDrag(), mouseUp(), mouseWheel(), moveToFront(), setCurrentEntry(), simulate(), sortWindowLevels(), and windowInCurrentState().
unsigned int GLWWindowManager::changeEpoc_ [protected] |
Definition at line 96 of file GLWWindowManager.h.
Referenced by draw(), hideWindow(), keyboardCheck(), mouseDown(), mouseDrag(), mouseUp(), mouseWheel(), moveToFront(), showWindow(), simulate(), and sortWindowLevels().
1.5.3