00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef LABEL_H
00018 # define LABEL_H
00019
00020 # include "Global.hh"
00021 # include "GuiError.hh"
00022 # include "Colors.hh"
00023 # include "Widget.hh"
00024 # include <SDL_gfxPrimitives.h>
00025
00029 class Label: public Widget
00030 {
00031 protected:
00032 TTF_Font* font;
00033 string txt;
00034 SDL_Color fgColor;
00035 SDL_Color bgColor;
00036
00037 public:
00038 Label(const uint x, const uint y, SDL_Surface * screen, Widget * father, const string txt = "");
00039 Label(SDL_Surface * screen, Widget * father, const string txt = "");
00040 ~Label();
00041
00042
00043 void draw();
00044 void refresh();
00045
00046
00047 void mousemotion(const uint mousex, const uint mousey){};
00048
00049
00050 void set_txt(const string txt);
00051 string get_txt();
00052
00053
00054
00059 void setbgColor(SDL_Color bgColor);
00060
00064 SDL_Color getbgColor()
00065 {
00066 return(bgColor);
00067 }
00068
00072 void setfgColor(SDL_Color fgColor);
00073
00077 SDL_Color getfgColor()
00078 {
00079 return(fgColor);
00080 }
00081 };
00082
00083 #endif