Commiting whatever state I got that gui data grid widget for archival and fond memori...
[fail.git] / src / gui / game / TextCell.h
blobb4485cdf7b6dc265e8d099437103f6bff87c9660
1 /*
2 Fail game engine
3 Copyright 2007-2008 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_GUI_GAME_TEXTCELL_H_
20 #define FAIL_GUI_GAME_TEXTCELL_H_
22 #include "core/core.h"
23 #include "gui/game/gui-game_export.h"
24 #include "gui/Button_i.h"
25 #include "Widget.h"
26 #include "Container.h"
27 #include "Theme_i.h"
28 #include <string>
29 #include <iostream>
31 namespace fail { namespace gui { namespace game
33 class FLGUI_GAME_EXPORT TextCell : public Widget
35 public:
36 TextCell( Container* pParent, const std::string& Text );
38 virtual const std::string& getText() const { return m_Text; }
39 virtual void setText( const std::string& Text ) { m_Text = Text; }
41 virtual void buildSceneGraph( const Pointer< scenegraph::RenderPass >& pRP );
42 virtual void calcMinMax();
43 virtual void layout();
45 private:
46 Pointer< TextCellDecorator_i > m_pDecorator;
47 std::string m_Text;
49 }}}
51 #endif