Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

label.h

00001 /***************************************************************************
00002                           label.h  -  description
00003                              -------------------
00004     begin                : Thu Aug 28 2003
00005     copyright            : (C) 2003 by Gabor Torok
00006     email                : cctorok@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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 

Generated on Thu Jun 16 21:50:43 2005 for scourge by  doxygen 1.4.0