OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MWGui::MapWindow Class Reference

#include <mapwindow.hpp>

Inheritance diagram for MWGui::MapWindow:
Collaboration diagram for MWGui::MapWindow:

Public Member Functions

 MapWindow (CustomMarkerCollection &customMarkers, DragAndDrop *drag, MWRender::LocalMap *localMapRender)
 
virtual ~MapWindow ()
 
void setCellName (const std::string &cellName)
 
virtual void setAlpha (float alpha)
 
void renderGlobalMap (Loading::Listener *loadingListener)
 
void addVisitedLocation (const std::string &name, int x, int y)
 
void cellExplored (int x, int y)
 
void setGlobalMapPlayerPosition (float worldX, float worldY)
 
void setGlobalMapPlayerDir (const float x, const float y)
 
virtual void open ()
 Notify that window has been made visible. More...
 
void onFrame (float dt)
 
virtual void updateCustomMarkers ()
 
void clear ()
 Clear all savegame-specific data. More...
 
void write (ESM::ESMWriter &writer, Loading::Listener &progress)
 
void readRecord (ESM::ESMReader &reader, uint32_t type)
 
- Public Member Functions inherited from MWGui::WindowPinnableBase
 WindowPinnableBase (const std::string &parLayout)
 
bool pinned ()
 
void setPinned (bool pinned)
 
void setPinButtonVisible (bool visible)
 
- Public Member Functions inherited from MWGui::WindowBase
 WindowBase (const std::string &parLayout)
 
virtual void close ()
 Notify that window has been hidden. More...
 
virtual void exit ()
 Gracefully exits the window. More...
 
virtual void setVisible (bool visible)
 Sets the visibility of the window. More...
 
bool isVisible ()
 Returns the visibility state of the window. More...
 
void center ()
 
- Public Member Functions inherited from MWGui::Layout
 Layout (const std::string &_layout, MyGUI::Widget *_parent=nullptr)
 
virtual ~Layout ()
 
MyGUI::Widget * getWidget (const std::string &_name)
 
template<typename T >
void getWidget (T *&_widget, const std::string &_name)
 
void setCoord (int x, int y, int w, int h)
 
void setText (const std::string &name, const std::string &caption)
 
void setTitle (const std::string &title)
 
- Public Member Functions inherited from MWGui::LocalMapBase
 LocalMapBase (CustomMarkerCollection &markers, MWRender::LocalMap *localMapRender, bool fogOfWarEnabled=true)
 
virtual ~LocalMapBase ()
 
void init (MyGUI::ScrollView *widget, MyGUI::ImageBox *compass, int mapWidgetSize, int cellDistance)
 
void setCellPrefix (const std::string &prefix)
 
void setActiveCell (const int x, const int y, bool interior=false)
 
void requestMapRender (const MWWorld::CellStore *cell)
 
void setPlayerDir (const float x, const float y)
 
void setPlayerPos (int cellX, int cellY, const float nx, const float ny)
 
void onFrame (float dt)
 
bool toggleFogOfWar ()
 
- Public Member Functions inherited from MWGui::NoDrop
 NoDrop (DragAndDrop *drag, MyGUI::Widget *widget)
 
void onFrame (float dt)
 

Private Types

typedef std::pair< int, intCellId
 

Private Member Functions

void onDragStart (MyGUI::Widget *_sender, int _left, int _top, MyGUI::MouseButton _id)
 
void onMouseDrag (MyGUI::Widget *_sender, int _left, int _top, MyGUI::MouseButton _id)
 
void onWorldButtonClicked (MyGUI::Widget *_sender)
 
void onMapDoubleClicked (MyGUI::Widget *sender)
 
void onCustomMarkerDoubleClicked (MyGUI::Widget *sender)
 
void onNoteEditOk ()
 
void onNoteEditDelete ()
 
void onNoteEditDeleteConfirm ()
 
void onNoteDoubleClicked (MyGUI::Widget *sender)
 
void onChangeScrollWindowCoord (MyGUI::Widget *sender)
 
void globalMapUpdatePlayer ()
 
void setGlobalMapMarkerTooltip (MyGUI::Widget *widget, int x, int y)
 
virtual void onPinToggled ()
 
virtual void onTitleDoubleClicked ()
 
virtual void doorMarkerCreated (MyGUI::Widget *marker)
 
virtual void customMarkerCreated (MyGUI::Widget *marker)
 
virtual void notifyPlayerUpdate ()
 

Private Attributes

MyGUI::ScrollView * mGlobalMap
 
std::auto_ptr< MyGUI::ITexture > mGlobalMapTexture
 
std::auto_ptr< MyGUI::ITexture > mGlobalMapOverlayTexture
 
MyGUI::ImageBox * mGlobalMapImage
 
MyGUI::ImageBox * mGlobalMapOverlay
 
MyGUI::ImageBox * mPlayerArrowLocal
 
MyGUI::ImageBox * mPlayerArrowGlobal
 
MyGUI::Button * mButton
 
MyGUI::IntPoint mLastDragPos
 
bool mGlobal
 
MyGUI::IntCoord mLastScrollWindowCoordinates
 
std::set< CellIdmMarkers
 
std::vector< CellIdmQueuedToExplore
 
MyGUI::Button * mEventBoxGlobal
 
MyGUI::Button * mEventBoxLocal
 
MWRender::GlobalMapmGlobalMapRender
 
std::map< std::pair< int, int >
, MyGUI::Widget * > 
mGlobalMapMarkers
 
EditNoteDialog mEditNoteDialog
 
ESM::CustomMarker mEditingMarker
 

Additional Inherited Members

- Public Types inherited from MWGui::WindowBase
typedef
MyGUI::delegates::CMultiDelegate1
< WindowBase * > 
EventHandle_WindowBase
 
- Public Attributes inherited from MWGui::Layout
MyGUI::Widget * mMainWidget
 
- Protected Types inherited from MWGui::LocalMapBase
typedef std::vector
< boost::shared_ptr
< MyGUI::ITexture > > 
TextureVector
 
- Protected Member Functions inherited from MWGui::LocalMapBase
void applyFogOfWar ()
 
MyGUI::IntPoint getMarkerPosition (float worldX, float worldY, MarkerUserData &markerPos)
 
virtual void notifyMapChanged ()
 
void updateMagicMarkers ()
 
void addDetectionMarkers (int type)
 
void redraw ()
 
- Protected Attributes inherited from MWGui::WindowPinnableBase
MyGUI::Widget * mPinButton
 
bool mPinned
 
- Protected Attributes inherited from MWGui::Layout
std::string mPrefix
 
std::string mLayoutName
 
MyGUI::VectorWidgetPtr mListWindowRoot
 
- Protected Attributes inherited from MWGui::LocalMapBase
MWRender::LocalMapmLocalMapRender
 
int mCurX
 
int mCurY
 
bool mInterior
 
MyGUI::ScrollView * mLocalMap
 
MyGUI::ImageBox * mCompass
 
std::string mPrefix
 
bool mChanged
 
bool mFogOfWarToggled
 
bool mFogOfWarEnabled
 
int mMapWidgetSize
 
int mNumCells
 
int mCellDistance
 
CustomMarkerCollectionmCustomMarkers
 
std::vector< MyGUI::ImageBox * > mMapWidgets
 
std::vector< MyGUI::ImageBox * > mFogWidgets
 
TextureVector mMapTextures
 
TextureVector mFogTextures
 
std::vector< MyGUI::Widget * > mDoorMarkerWidgets
 
std::vector< MyGUI::Widget * > mMagicMarkerWidgets
 
std::vector< MyGUI::Widget * > mCustomMarkerWidgets
 
float mMarkerUpdateTimer
 
float mLastDirectionX
 
float mLastDirectionY
 

Member Typedef Documentation

typedef std::pair<int, int> MWGui::MapWindow::CellId
private

Constructor & Destructor Documentation

MWGui::MapWindow::MapWindow ( CustomMarkerCollection customMarkers,
DragAndDrop drag,
MWRender::LocalMap localMapRender 
)

Here is the call graph for this function:

MWGui::MapWindow::~MapWindow ( )
virtual

Member Function Documentation

void MWGui::MapWindow::addVisitedLocation ( const std::string &  name,
int  x,
int  y 
)

adds the marker to the global map

Parameters
nameThe ESM::Cell::mName

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::cellExplored ( int  x,
int  y 
)

Here is the caller graph for this function:

void MWGui::MapWindow::clear ( )

Clear all savegame-specific data.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::customMarkerCreated ( MyGUI::Widget *  marker)
privatevirtual

Reimplemented from MWGui::LocalMapBase.

Here is the call graph for this function:

void MWGui::MapWindow::doorMarkerCreated ( MyGUI::Widget *  marker)
privatevirtual

Reimplemented from MWGui::LocalMapBase.

Here is the call graph for this function:

void MWGui::MapWindow::globalMapUpdatePlayer ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::notifyPlayerUpdate ( )
privatevirtual

Reimplemented from MWGui::LocalMapBase.

Here is the call graph for this function:

void MWGui::MapWindow::onChangeScrollWindowCoord ( MyGUI::Widget *  sender)
private

Here is the caller graph for this function:

void MWGui::MapWindow::onCustomMarkerDoubleClicked ( MyGUI::Widget *  sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::onDragStart ( MyGUI::Widget *  _sender,
int  _left,
int  _top,
MyGUI::MouseButton  _id 
)
private

Here is the caller graph for this function:

void MWGui::MapWindow::onFrame ( float  dt)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::onMapDoubleClicked ( MyGUI::Widget *  sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::onMouseDrag ( MyGUI::Widget *  _sender,
int  _left,
int  _top,
MyGUI::MouseButton  _id 
)
private

Here is the caller graph for this function:

void MWGui::MapWindow::onNoteDoubleClicked ( MyGUI::Widget *  sender)
private
void MWGui::MapWindow::onNoteEditDelete ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::onNoteEditDeleteConfirm ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::onNoteEditOk ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::onPinToggled ( )
privatevirtual

Implements MWGui::WindowPinnableBase.

Here is the call graph for this function:

void MWGui::MapWindow::onTitleDoubleClicked ( )
privatevirtual

Implements MWGui::WindowPinnableBase.

Here is the call graph for this function:

void MWGui::MapWindow::onWorldButtonClicked ( MyGUI::Widget *  _sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::open ( )
virtual

Notify that window has been made visible.

Reimplemented from MWGui::WindowBase.

Here is the call graph for this function:

void MWGui::MapWindow::readRecord ( ESM::ESMReader reader,
uint32_t  type 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::renderGlobalMap ( Loading::Listener loadingListener)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::setAlpha ( float  alpha)
virtual

Reimplemented from MWGui::NoDrop.

Here is the call graph for this function:

void MWGui::MapWindow::setCellName ( const std::string &  cellName)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::setGlobalMapMarkerTooltip ( MyGUI::Widget *  widget,
int  x,
int  y 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::setGlobalMapPlayerDir ( const float  x,
const float  y 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::setGlobalMapPlayerPosition ( float  worldX,
float  worldY 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::MapWindow::updateCustomMarkers ( )
virtual

Reimplemented from MWGui::LocalMapBase.

Here is the call graph for this function:

void MWGui::MapWindow::write ( ESM::ESMWriter writer,
Loading::Listener progress 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

MyGUI::Button* MWGui::MapWindow::mButton
private
ESM::CustomMarker MWGui::MapWindow::mEditingMarker
private
EditNoteDialog MWGui::MapWindow::mEditNoteDialog
private
MyGUI::Button* MWGui::MapWindow::mEventBoxGlobal
private
MyGUI::Button* MWGui::MapWindow::mEventBoxLocal
private
bool MWGui::MapWindow::mGlobal
private
MyGUI::ScrollView* MWGui::MapWindow::mGlobalMap
private
MyGUI::ImageBox* MWGui::MapWindow::mGlobalMapImage
private
std::map<std::pair<int, int>, MyGUI::Widget*> MWGui::MapWindow::mGlobalMapMarkers
private
MyGUI::ImageBox* MWGui::MapWindow::mGlobalMapOverlay
private
std::auto_ptr<MyGUI::ITexture> MWGui::MapWindow::mGlobalMapOverlayTexture
private
MWRender::GlobalMap* MWGui::MapWindow::mGlobalMapRender
private
std::auto_ptr<MyGUI::ITexture> MWGui::MapWindow::mGlobalMapTexture
private
MyGUI::IntPoint MWGui::MapWindow::mLastDragPos
private
MyGUI::IntCoord MWGui::MapWindow::mLastScrollWindowCoordinates
private
std::set<CellId> MWGui::MapWindow::mMarkers
private
MyGUI::ImageBox* MWGui::MapWindow::mPlayerArrowGlobal
private
MyGUI::ImageBox* MWGui::MapWindow::mPlayerArrowLocal
private
std::vector<CellId> MWGui::MapWindow::mQueuedToExplore
private

The documentation for this class was generated from the following files: