00001 #ifndef BCTITLE_H
00002 #define BCTITLE_H
00003
00004 #include "bcsubwindow.h"
00005 #include "colors.h"
00006 #include "fonts.h"
00007
00008 class BC_Title : public BC_SubWindow
00009 {
00010 public:
00011 BC_Title(int x,
00012 int y,
00013 char *text,
00014 int font = MEDIUMFONT,
00015 int color = -1,
00016 int centered = 0,
00017 int fixed_w = 0);
00018 virtual ~BC_Title();
00019
00020 int initialize();
00021 static int calculate_w(BC_WindowBase *gui, char *text, int font = MEDIUMFONT);
00022 static int calculate_h(BC_WindowBase *gui, char *text, int font = MEDIUMFONT);
00023 int resize(int w, int h);
00024 int reposition(int x, int y);
00025 int set_color(int color);
00026 int update(char *text);
00027 void update(float value);
00028 char* get_text();
00029
00030 private:
00031 int draw();
00032 static void get_size(BC_WindowBase *gui, int font, char *text, int fixed_w, int &w, int &h);
00033
00034 char text[BCTEXTLEN];
00035 int color;
00036 int font;
00037 int centered;
00038
00039 int fixed_w;
00040 };
00041
00042 #endif