LabelEntry.hh

00001     /*
00002     ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003     ** 
00004     ** Copyright (C) 2006 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 LABELENTRY_H
00018 # define LABELENTRY_H
00019 
00020 # include "Global.hh"
00021 # include "GuiError.hh"
00022 # include "Widget.hh"
00023 # include "Label.hh"
00024 # include "Entry.hh"
00025 
00029 class LabelEntry : public Widget
00030 {
00031   Label* label;
00032   Entry* entry;
00033 
00034     public:
00035   LabelEntry(const uint x, const uint y, const uint w, const uint h,
00036              SDL_Surface* screen, Widget* father, const string Label, string* txt);
00037   ~LabelEntry();
00038 
00039       // Draw
00040   void draw();
00041   void refresh();
00042 
00043       // Focus
00044   void gainfocus();
00045   void losefocus();
00046 
00047       // Mouse
00050   void mousemotion(const uint mousex, const uint mousey){};
00051 
00052       // Txt
00053   void add_char(const char c);
00054   void delete_char();
00055   ushort get_index(); 
00056   void set_index(const ushort i);
00057   void set_txt(string* txt);
00058   string get_txt();
00059 };
00060 
00061 #endif /*LABELENTRY_H*/

Generated on Sat Jun 23 16:07:23 2007 for Stechec/TBT by  doxygen 1.4.7