summaryrefslogtreecommitdiffstats
path: root/src/View/MapView.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/View/MapView.h')
-rw-r--r--src/View/MapView.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/View/MapView.h b/src/View/MapView.h
index 2fb0df4..e34cae5 100644
--- a/src/View/MapView.h
+++ b/src/View/MapView.h
@@ -21,6 +21,7 @@
#define ZOOMEDIT_VIEW_MAPVIEW_H_
#include "View.h"
+#include <sigc++/connection.h>
namespace ZoomEdit {
@@ -34,29 +35,33 @@ class TopView;
class MapView : public View {
private:
- Data::Level *level;
+ sigc::connection mainViewUpdate;
- Gui::RenderArea *mainArea;
+ float viewWidth, viewHeight;
+
+ TopView *mainView;
float scale, xCenter, yCenter;
void getBounds(float *minX, float *maxX, float *minY, float *maxY);
public:
- MapView(Gui::RenderArea *mainArea0 = 0, Data::Level *level0 = 0)
- : level(level0), mainArea(mainArea0), scale(1), xCenter(0), yCenter(0) {}
+ MapView(TopView *mainView0 = 0)
+ : mainView(0), scale(1), xCenter(0), yCenter(0) {
+ setMainView(mainView0);
+ }
- Data::Level* getLevel() {return level;}
- void setLevel(Data::Level *level0) {level = level0;}
+ TopView* getMainView() {return mainView;}
+ void setMainView(TopView *mainView0);
- Gui::RenderArea* getMainArea() {return mainArea;}
- void setMainArea(Gui::RenderArea *mainArea0) {mainArea = mainArea0;}
+ virtual void init();
+ virtual void resize(float width, float height);
- virtual void zoom(Gui::RenderArea*, int zoom, float, float);
- virtual void move(Gui::RenderArea*, float x, float y, unsigned int state);
- virtual void click(Gui::RenderArea *renderArea, float x, float y);
+ virtual void render();
- virtual void render(Gui::RenderArea *renderArea);
+ virtual void zoom(int zoom, float, float);
+ virtual void move(float x, float y, unsigned int state);
+ virtual void click(float x, float y);
};
}