#include <mapdisplay.h>
Inheritance diagram for MapDisplayPG:

Public Member Functions | |
| void | changeZoom (int delta) |
| void | setNewZoom (int zoom) |
| int | getZoom () const |
| MapCoordinate | screenPos2mapPos (const SPoint &pos) |
| MapCoordinate | widgetPos2mapPos (const SPoint &pos) |
| SPoint | mapGlobalPos2internalPos (const MapCoordinate &pos) |
| SPoint | mapViewPos2internalPos (const MapCoordinate &pos) |
| SPoint | internal2widget (const SPoint &pos) |
| SPoint | widget2screen (const SPoint &pos) |
| MapCoordinate | upperLeftCorner () |
| MapCoordinate | lowerRightCorner () |
| bool | fieldCompletelyInViewX (const MapCoordinate &pos) |
| bool | fieldCompletelyInViewY (const MapCoordinate &pos) |
| bool | fieldCompletelyInView (const MapCoordinate &pos) |
| void | keyboadCursorMovement (bool enable) |
| void | scrollMap (int dir) |
| MapDisplayPG (MainScreenWidget *parent, const PG_Rect r) | |
| void | displayUnitMovement (GameMap *actmap, Vehicle *veh, const MapCoordinate3D &from, const MapCoordinate3D &to) |
| bool | fieldInView (const MapCoordinate &mc) |
| bool | centerOnField (const MapCoordinate &mc) |
| void | registerAdditionalUnit (Vehicle *veh) |
| void | updateMap (bool force=false) |
| repaints to the internal surface, but does not blit this surface the screen | |
| void | updateWidget () |
| update the internal surface and blits it to the screen | |
| void | addMapLayer (MapLayer *layer, const ASCString &name) |
| void | activateMapLayer (const ASCString &name, bool active) |
| void | toggleMapLayer (const ASCString &name) |
| bool | layerActive (const ASCString &name) |
| void | getActiveLayers (vector< ASCString > &list) |
| int | setSignalPriority (int priority) |
| ~MapDisplayPG () | |
Public Attributes | |
| SigC::Signal1< void, int > | newZoom |
| SigC::Signal2< void, bool, const ASCString & > | layerChanged |
| SigC::Signal5< bool, const MapCoordinate &, const SPoint &, bool, int, int > | mouseButtonOnField |
| Signal that is fired when the mouse is pressed on a valid field, after the cursor evaluation has been run. | |
| SigC::Signal4< bool, const MapCoordinate &, const SPoint &, bool, int > | mouseDraggedToField |
| Signal that is fired when the mouse is dragged onto a new field with mouse buttons pressed. | |
| MapDisplayPG::Cursor | cursor |
Protected Member Functions | |
| void | eventBlit (SDL_Surface *srf, const PG_Rect &src, const PG_Rect &dst) |
| overridable eventhandler to blit the widget contents to the screen | |
| bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| bool | eventMouseMotion (const SDL_MouseMotionEvent *button) |
| Overridable Eventhandler for a SDL_MouseMotionEvent message. | |
| bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| void | checkViewPosition (MapCoordinate &pos) |
| void | fillSurface (int playerView) |
| void | paintBackground () |
| void | blitInternalSurface (SDL_Surface *dest, const SPoint &pnt, const PG_Rect &dstClip) |
| void | displayAddons (Surface &surf, int pass) |
| void | initMovementStructure () |
| Surface | createMovementBufferSurface () |
| void | displayMovementStep (Movement &movement, int percentage) |
| bool | eventKeyDown (const SDL_KeyboardEvent *key) |
| Overridable Eventhandler for a SDL_KeyboardEvent message. | |
| bool | keyboardHandler (const SDL_KeyboardEvent *keyEvent) |
Protected Attributes | |
| MapDisplayPG::MovementMask | movementMask [sidenum] |
| bool | disableKeyboardCursorMovement |
Static Protected Attributes | |
| static const int | effectiveMovementSurfaceWidth = 4 * fielddisthalfx + fieldsizex |
| static const int | effectiveMovementSurfaceHeight = 4*fieldsizey |
Friends | |
| class | CursorHiding |
| class | LockDisplay |
Classes | |
| struct | Cursor |
| class | CursorHiding |
| struct | Field |
| struct | Icons |
| class | LockDisplay |
| struct | Movement |
| struct | MovementMask |
|
||||||||||||
|
|
Definition at line 572 of file mapdisplay.cpp. |
|
||||||||||||
|
Definition at line 1616 of file mapdisplay.cpp. References layerChanged. Referenced by MainScreenWidget::activateMapLayer(), and ASC_MainScreenWidget::ASC_MainScreenWidget(). |
|
||||||||||||
|
Definition at line 1609 of file mapdisplay.cpp. References MapRenderer::addMapLayer(), and MapLayer::setActive(). Referenced by ASC_MainScreenWidget::ASC_MainScreenWidget(), and MapDisplayPG(). |
|
||||||||||||||||
|
|
Definition at line 848 of file mapdisplay.cpp. References actmap, checkViewPosition(), PG_Widget::Redraw(), MapCoordinate::valid(), viewChanged, MapCoordinate::x, GameMap::xsize, MapCoordinate::y, and GameMap::ysize. Referenced by PG_MapDisplay::displayPosition(), eventMouseButtonDown(), MapDisplayPG::Cursor::goTo(), Weathercast::mouseClick(), and OverviewMapPanel::mouseClick(). |
|
|
Definition at line 186 of file mapdisplay.h. References getZoom(), and setNewZoom(). Referenced by eventMouseButtonDown(). |
|
|
Definition at line 648 of file mapdisplay.cpp. References actmap, max(), MapCoordinate::x, GameMap::xsize, MapCoordinate::y, and GameMap::ysize. Referenced by centerOnField(), eventMouseButtonDown(), fillSurface(), and scrollMap(). |
|
|
Definition at line 1024 of file mapdisplay.cpp. References colorDepth, Surface::createSurface(), effectiveMovementSurfaceHeight, effectiveMovementSurfaceWidth, and MapRenderer::surfaceBorder. Referenced by initMovementStructure(). |
|
||||||||||||
|
Definition at line 1388 of file mapdisplay.cpp. References MapRenderer::bitmappedHeight2pass(), ContainerBase::calcShadowDist(), chsatellit, fieldsizex, fieldsizey, Vehicle::getPosition(), Vehicle::height, log2(), mapViewPos2internalPos(), and Vehicle::paint(). Referenced by MapDisplayPG(). |
|
||||||||||||
|
||||||||||||||||||||
|
||||||||||||||||
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_Widget. Definition at line 769 of file mapdisplay.cpp. References blitInternalSurface(), PG_Widget::ClientToScreen(), cursor, PG_Widget::eventBlit(), PG_Application::GetScreen(), PG_Widget::GetWidgetSurface(), MapDisplayPG::Cursor::invisible, updateMap(), PG_Point::x, and PG_Point::y. |
|
|
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.
Reimplemented from PG_MessageObject. Definition at line 252 of file mapdisplay.h. References keyboardHandler(). |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 893 of file mapdisplay.cpp. References actmap, centerOnField(), changeZoom(), checkViewPosition(), cursor, filterQueuedZoomEvents(), CGameOptions::Instance(), MapDisplayPG::Cursor::invisible, mouseButtonOnField, MapDisplayPG::Cursor::pos(), repaintMap, screenPos2mapPos(), updateFieldInfo, MapCoordinate::valid(), viewChanged, MapCoordinate::x, GameMap::xsize, MapCoordinate::y, and GameMap::ysize. |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 981 of file mapdisplay.cpp. |
|
|
Overridable Eventhandler for a SDL_MouseMotionEvent message. This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 955 of file mapdisplay.cpp. References actmap, cursor, cursorMoved, CGameOptions::Instance(), MapDisplayPG::Cursor::invisible, mouseDraggedToField, MapDisplayPG::Cursor::pos(), screenPos2mapPos(), MapCoordinate::valid(), MapCoordinate::x, GameMap::xsize, MapCoordinate::y, and GameMap::ysize. |
|
|
Definition at line 1003 of file mapdisplay.cpp. References fieldsizex, fieldsizey, internal2widget(), mapGlobalPos2internalPos(), PG_Rect::my_height, PG_Rect::my_width, PG_Rect::my_xpos, PG_Rect::my_ypos, s2, and widget2screen(). Referenced by fieldInView(). |
|
|
Definition at line 987 of file mapdisplay.cpp. References fieldsizex, fieldsizey, internal2widget(), mapGlobalPos2internalPos(), PG_Rect::my_width, PG_Rect::my_xpos, s2, and widget2screen(). |
|
|
Definition at line 995 of file mapdisplay.cpp. References fieldsizex, fieldsizey, internal2widget(), mapGlobalPos2internalPos(), PG_Rect::my_height, PG_Rect::my_ypos, s2, and widget2screen(). |
|
|
Definition at line 1014 of file mapdisplay.cpp. References fieldCompletelyInView(), MapCoordinate::x, and MapCoordinate::y. Referenced by PG_MapDisplay::displayPosition(), displayUnitMovement(), and MapDisplayPG::Cursor::goTo(). |
|
|
Definition at line 628 of file mapdisplay.cpp. References actmap, checkViewPosition(), paintBackground(), and MapRenderer::paintTerrain(). Referenced by updateMap(). |
|
|
Definition at line 1644 of file mapdisplay.cpp. |
|
|
Definition at line 188 of file mapdisplay.h. Referenced by changeZoom(), and MapInfoPanel::MapInfoPanel(). |
|
|
Definition at line 1032 of file mapdisplay.cpp. References createMovementBufferSurface(), fieldsizex, fieldsizey, MapRenderer::getFieldPos2(), getNeighbouringFieldCoordinate(), MapDisplayPG::MovementMask::mask, movementMask, sidenum, and MapDisplayPG::MovementMask::startFieldPos. Referenced by displayUnitMovement(). |
|
|
Definition at line 799 of file mapdisplay.cpp. References MapRenderer::surfaceBorder. Referenced by displayUnitMovement(), fieldCompletelyInView(), fieldCompletelyInViewX(), and fieldCompletelyInViewY(). |
|
|
Definition at line 262 of file mapdisplay.h. References disableKeyboardCursorMovement. Referenced by NewGuiHost::eventKeyDown(), and NewGuiHost::eventKeyUp(). |
|
|
Definition at line 1547 of file mapdisplay.cpp. References actmap, and disableKeyboardCursorMovement. Referenced by eventKeyDown(), and MapDisplayPG(). |
|
|
Definition at line 1634 of file mapdisplay.cpp. Referenced by MapInfoPanel::MapInfoPanel(). |
|
|
Definition at line 842 of file mapdisplay.cpp. References MapCoordinate::x, and MapCoordinate::y. Referenced by Weathercast::painter(), and OverviewMapPanel::painter(). |
|
|
Definition at line 788 of file mapdisplay.cpp. References MapRenderer::getFieldPos(), MapCoordinate::x, and MapCoordinate::y. Referenced by displayUnitMovement(), fieldCompletelyInView(), fieldCompletelyInViewX(), and fieldCompletelyInViewY(). |
|
|
Definition at line 793 of file mapdisplay.cpp. References MapRenderer::getFieldPos(), MapCoordinate::x, and MapCoordinate::y. Referenced by displayAddons(). |
|
|
Definition at line 640 of file mapdisplay.cpp. References MapRenderer::paintBackground(). Referenced by fillSurface(). |
|
|
Definition at line 1604 of file mapdisplay.cpp. Referenced by PG_MapDisplay::displayMap(). |
|
|
Definition at line 811 of file mapdisplay.cpp. References PG_Rect::Height(), PG_Widget::ScreenToClient(), widgetPos2mapPos(), PG_Rect::Width(), PG_Point::x, and PG_Point::y. Referenced by eventMouseButtonDown(), and eventMouseMotion(). |
|
|
Definition at line 1409 of file mapdisplay.cpp. References actmap, checkViewPosition(), PG_Widget::Update(), viewChanged, MapCoordinate::x, and MapCoordinate::y. Referenced by MainScreenWidget::mouseScrollChecker(). |
|
|
Definition at line 593 of file mapdisplay.cpp. References colorDepth, Surface::createSurface(), fielddistx, fielddisty, fieldysize, PG_Rect::Height(), CGameOptions::Instance(), newZoom, MapRenderer::surfaceBorder, and PG_Rect::Width(). Referenced by changeZoom(), and MapDisplayPG(). |
|
|
Definition at line 879 of file mapdisplay.cpp. Referenced by SelectFromMap::SelectFromMap(), and SelectFromMap::~SelectFromMap(). |
|
|
Definition at line 1625 of file mapdisplay.cpp. References layerChanged. Referenced by MainScreenWidget::toggleMapLayer(). |
|
|
repaints to the internal surface, but does not blit this surface the screen
Definition at line 675 of file mapdisplay.cpp. References actmap, fillSurface(), and GameMap::getPlayerView(). Referenced by eventBlit(), and updateWidget(). |
|
|
update the internal surface and blits it to the screen
Definition at line 684 of file mapdisplay.cpp. References PG_Widget::Update(), and updateMap(). Referenced by MapDisplayPG(). |
|
|
Definition at line 837 of file mapdisplay.cpp. Referenced by Weathercast::painter(), OverviewMapPanel::painter(), and MapSwitcher::toggle(). |
|
|
Definition at line 804 of file mapdisplay.cpp. References PG_Widget::ClientToScreen(), PG_Point::x, and PG_Point::y. Referenced by displayMovementStep(), displayUnitMovement(), fieldCompletelyInView(), fieldCompletelyInViewX(), and fieldCompletelyInViewY(). |
|
|
Definition at line 820 of file mapdisplay.cpp. References fieldsizey, MapRenderer::getFieldPosX(), MapRenderer::getFieldPosY(), MapRenderer::surfaceBorder, MapCoordinate::x, and MapCoordinate::y. Referenced by screenPos2mapPos(). |
|
|
Definition at line 340 of file mapdisplay.h. |
|
|
Definition at line 351 of file mapdisplay.h. |
|
|
|
Definition at line 259 of file mapdisplay.h. Referenced by keyboadCursorMovement(), and keyboardHandler(). |
|
|
Definition at line 215 of file mapdisplay.h. Referenced by createMovementBufferSurface(). |
|
|
Definition at line 214 of file mapdisplay.h. Referenced by createMovementBufferSurface(). |
|
|
Definition at line 294 of file mapdisplay.h. Referenced by activateMapLayer(), ASC_MainScreenWidget::ASC_MainScreenWidget(), MapInfoPanel::MapInfoPanel(), and toggleMapLayer(). |
|
|
Signal that is fired when the mouse is pressed on a valid field, after the cursor evaluation has been run.
Definition at line 310 of file mapdisplay.h. Referenced by eventMouseButtonDown(), Maped_MainScreenWidget::Maped_MainScreenWidget(), NewGuiHost::NewGuiHost(), and SelectFromMap::SelectFromMap(). |
|
|
Signal that is fired when the mouse is dragged onto a new field with mouse buttons pressed.
Definition at line 318 of file mapdisplay.h. Referenced by eventMouseMotion(), and Maped_MainScreenWidget::Maped_MainScreenWidget(). |
|
|
Referenced by displayUnitMovement(), and initMovementStructure(). |
|
|
Definition at line 188 of file mapdisplay.h. Referenced by MapInfoPanel::MapInfoPanel(), and setNewZoom(). |
1.4.2