Lugre::cColourClipTextOverlay Class Reference

#include <lugre_ColourClipTextOverlay.h>

Inheritance diagram for Lugre::cColourClipTextOverlay:

Inheritance graph
[legend]
Collaboration diagram for Lugre::cColourClipTextOverlay:

Collaboration graph
[legend]

List of all members.

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"


Detailed Description

Definition at line 39 of file lugre_ColourClipTextOverlay.h.


Constructor & Destructor Documentation

Lugre::cColourClipTextOverlay::cColourClipTextOverlay ( const Ogre::String &  name  ) 

Lugre::cColourClipTextOverlay::~cColourClipTextOverlay (  )  [virtual]

Definition at line 58 of file lugre_ColourClipTextOverlay.cpp.


Member Function Documentation

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]

void Lugre::cColourClipTextOverlay::UpdateVars (  ) 

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 
)

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 
)

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  ) 

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  ) 

Definition at line 62 of file lugre_ColourClipTextOverlay.cpp.

References mColourBottom.

void Lugre::cColourClipTextOverlay::setColourTop ( const Ogre::ColourValue &  col  ) 

Definition at line 63 of file lugre_ColourClipTextOverlay.cpp.

References mColourTop.

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

Definition at line 82 of file lugre_ColourClipTextOverlay.cpp.

References mpFont.

const ColourValue & Lugre::cColourClipTextOverlay::getColour (  )  const

Definition at line 65 of file lugre_ColourClipTextOverlay.cpp.

References mColourBottom.

const ColourValue & Lugre::cColourClipTextOverlay::getColourBottom (  )  const

Definition at line 66 of file lugre_ColourClipTextOverlay.cpp.

References mColourBottom.

const ColourValue & Lugre::cColourClipTextOverlay::getColourTop (  )  const

Definition at line 67 of file lugre_ColourClipTextOverlay.cpp.

References mColourTop.


Member Data Documentation

String Lugre::cColourClipTextOverlay::msTypeName = "ColourClipText" [static]

Definition at line 46 of file lugre_ColourClipTextOverlay.h.

Referenced by cColourClipTextOverlay(), getCharHeight(), and UpdateVars().

Definition at line 47 of file lugre_ColourClipTextOverlay.h.

Referenced by cColourClipTextOverlay(), getSpaceWidth(), and UpdateVars().

Definition at line 48 of file lugre_ColourClipTextOverlay.h.

Referenced by cColourClipTextOverlay(), SetAutoWrap(), and UpdateVars().

Ogre::GuiHorizontalAlignment Lugre::cColourClipTextOverlay::mAlignment


The documentation for this class was generated from the following files:

Generated on Thu Feb 9 06:00:20 2012 for cpp by  doxygen 1.5.6