00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef LABEL_H
00019 #define LABEL_H
00020
00021 #include "../constants.h"
00022 #include "widget.h"
00023 #include <vector>
00024
00025 using namespace std;
00026
00031 class SDLHandler;
00032
00033 class Label : public Widget {
00034 private:
00035 char text[3000];
00036 int lineWidth;
00037 int fontType;
00038 int lineHeight;
00039 vector<string> lines;
00040
00041 public:
00042 Label(int x, int y, char *text=NULL, int lineWidth=0, int fontType=0, int lineHeight=15);
00043 ~Label();
00044 inline int getFontType() { return fontType; }
00045 inline void setFontType( int n ) { fontType = n; }
00046 inline int getLineHeight() { return lineHeight; }
00047 inline void setLineHeight( int n ) { lineHeight = n; }
00048 inline char *getText() { return text; }
00049 void setText(char *s);
00050 void drawWidget(Widget *parent);
00051 inline bool canGetFocus() { return false; }
00052 };
00053
00054 #endif
00055