1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
vcmi/client/mapRenderer/MapView.h
2023-03-05 17:48:02 +02:00

39 lines
1.0 KiB
C++

/*
* MapView.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "../gui/CIntObject.h"
class Canvas;
class MapViewController;
class MapViewModel;
class MapViewCache;
/// Main map rendering class that mostly acts as container for component classes
class MapView : public CIntObject
{
std::shared_ptr<MapViewModel> model;
std::unique_ptr<MapViewCache> tilesCache;
std::shared_ptr<MapViewController> controller;
std::shared_ptr<MapViewModel> createModel(const Point & dimensions) const;
void render(Canvas & target, bool fullUpdate);
public:
std::shared_ptr<const MapViewModel> getModel() const;
std::shared_ptr<MapViewController> getController();
MapView(const Point & offset, const Point & dimensions);
~MapView() override;
void show(SDL_Surface * to) override;
void showAll(SDL_Surface * to) override;
};