InputTextSurface.hh

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 **
00004 ** Copyright (C) 2006-2010 The TBT Team.
00005 **
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 **
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 **
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
00015 */
00016 
00017 #ifndef INPUTTEXTSURFACE_HH_
00018 # define INPUTTEXTSURFACE_HH_
00019 
00020 # include "TextSurface.hh"
00021 
00032 class InputTextSurface: public TextSurface
00033 {
00034 public:
00035   InputTextSurface();
00036   InputTextSurface(const std::string& font_name, int surf_width);
00037   virtual ~InputTextSurface();
00038 
00040   void acquireInput(const std::string& lock_id);
00042   bool isAcquireFinished() const;
00044   void resetAcquire();
00045 
00046   virtual void update();
00047 
00048 protected:
00049   virtual void customTextRender(SDL_Surface* surf, int line);
00050 
00051 private:
00052   std::string lock_id_;
00053   bool have_text_;       
00054   bool show_cursor_;
00055   int index_;
00056 };
00057 
00058 #endif /* !INPUTTEXTSURFACE_HH_ */
Generated on Mon Apr 5 21:17:12 2010 for Stechec/TBT by  doxygen 1.6.3