• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

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 "CEGUIFalComponentBase.h"
00032 #include "../CEGUIRenderedString.h"
00033 #include "../CEGUIRefCounted.h"
00034 #include "../CEGUIFormattedRenderedString.h"
00035 
00036 #if defined(_MSC_VER)
00037 #  pragma warning(push)
00038 #  pragma warning(disable : 4251)
00039 #endif
00040 
00041 // Start of CEGUI namespace section
00042 namespace CEGUI
00043 {
00048     class CEGUIEXPORT TextComponent : public FalagardComponentBase
00049     {
00050     public:
00055         TextComponent();
00056 
00058         ~TextComponent();
00059 
00061         TextComponent(const TextComponent& obj);
00062 
00064         TextComponent& operator=(const TextComponent& other);
00065 
00073         const String& getText() const;
00074 
00076         const String& getTextVisual() const;
00077 
00091         void setText(const String& text);
00092 
00100         const String& getFont() const;
00101 
00115         void setFont(const String& font);
00116 
00124         VerticalTextFormatting getVerticalFormatting() const;
00125 
00136         void setVerticalFormatting(VerticalTextFormatting fmt);
00137 
00145         HorizontalTextFormatting getHorizontalFormatting() const;
00146 
00157         void setHorizontalFormatting(HorizontalTextFormatting fmt);
00158 
00170         void writeXMLToStream(XMLSerializer& xml_stream) const;
00171 
00180         bool isTextFetchedFromProperty() const;
00181 
00190         const String& getTextPropertySource() const;
00191 
00203         void setTextPropertySource(const String& property);
00204         
00213         bool isFontFetchedFromProperty() const;
00214 
00223         const String& getFontPropertySource() const;
00224 
00236         void setFontPropertySource(const String& property);
00237 
00238     protected:
00239         // implemets abstract from base
00240         void render_impl(Window& srcWindow, Rect& destRect, const CEGUI::ColourRect* modColours, const Rect* clipper, bool clipToDisplay) const;
00242         void setupStringFormatter(const Window& window,
00243                                   const RenderedString& rendered_string) const;
00244     private:
00245         String               d_textLogical;            
00246 
00247         BiDiVisualMapping* d_bidiVisualMapping;
00249         mutable bool d_bidiDataValid;
00251         mutable RenderedString d_renderedString;
00253         mutable RefCounted<FormattedRenderedString> d_formattedRenderedString;
00255         mutable HorizontalTextFormatting d_lastHorzFormatting;
00256 
00257         String               d_font;            
00258         VerticalTextFormatting   d_vertFormatting;  
00259         HorizontalTextFormatting d_horzFormatting;  
00260         String  d_textPropertyName;             
00261         String  d_fontPropertyName;             
00262     };
00263 
00264 } // End of  CEGUI namespace section
00265 
00266 #if defined(_MSC_VER)
00267 #  pragma warning(pop)
00268 #endif
00269 
00270 #endif  // end of guard _CEGUIFalTextComponent_h_

Generated on Fri Nov 19 2010 12:01:19 for Crazy Eddies GUI System by  doxygen 1.7.2