#include <lugre_ColourClipTextOverlay.h>


Public Member Functions | |
| cColourClipTextOverlay (const Ogre::String &name) | |
| virtual | ~cColourClipTextOverlay () |
| virtual const Ogre::String & | getTypeName (void) const |
| virtual void | updatePositionGeometry (void) |
| internal method for setting up geometry, called by OverlayElement::update | |
| void | UpdateVars () |
| void | SetAutoWrap (Ogre::Real fMaxW) |
| usually in pixels | |
| void | GetTextBounds (Ogre::Real &w, Ogre::Real &h) |
| returns width,height | |
| int | GetGlyphAtPos (const size_t x, const size_t y) |
| -1 if not found, index in caption otherwise | |
| void | GetGlyphBounds (const size_t iIndex, Ogre::Real &l, Ogre::Real &t, Ogre::Real &r, Ogre::Real &b) |
| returns left,top,right,bottom | |
| void | setAlignment (const Ogre::GuiHorizontalAlignment align) |
| void | setCharHeight (Ogre::Real height) |
| void | setSpaceWidth (Ogre::Real width) |
| void | setCaption (const Ogre::UTFString &caption) |
| void | setFontName (const Ogre::String &font) |
| void | setColour (const Ogre::ColourValue &col) |
| void | setColourBottom (const Ogre::ColourValue &col) |
| void | setColourTop (const Ogre::ColourValue &col) |
| Ogre::Real | getCharHeight () const |
| Ogre::Real | getSpaceWidth () const |
| const Ogre::UTFString & | getCaption () const |
| const Ogre::String & | getFontName () const |
| const Ogre::ColourValue & | getColour () const |
| const Ogre::ColourValue & | getColourBottom () const |
| const Ogre::ColourValue & | getColourTop () const |
Static Public Member Functions | |
| static void | RegisterFactory () |
| should be called once at programmstart after initialising ogre::root | |
Public Attributes | |
| Ogre::FontPtr | mpFont |
| Ogre::Real | mViewportAspectCoef |
| Ogre::Real | mWrapMaxW |
| Ogre::Real | mCharHeight |
| Ogre::Real | mSpaceWidth |
| Ogre::ushort | mPixelCharHeight |
| Ogre::ushort | mPixelSpaceWidth |
| Ogre::ushort | mPixelWrapMaxW |
| Ogre::ColourValue | mColourBottom |
| Ogre::ColourValue | mColourTop |
| Ogre::GuiHorizontalAlignment | mAlignment |
Static Public Attributes | |
| static Ogre::String | msTypeName = "ColourClipText" |
Definition at line 39 of file lugre_ColourClipTextOverlay.h.
| Lugre::cColourClipTextOverlay::cColourClipTextOverlay | ( | const Ogre::String & | name | ) |
Definition at line 42 of file lugre_ColourClipTextOverlay.cpp.
References mAlignment, mCharHeight, mColourBottom, mColourTop, mPixelCharHeight, mPixelSpaceWidth, mPixelWrapMaxW, mSpaceWidth, Lugre::cColourClipPaneOverlay::mTransparent, mViewportAspectCoef, and mWrapMaxW.
| Lugre::cColourClipTextOverlay::~cColourClipTextOverlay | ( | ) | [virtual] |
Definition at line 58 of file lugre_ColourClipTextOverlay.cpp.
| void Lugre::cColourClipTextOverlay::RegisterFactory | ( | ) | [static] |
should be called once at programmstart after initialising ogre::root
Reimplemented from Lugre::cColourClipPaneOverlay.
Definition at line 32 of file lugre_ColourClipTextOverlay.cpp.
Referenced by Lugre::cOgreWrapper::CreateOgreWindow().
| const String & Lugre::cColourClipTextOverlay::getTypeName | ( | void | ) | const [virtual] |
See OverlayElement.
Reimplemented from Lugre::cColourClipPaneOverlay.
Definition at line 112 of file lugre_ColourClipTextOverlay.cpp.
References msTypeName.
| void Lugre::cColourClipTextOverlay::updatePositionGeometry | ( | void | ) | [virtual] |
internal method for setting up geometry, called by OverlayElement::update
Reimplemented from Lugre::cColourClipPaneOverlay.
Definition at line 141 of file lugre_ColourClipTextOverlay.cpp.
References Lugre::cOgreFontHelper::Alignment(), Lugre::cRobRenderOp::Begin(), Lugre::cColourClipPaneOverlay::Vertex::col, Lugre::cColourClipPaneOverlay::VertexRect::DrawList(), Lugre::cRobRenderOp::End(), Lugre::cOgreFontHelper::GetCharWidth(), Lugre::cOgreFontHelper::cTextIterator::HasNext(), Lugre::cColourClipPaneOverlay::VertexRect::Intersect(), Lugre::cOgreFontHelper::IsWhiteSpace(), Lugre::cColourClipPaneOverlay::VertexRect::lb, Lugre::cColourClipPaneOverlay::VertexRect::lt, mAlignment, Lugre::cColourClipPaneOverlay::mbClipInitialized, mCharHeight, Lugre::cColourClipPaneOverlay::mClip, mColourBottom, mColourTop, mpFont, mSpaceWidth, mViewportAspectCoef, mWrapMaxW, Lugre::cOgreFontHelper::cTextIterator::Next(), Lugre::cColourClipPaneOverlay::VertexRect::rb, Lugre::cColourClipPaneOverlay::VertexRect::rt, Lugre::cColourClipPaneOverlay::VertexRect::SetLTWH(), Lugre::cColourClipPaneOverlay::VertexRect::SetUV(), Lugre::cRobRenderOp::SkipVertices(), UpdateVars(), Lugre::cOgreFontHelper::cTextIterator::x, and Lugre::cOgreFontHelper::cTextIterator::y.
| void Lugre::cColourClipTextOverlay::UpdateVars | ( | ) |
Definition at line 125 of file lugre_ColourClipTextOverlay.cpp.
References Lugre::cOgreWrapper::GetSingleton(), Lugre::cOgreWrapper::GetViewportHeight(), Lugre::cOgreWrapper::GetViewportWidth(), mCharHeight, mpFont, mPixelCharHeight, mPixelSpaceWidth, mPixelWrapMaxW, mSpaceWidth, mViewportAspectCoef, mWrapMaxW, and Lugre::cOgreFontHelper::UNICODE_ZERO.
Referenced by GetGlyphAtPos(), GetGlyphBounds(), GetTextBounds(), and updatePositionGeometry().
| void Lugre::cColourClipTextOverlay::SetAutoWrap | ( | Ogre::Real | fMaxW | ) |
usually in pixels
Definition at line 117 of file lugre_ColourClipTextOverlay.cpp.
References mPixelWrapMaxW, and mWrapMaxW.
Referenced by Lugre::cGfx2D::SetAutoWrap().
| void Lugre::cColourClipTextOverlay::GetTextBounds | ( | Ogre::Real & | w, | |
| Ogre::Real & | h | |||
| ) |
returns width,height
returns result in pixels
Definition at line 192 of file lugre_ColourClipTextOverlay.cpp.
References Lugre::cOgreFontHelper::Alignment(), Lugre::cOgreWrapper::GetSingleton(), Lugre::cOgreFontHelper::GetTextBounds(), Lugre::cOgreWrapper::GetViewportHeight(), Lugre::cOgreWrapper::GetViewportWidth(), mAlignment, mCharHeight, mpFont, mSpaceWidth, mViewportAspectCoef, mWrapMaxW, and UpdateVars().
Referenced by Lugre::cGfx2D::GetTextBounds().
| int Lugre::cColourClipTextOverlay::GetGlyphAtPos | ( | const size_t | x, | |
| const size_t | y | |||
| ) |
-1 if not found, index in caption otherwise
input pos in absolute pixel coordinates (e.g. clicking to place the caret) returns the INDEX of the char in the string, not the charcode returns -1 if nothing was hit TODO : TEST ME !
Definition at line 227 of file lugre_ColourClipTextOverlay.cpp.
References Lugre::cOgreFontHelper::Alignment(), Lugre::cOgreFontHelper::GetGlyphAtPos(), Lugre::cOgreWrapper::GetSingleton(), mAlignment, mCharHeight, mpFont, mSpaceWidth, mViewportAspectCoef, mWrapMaxW, and UpdateVars().
Referenced by Lugre::cGfx2D::GetGlyphAtPos().
| void Lugre::cColourClipTextOverlay::GetGlyphBounds | ( | const size_t | iIndex, | |
| Ogre::Real & | l, | |||
| Ogre::Real & | t, | |||
| Ogre::Real & | r, | |||
| Ogre::Real & | b | |||
| ) |
returns left,top,right,bottom
returns result in pixels TODO : TEST ME !
Definition at line 204 of file lugre_ColourClipTextOverlay.cpp.
References Lugre::cOgreFontHelper::Alignment(), Lugre::cOgreFontHelper::GetGlyphBounds(), Lugre::cOgreWrapper::GetSingleton(), mAlignment, mCharHeight, mpFont, mSpaceWidth, mViewportAspectCoef, mWrapMaxW, and UpdateVars().
Referenced by Lugre::cGfx2D::GetGlyphBounds().
| void Lugre::cColourClipTextOverlay::setAlignment | ( | const Ogre::GuiHorizontalAlignment | align | ) | [inline] |
Definition at line 72 of file lugre_ColourClipTextOverlay.h.
References mAlignment.
Referenced by Lugre::cGfx2D::SetTextAlignment().
| void Lugre::cColourClipTextOverlay::setCharHeight | ( | Ogre::Real | height | ) |
Referenced by Lugre::cGfx2D::SetCharHeight().
| void Lugre::cColourClipTextOverlay::setSpaceWidth | ( | Ogre::Real | width | ) |
| void Lugre::cColourClipTextOverlay::setCaption | ( | const Ogre::UTFString & | caption | ) |
Definition at line 69 of file lugre_ColourClipTextOverlay.cpp.
| void Lugre::cColourClipTextOverlay::setFontName | ( | const Ogre::String & | font | ) |
Referenced by Lugre::cGfx2D::SetFont().
| void Lugre::cColourClipTextOverlay::setColour | ( | const Ogre::ColourValue & | col | ) | [virtual] |
Reimplemented from Lugre::cColourClipPaneOverlay.
Definition at line 61 of file lugre_ColourClipTextOverlay.cpp.
References mColourBottom, and mColourTop.
| void Lugre::cColourClipTextOverlay::setColourBottom | ( | const Ogre::ColourValue & | col | ) |
| void Lugre::cColourClipTextOverlay::setColourTop | ( | const Ogre::ColourValue & | col | ) |
| Real Lugre::cColourClipTextOverlay::getCharHeight | ( | ) | const |
Definition at line 93 of file lugre_ColourClipTextOverlay.cpp.
References mCharHeight, and mPixelCharHeight.
| Real Lugre::cColourClipTextOverlay::getSpaceWidth | ( | ) | const |
Definition at line 105 of file lugre_ColourClipTextOverlay.cpp.
References mPixelSpaceWidth, and mSpaceWidth.
| const Ogre::UTFString & Lugre::cColourClipTextOverlay::getCaption | ( | ) | const |
Definition at line 70 of file lugre_ColourClipTextOverlay.cpp.
| const String & Lugre::cColourClipTextOverlay::getFontName | ( | ) | const |
| const ColourValue & Lugre::cColourClipTextOverlay::getColour | ( | ) | const |
| const ColourValue & Lugre::cColourClipTextOverlay::getColourBottom | ( | ) | const |
| const ColourValue & Lugre::cColourClipTextOverlay::getColourTop | ( | ) | const |
String Lugre::cColourClipTextOverlay::msTypeName = "ColourClipText" [static] |
Reimplemented from Lugre::cColourClipPaneOverlay.
Definition at line 40 of file lugre_ColourClipTextOverlay.h.
Referenced by getTypeName(), and Lugre::ColourClipTextOverlayElementFactory::getTypeName().
| Ogre::FontPtr Lugre::cColourClipTextOverlay::mpFont |
Definition at line 41 of file lugre_ColourClipTextOverlay.h.
Referenced by getFontName(), GetGlyphAtPos(), GetGlyphBounds(), GetTextBounds(), updatePositionGeometry(), and UpdateVars().
Definition at line 42 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), GetGlyphAtPos(), GetGlyphBounds(), GetTextBounds(), updatePositionGeometry(), and UpdateVars().
| Ogre::Real Lugre::cColourClipTextOverlay::mWrapMaxW |
Definition at line 43 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), GetGlyphAtPos(), GetGlyphBounds(), GetTextBounds(), SetAutoWrap(), updatePositionGeometry(), and UpdateVars().
| Ogre::Real Lugre::cColourClipTextOverlay::mCharHeight |
Definition at line 44 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), getCharHeight(), GetGlyphAtPos(), GetGlyphBounds(), GetTextBounds(), updatePositionGeometry(), and UpdateVars().
| Ogre::Real Lugre::cColourClipTextOverlay::mSpaceWidth |
Definition at line 45 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), GetGlyphAtPos(), GetGlyphBounds(), getSpaceWidth(), GetTextBounds(), updatePositionGeometry(), and UpdateVars().
| Ogre::ushort Lugre::cColourClipTextOverlay::mPixelCharHeight |
Definition at line 46 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), getCharHeight(), and UpdateVars().
| Ogre::ushort Lugre::cColourClipTextOverlay::mPixelSpaceWidth |
Definition at line 47 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), getSpaceWidth(), and UpdateVars().
| Ogre::ushort Lugre::cColourClipTextOverlay::mPixelWrapMaxW |
Definition at line 48 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), SetAutoWrap(), and UpdateVars().
| Ogre::ColourValue Lugre::cColourClipTextOverlay::mColourBottom |
Definition at line 49 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), getColour(), getColourBottom(), setColour(), setColourBottom(), and updatePositionGeometry().
| Ogre::ColourValue Lugre::cColourClipTextOverlay::mColourTop |
Definition at line 50 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), getColourTop(), setColour(), setColourTop(), and updatePositionGeometry().
| Ogre::GuiHorizontalAlignment Lugre::cColourClipTextOverlay::mAlignment |
Definition at line 51 of file lugre_ColourClipTextOverlay.h.
Referenced by cColourClipTextOverlay(), GetGlyphAtPos(), GetGlyphBounds(), GetTextBounds(), setAlignment(), and updatePositionGeometry().
1.5.6