CEGUIFalTextComponent.h

00001 /***********************************************************************
00002     filename:   CEGUIFalTextComponent.h
00003     created:    Sun Jun 19 2005
00004     author:     Paul D Turner <paul@cegui.org.uk>
00005 *************************************************************************/
00006 /***************************************************************************
00007  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
00008  *
00009  *   Permission is hereby granted, free of charge, to any person obtaining
00010  *   a copy of this software and associated documentation files (the
00011  *   "Software"), to deal in the Software without restriction, including
00012  *   without limitation the rights to use, copy, modify, merge, publish,
00013  *   distribute, sublicense, and/or sell copies of the Software, and to
00014  *   permit persons to whom the Software is furnished to do so, subject to
00015  *   the following conditions:
00016  *
00017  *   The above copyright notice and this permission notice shall be
00018  *   included in all copies or substantial portions of the Software.
00019  *
00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00026  *   OTHER DEALINGS IN THE SOFTWARE.
00027  ***************************************************************************/
00028 #ifndef _CEGUIFalTextComponent_h_
00029 #define _CEGUIFalTextComponent_h_
00030 
00031 #include "falagard/CEGUIFalComponentBase.h"
00032 
00033 // Start of CEGUI namespace section
00034 namespace CEGUI
00035 {
00040     class CEGUIEXPORT TextComponent : public FalagardComponentBase
00041     {
00042     public:
00047         TextComponent();
00048 
00056         const String& getText() const;
00057 
00071         void setText(const String& text);
00072 
00080         const String& getFont() const;
00081 
00095         void setFont(const String& font);
00096 
00104         VerticalTextFormatting getVerticalFormatting() const;
00105 
00116         void setVerticalFormatting(VerticalTextFormatting fmt);
00117 
00125         HorizontalTextFormatting getHorizontalFormatting() const;
00126 
00137         void setHorizontalFormatting(HorizontalTextFormatting fmt);
00138 
00150         void writeXMLToStream(XMLSerializer& xml_stream) const;
00151 
00160         bool isTextFetchedFromProperty() const;
00161 
00170         const String& getTextPropertySource() const;
00171 
00183         void setTextPropertySource(const String& property);
00184         
00193         bool isFontFetchedFromProperty() const;
00194 
00203         const String& getFontPropertySource() const;
00204 
00216         void setFontPropertySource(const String& property);
00217 
00218     protected:
00219         // implemets abstract from base
00220         void render_impl(Window& srcWindow, Rect& destRect, float base_z, const CEGUI::ColourRect* modColours, const Rect* clipper, bool clipToDisplay) const;
00221 
00222     private:
00223         String               d_text;            
00224         String               d_font;            
00225         VerticalTextFormatting   d_vertFormatting;  
00226         HorizontalTextFormatting d_horzFormatting;  
00227         String  d_textPropertyName;             
00228         String  d_fontPropertyName;             
00229     };
00230 
00231 } // End of  CEGUI namespace section
00232 
00233 
00234 #endif  // end of guard _CEGUIFalTextComponent_h_

Generated on Sun Nov 5 14:35:28 2006 for Crazy Eddies GUI System by  doxygen 1.4.7