1 #ifndef GUI_BUILDING_H
2 #define GUI_BUILDING_H
3 
4 
5 #include "gui_component.h"
6 #include "gui_action_creator.h"
7 #include "../../tpl/vector_tpl.h"
8 
9 class building_desc_t;
10 class gui_image_t;
11 
12 /**
13  * Component to draw a multi-tile building
14  */
15 class gui_building_t : public gui_component_t, public gui_action_creator_t
16 {
17 	const building_desc_t* desc;
18 	int layout;
19 	vector_tpl<gui_image_t*> images;
20 	// bounding box of images
21 	scr_coord tl, br;
22 public:
23 	gui_building_t(const building_desc_t* d=NULL, int r=0);
24 
25 	~gui_building_t();
26 
27 	void init(const building_desc_t* d, int r);
28 
29 	scr_size get_min_size() const OVERRIDE;
30 
get_max_size()31 	scr_size get_max_size() const OVERRIDE { return get_min_size(); }
32 
33 	void draw(scr_coord offset) OVERRIDE;
34 
35 	bool infowin_event(const event_t *ev) OVERRIDE;
36 };
37 
38 #endif
39