#include <guiiconhandler.h>
Inheritance diagram for NewGuiHost:

Public Member Functions | |
| NewGuiHost (MainScreenWidget *parent, MapDisplayPG *mapDisplay, const PG_Rect &r) | |
| void | eval (const MapCoordinate &pos, ContainerBase *subject) |
| bool | showSmallIcons (PG_Widget *parent, const SPoint &pos, bool cursorChanged) |
| bool | clearSmallIcons () |
| GuiButton * | getButton (int i) |
| void | disableButtons (int i) |
| disables all button from i onward | |
| bool | ProcessEvent (const SDL_Event *event, bool bModal) |
| ~NewGuiHost () | |
Static Public Member Functions | |
| static void | pushIconHandler (GuiIconHandler *iconHandler) |
| static GuiIconHandler * | getIconHandler () |
| static void | popIconHandler () |
Static Public Attributes | |
| static Command * | pendingCommand |
Protected Types | |
| typedef vector< GuiButton * > | Buttons |
| typedef vector< SmallGuiButton * > | SmallButtons |
Protected Member Functions | |
| bool | mapIconProcessing (const MapCoordinate &pos, const SPoint &mousePos, bool cursorChanged, int button, int prio) |
| SmallGuiButton * | getSmallButton (int i) |
| bool | eventKeyDown (const SDL_KeyboardEvent *key) |
| bool | eventKeyUp (const SDL_KeyboardEvent *key) |
| bool | setNewButtonPressed (int i) |
| when operated by keyboard, set a new button as the pressed one | |
| void | evalCursor () |
Protected Attributes | |
| Buttons | buttons |
| SmallButtons | smallButtons |
Static Protected Attributes | |
| static SmallButtonHolder * | smallButtonHolder |
Definition at line 150 of file guiiconhandler.h.
typedef vector<GuiButton*> NewGuiHost::Buttons [protected] |
Definition at line 165 of file guiiconhandler.h.
typedef vector<SmallGuiButton*> NewGuiHost::SmallButtons [protected] |
Definition at line 168 of file guiiconhandler.h.
| NewGuiHost::NewGuiHost | ( | MainScreenWidget * | parent, | |
| MapDisplayPG * | mapDisplay, | |||
| const PG_Rect & | r | |||
| ) |
Definition at line 260 of file guiiconhandler.cpp.
References clearSmallIcons(), cursorMoved, evalCursor(), eventKeyDown(), eventKeyUp(), MainScreenWidget::lockOptionsChanged, mapIconProcessing(), MapDisplayPG::mouseButtonOnField, GameMap::sigMapDeletion, and updateFieldInfo.
| NewGuiHost::~NewGuiHost | ( | ) |
| bool NewGuiHost::mapIconProcessing | ( | const MapCoordinate & | pos, | |
| const SPoint & | mousePos, | |||
| bool | cursorChanged, | |||
| int | button, | |||
| int | prio | |||
| ) | [protected] |
Definition at line 437 of file guiiconhandler.cpp.
References MapField::a, actmap, MapField::building, fieldvisiblenow(), GameMap::getField(), CGameOptions::Instance(), mainScreenWidget, showSmallIcons(), smallGuiIconSizeX, smallGuiIconSizeY, and MapField::vehicle.
Referenced by NewGuiHost().
| SmallGuiButton * NewGuiHost::getSmallButton | ( | int | i | ) | [protected] |
Definition at line 474 of file guiiconhandler.cpp.
References getButton(), smallButtonHolder, smallButtons, smallGuiIconSizeX, smallGuiIconSizeY, and smallGuiIconSpace.
Referenced by showSmallIcons().
| bool NewGuiHost::eventKeyDown | ( | const SDL_KeyboardEvent * | key | ) | [protected] |
Definition at line 581 of file guiiconhandler.cpp.
References buttons, GuiIconHandler::checkForKey(), getButton(), guiIconColumnNum, MapDisplayPG::keyboadCursorMovement(), and setNewButtonPressed().
Referenced by NewGuiHost().
| bool NewGuiHost::eventKeyUp | ( | const SDL_KeyboardEvent * | key | ) | [protected] |
Definition at line 638 of file guiiconhandler.cpp.
References GuiButton::exec(), getButton(), MapDisplayPG::keyboadCursorMovement(), and setNewButtonPressed().
Referenced by NewGuiHost().
| bool NewGuiHost::setNewButtonPressed | ( | int | i | ) | [protected] |
when operated by keyboard, set a new button as the pressed one
Definition at line 552 of file guiiconhandler.cpp.
References buttons, getButton(), and GuiButton::showInfoText().
Referenced by eventKeyDown(), and eventKeyUp().
| void NewGuiHost::evalCursor | ( | ) | [protected] |
Definition at line 338 of file guiiconhandler.cpp.
References actmap, DashboardPanel::eval(), MapField::getContainer(), GameMap::getCursor(), GameMap::getField(), MapCoordinate::valid(), MapCoordinate::x, GameMap::xsize, MapCoordinate::y, and GameMap::ysize.
Referenced by NewGuiHost().
| void NewGuiHost::pushIconHandler | ( | GuiIconHandler * | iconHandler | ) | [static] |
Definition at line 375 of file guiiconhandler.cpp.
References handler, iconHandlerStack, GuiIconHandler::registerHost(), and updateFieldInfo.
Referenced by CargoDialog::CargoDialog(), GuiFunctions::BuildObject::execute(), GuiFunctions::Attack::execute(), CargoGuiFunctions::Movement::execute(), ReplayGuiIconHandleHandler::ReplayGuiIconHandleHandler(), and ASC_MainScreenWidget::spawnPanel().
| GuiIconHandler * NewGuiHost::getIconHandler | ( | ) | [static] |
Definition at line 388 of file guiiconhandler.cpp.
References handler.
Referenced by ReplayGuiIconHandleHandler::ReplayGuiIconHandleHandler().
| void NewGuiHost::popIconHandler | ( | ) | [static] |
Definition at line 397 of file guiiconhandler.cpp.
References clearSmallIcons(), handler, iconHandlerStack, GuiIconHandler::registerHost(), and updateFieldInfo.
Referenced by GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::AttackGui::execute(), CargoGuiFunctions::Movement::execute(), CargoDialog::~CargoDialog(), and ReplayGuiIconHandleHandler::~ReplayGuiIconHandleHandler().
| void NewGuiHost::eval | ( | const MapCoordinate & | pos, | |
| ContainerBase * | subject | |||
| ) |
| bool NewGuiHost::showSmallIcons | ( | PG_Widget * | parent, | |
| const SPoint & | pos, | |||
| bool | cursorChanged | |||
| ) |
Definition at line 501 of file guiiconhandler.cpp.
References buttons, clearSmallIcons(), getButton(), getSmallButton(), CGameOptions::Instance(), SmallButtonHolder::Lock(), SmallGuiButton::press(), BulkGraphicUpdates::release(), SmallGuiButton::showInfoText(), smallButtonHolder, smallGuiIconSizeX, smallGuiIconSizeY, smallGuiIconSpace, and SmallGuiButton::updateIcon().
Referenced by mapIconProcessing().
| bool NewGuiHost::clearSmallIcons | ( | ) |
Definition at line 686 of file guiiconhandler.cpp.
References smallButtonHolder, and SmallButtonHolder::Unlock().
Referenced by NewGuiHost(), popIconHandler(), showSmallIcons(), and SmallGuiButton::SmallGuiButton().
| GuiButton * NewGuiHost::getButton | ( | int | i | ) |
Definition at line 414 of file guiiconhandler.cpp.
References buttons, guiIconColumnNum, guiIconSizeX, guiIconSizeY, and guiIconSpace.
Referenced by GuiFunctions::ObjectBuildingGui::addButton(), disableButtons(), GuiIconHandler::eval(), GuiFunctions::ObjectBuildingGui::eval(), GuiFunctions::AttackGui::eval(), eventKeyDown(), eventKeyUp(), getSmallButton(), setNewButtonPressed(), and showSmallIcons().
| void NewGuiHost::disableButtons | ( | int | i | ) |
disables all button from i onward
Definition at line 426 of file guiiconhandler.cpp.
References buttons, getButton(), and GuiButton::unregisterFunc().
Referenced by GuiIconHandler::eval(), GuiFunctions::ObjectBuildingGui::eval(), and GuiFunctions::AttackGui::eval().
| bool NewGuiHost::ProcessEvent | ( | const SDL_Event * | event, | |
| bool | bModal | |||
| ) |
Definition at line 488 of file guiiconhandler.cpp.
References SmallButtonHolder::ProcessEvent(), and smallButtonHolder.
Referenced by CargoDialog::ProcessEvent().
Buttons NewGuiHost::buttons [protected] |
Definition at line 166 of file guiiconhandler.h.
Referenced by disableButtons(), eventKeyDown(), getButton(), setNewButtonPressed(), and showSmallIcons().
SmallButtons NewGuiHost::smallButtons [protected] |
SmallButtonHolder * NewGuiHost::smallButtonHolder [static, protected] |
Definition at line 174 of file guiiconhandler.h.
Referenced by clearSmallIcons(), getSmallButton(), ProcessEvent(), and showSmallIcons().
Command * NewGuiHost::pendingCommand [static] |
Definition at line 204 of file guiiconhandler.h.
Referenced by GuiFunctions::ConstructBuilding::available(), GuiFunctions::BuildVehicleCommand::available(), GuiFunctions::RemoveMine::available(), GuiFunctions::PutMineStage2::available(), GuiFunctions::RefuelUnitDialogCommand::available(), GuiFunctions::RefuelUnitCommand::available(), GuiFunctions::RepairUnit::available(), GuiFunctions::JumpDriveIcon::available(), GuiFunctions::DestructBuilding::available(), GuiFunctions::Movement::available(), GuiFunctions::MovementBase::available(), CargoGuiFunctions::CancelMovement::available(), commandPending(), GuiFunctions::ObjectBuildingGui::eval(), GuiFunctions::ConstructBuilding::execute(), GuiFunctions::BuildVehicleCommand::execute(), GuiFunctions::BuildObject::execute(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::RemoveMine::execute(), GuiFunctions::PutMineStage2::execute(), GuiFunctions::PutMine::execute(), GuiFunctions::RefuelUnitDialogCommand::execute(), GuiFunctions::RefuelUnitCommand::execute(), GuiFunctions::RepairUnit::execute(), GuiFunctions::JumpDriveIcon::execute(), GuiFunctions::DestructBuilding::execute(), GuiFunctions::MovementBase::execute(), GuiFunctions::Cancel::execute(), GuiFunctions::AttackGui::execute(), CargoGuiFunctions::Movement::execute(), CargoGuiFunctions::MovementDestination::execute(), GuiFunctions::ConstructBuilding::getName(), GuiFunctions::RepairUnit::getName(), GuiFunctions::AttackGui::getName(), resetActions(), resetActiveGuiAction(), and GuiFunctions::AttackGui::setupWeapons().
1.5.1