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

CEGUIRenderedStringComponent.h

00001 /***********************************************************************
00002     filename:   CEGUIRenderedStringComponent.h
00003     created:    24/05/2009
00004     author:     Paul Turner
00005  *************************************************************************/
00006 /***************************************************************************
00007  *   Copyright (C) 2004 - 2009 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 _CEGUIRenderedStringComponent_h_
00029 #define _CEGUIRenderedStringComponent_h_
00030 
00031 #include "CEGUISize.h"
00032 #include "CEGUIRect.h"
00033 #include "falagard/CEGUIFalEnums.h"
00034 
00035 // Start of CEGUI namespace section
00036 namespace CEGUI
00037 {
00043 class CEGUIEXPORT RenderedStringComponent
00044 {
00045 public:
00047     virtual ~RenderedStringComponent();
00048 
00050     void setVerticalFormatting(VerticalFormatting fmt);
00052     VerticalFormatting getVerticalFormatting() const;
00054     void setPadding(const Rect& padding);
00056     void setLeftPadding(const float padding);
00058     void setRightPadding(const float padding);
00060     void setTopPadding(const float padding);
00062     void setBottomPadding(const float padding);
00064     const Rect& getPadding() const;
00066     float getLeftPadding() const;
00068     float getRightPadding() const;
00070     float getTopPadding() const;
00072     float getBottomPadding() const;
00074     void setAspectLock(const bool setting);
00076     bool getAspectLock() const;
00077 
00079     virtual void draw(GeometryBuffer& buffer, const Vector2& position,
00080                       const ColourRect* mod_colours,
00081                       const Rect* clip_rect,
00082                       const float vertical_space,
00083                       const float space_extra) const = 0;
00084 
00086     virtual Size getPixelSize() const = 0;
00087 
00089     virtual bool canSplit() const = 0;
00090 
00101     virtual RenderedStringComponent* split(float split_point,
00102                                            bool first_component) = 0;
00103 
00105     virtual RenderedStringComponent* clone() const = 0;
00106 
00108     virtual size_t getSpaceCount() const = 0;
00109 
00110 protected:
00112     RenderedStringComponent();
00113 
00115     Rect d_padding;
00117     VerticalFormatting d_verticalFormatting;
00119     bool d_aspectLock;
00120 };
00121 
00122 } // End of  CEGUI namespace section
00123 
00124 #endif // end of guard _CEGUIRenderedStringComponent_h_

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