My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef MAP_COMMON__POLYGON_ITEM_H
#define MAP_COMMON__POLYGON_ITEM_H

#include "IMapRender.h"
#include <Map/MapSerialize.h>

class PolygonItemDisplay;

class PolygonItem : public IMapItem, public Room
{
public:
PolygonItem(IMapRender* render);
virtual ~PolygonItem();

virtual void Render(Draw* w);

virtual bool ProcessLeftDown(Point p, dword keyflags);
virtual bool ProcessLeftUp(Point p, dword keyflags);

virtual void StatePerformed (dword state, const String& param = String());
virtual bool Contains(const Point& p);
virtual Point GetTopLeft();
virtual Point GetCenter();
virtual Rect GetRect();

virtual String GetItemType() { return "PolygonItem"; }

public:
static Callback1<Ptr<PolygonItem> > WhenClick;
PolygonItem* SetDisplay(PolygonItemDisplay* disp);

private:
Point _click;
bool _stdDisplay;
PolygonItemDisplay* _display;
};

class PolygonItemDisplay
{
public:
virtual ~PolygonItemDisplay() {}
virtual void Paint(Draw* w, PolygonItem* item) const;
};

#endif

Change log

r4180 by Sc0rch on Nov 17, 2011   Diff
MapRender: First release
(FormEditorCommon, FormEditorProperties,
Map, MapBG, MapCommon, MapEditor,
MapRenderTest.
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1044 bytes, 45 lines
Powered by Google Project Hosting