1 /*
2     GUILIB:  An example GUI framework library for use with SDL
3 */
4 
5 /* This is a very simple image widget */
6 
7 #ifndef _GUI_image_h
8 #define _GUI_image_h
9 
10 #include "GUI_widget.h"
11 
12 class GUI_Image : public GUI_Widget {
13 
14 public:
15 	/* Passed the position and BMP image file */
16 	GUI_Image(int x, int y, char *file);
17 
18 	/* Passed the position and image surface */
19 	GUI_Image(int x, int y, SDL_Surface *pic, int shouldfree = 0);
20 
21 	virtual ~GUI_Image();
22 
23 	/* Show the widget  */
24 	virtual void Display(void);
25 
26 protected:
27 	/* The display image */
28 	SDL_Surface *image;
29 
30 	/* Whether or not we should free the image when we're done */
31 	int free_image;
32 };
33 
34 #endif /* _GUI_image_h */
35