1 /* 2 GUILIB: An example GUI framework library for use with SDL 3 */ 4 5 /* This is a simple colored area widget -- rectangular or round */ 6 7 #ifndef _GUI_area_h 8 #define _GUI_area_h 9 10 #include "GUI_widget.h" 11 12 #define AREA_ROUND 1 13 #define AREA_ANGULAR 2 14 15 class GUI_Area : public GUI_Widget { 16 17 public: 18 /* Passed the area, color and shape */ 19 GUI_Area(int x, int y, int w, int h, Uint8 r, Uint8 g, Uint8 b, int aShape = AREA_ANGULAR); 20 21 /* Passed the area, color, frame color, frame thickness and shape */ 22 GUI_Area(int x, int y, int w, int h, Uint8 r, Uint8 g, Uint8 b, 23 Uint8 fr, Uint8 fg, Uint8 fb, int fthick, int aShape = AREA_ANGULAR); 24 25 /* Map the color to the display */ 26 virtual void SetDisplay(SDL_Surface *display); 27 28 /* Show the widget */ 29 virtual void Display(void); 30 31 protected: 32 Uint8 R, G, B; 33 Uint32 color; 34 35 /* flag */ 36 int useFrame; 37 38 /* frame color values */ 39 Uint8 fR,fG,fB; 40 Uint32 frameColor; 41 42 /* remember me */ 43 int frameThickness; 44 int shape; 45 }; 46 47 #endif /* _GUI_area_h */ 48