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

conversationgui.h

00001 /***************************************************************************
00002                           conversationgui.h  -  description
00003                              -------------------
00004     begin                : Sat May 3 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 CONVERSATION_GUI_H
00019 #define CONVERSATION_GUI_H
00020 
00021 #include <iostream>
00022 #include <string>
00023 #include <map>
00024 #include "constants.h"
00025 #include "scourge.h"
00026 #include "item.h"
00027 #include "creature.h"
00028 #include "gui/window.h"
00029 #include "gui/widget.h"
00030 #include "gui/button.h"
00031 #include "gui/canvas.h"
00032 #include "gui/widgetview.h"
00033 #include "gui/scrollinglabel.h"
00034 
00035 class ConversationGui : public WordClickedHandler, WidgetView {
00036 
00037  private:
00038   Scourge *scourge;
00039   Creature *creature;
00040   Window *win;
00041   bool useCreature;
00042   Label *label;
00043   ScrollingLabel *answer;
00044   Button *closeButton;
00045   ScrollingList *list;
00046   char **words;
00047   int wordCount;
00048   static const int MAX_WORDS = 1000;
00049   TextField *entry;
00050   Canvas *canvas;
00051   
00052  public:
00053   ConversationGui(Scourge *scourge);
00054   ~ConversationGui();
00055 
00056   bool handleEvent(Widget *widget, SDL_Event *event);
00057 
00058   inline Creature *getCreature() { return creature; }
00059   void start(Creature *creature);
00060   void start(Creature *creature, char *message, bool useCreature);
00061   inline Window *getWindow() { return win; }
00062 
00063   void wordClicked( char *word );
00064   void showingWord( char *word );
00065 
00066   void drawWidget(Widget *w);
00067 };
00068 
00069 #endif
00070 

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