src/graphic/text_list.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *  Wormux is a convivial mass murder game.
00003  *  Copyright (C) 2001-2004 Lawrence Azzoug.
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00018  ******************************************************************************
00019  * List of Text Clases. 
00020  * TextBox is not valid while playing game.
00021  * Text does not allow \n and similar chars
00022  *****************************************************************************/
00023 
00024 #ifndef TEXT_LIST_H
00025 #define TEXT_LIST_H
00026 
00027 #include "text.h"
00028 #include <list>
00029 
00030 class TextList{
00031  public:
00032   std::list<Text*> list;
00033   typedef std::list<Text*>::iterator iterator;
00034   
00035  public:
00036   // Constructors
00037   TextList();
00038   ~TextList();
00039 
00040   // Manage items in list
00041   void AddText(const std::string &txt, uint maxlines);
00042   void DeleteLine();
00043   void Clear();
00044   int Size();
00045   void Draw(int x, int y, int height);
00046   void DrawLine(Text* newline, int x, int y, int height);
00047 
00048 };
00049 
00050 #endif

Generated on Mon Jan 1 13:10:56 2007 for Wormux by  doxygen 1.4.7