ewol::compositing::Text Class Reference
Inheritance diagram for ewol::compositing::Text:
ewol::compositing::TextBase ewol::Compositing

Public Member Functions

 Text (const std::string &_fontName="", int32_t _fontSize=-1)
 
virtual ~Text ()
 
virtual void drawD (bool _disableDepthTest)
 
virtual void drawMT (const mat4 &_transformationMatrix, bool _enableDepthTest)
 
virtual float getHeight ()
 
virtual float getSize ()
 
virtual ewol::GlyphPropertygetGlyphPointer (char32_t _charcode)
 
virtual void setFontSize (int32_t _fontSize)
 
virtual void setFontName (const std::string &_fontName)
 
virtual void setFont (std::string _fontName, int32_t _fontSize)
 
virtual void setFontMode (enum ewol::font::mode _mode)
 
virtual void printChar (const char32_t &_charcode)
 
virtual vec3 calculateSizeChar (const char32_t &_charcode)
 
- Public Member Functions inherited from ewol::compositing::TextBase
virtual ewol::compositing::DrawinggetDrawing ()
 
virtual void loadProgram (const std::string &_shaderName)
 
 TextBase (const std::string &_shaderName="{ewol}DATA:text.prog", bool _loadProgram=true)
 
virtual ~TextBase ()
 
void translate (const vec3 &_vect)
 
void rotate (const vec3 &_vect, float _angle)
 
void scale (const vec3 &_vect)
 
void draw (bool _disableDepthTest=true)
 
void draw (const mat4 &_transformationMatrix, bool _enableDepthTest=false)
 
virtual void clear ()
 
virtual void reset ()
 
const vec3getPos ()
 
void setPos (const vec3 &_pos)
 
void setPos (const vec2 &_pos)
 
void setRelPos (const vec3 &_pos)
 
void setRelPos (const vec2 &_pos)
 
void setDefaultColorBg (const etk::Color<> &_color)
 
void setDefaultColorFg (const etk::Color<> &_color)
 
void setColor (const etk::Color<> &_color)
 
void setColorBg (const etk::Color<> &_color)
 
void setClippingWidth (const vec3 &_pos, const vec3 &_width)
 
void setClippingWidth (const vec2 &_pos, const vec2 &_width)
 
void setClipping (const vec3 &_pos, const vec3 &_posEnd)
 
void setClipping (const vec2 &_pos, const vec2 &_posEnd)
 
void setClippingMode (bool _newMode)
 
enum ewol::font::mode getFontMode ()
 
void setFontBold (bool _status)
 
void setFontItalic (bool _status)
 
void setKerningMode (bool _newMode)
 
void print (const std::string &_text)
 
void print (const std::u32string &_text)
 
void printDecorated (const std::string &_text)
 
void printDecorated (const std::u32string &_text)
 
void printHTML (const std::string &_text)
 
void printHTML (const std::u32string &_text)
 
void print (const std::string &_text, const std::vector< TextDecoration > &_decoration)
 
void print (const std::u32string &_text, const std::vector< TextDecoration > &_decoration)
 
void forceLineReturn ()
 
void setTextAlignement (float _startTextpos, float _stopTextPos, enum ewol::compositing::aligneMode _alignement=ewol::compositing::alignDisable)
 
void disableAlignement ()
 
enum ewol::compositing::aligneMode getAlignement ()
 
vec3 calculateSizeHTML (const std::string &_text)
 
vec3 calculateSizeHTML (const std::u32string &_text)
 
vec3 calculateSizeDecorated (const std::string &_text)
 
vec3 calculateSizeDecorated (const std::u32string &_text)
 
vec3 calculateSize (const std::string &_text)
 
vec3 calculateSize (const std::u32string &_text)
 
vec3 calculateSize (const char32_t &_charcode)
 
void printCursor (bool _isInsertMode, float _cursorSize=20.0f)
 
void disableCursor ()
 
void setCursorPos (int32_t _cursorPos)
 
void setCursorSelection (int32_t _cursorPos, int32_t _selectionStartPos)
 
void setSelectionColor (const etk::Color<> &_color)
 
void setCursorColor (const etk::Color<> &_color)
 
- Public Member Functions inherited from ewol::Compositing
 Compositing ()
 
virtual ~Compositing ()
 
virtual void resetMatrix ()
 
virtual void setMatrix (const mat4 &_mat)
 

Protected Attributes

ememory::SharedPtr< ewol::resource::TexturedFontm_font
 
float m_size
 
- Protected Attributes inherited from ewol::compositing::TextBase
ewol::compositing::Drawing m_vectorialDraw
 
int32_t m_nbCharDisplayed
 
vec3 m_sizeDisplayStart
 
vec3 m_sizeDisplayStop
 
bool m_needDisplay
 
vec3 m_position
 
vec3 m_clippingPosStart
 
vec3 m_clippingPosStop
 
bool m_clippingEnable
 
etk::Color m_defaultColorFg
 
etk::Color m_defaultColorBg
 
etk::Color m_color
 
etk::Color m_colorBg
 
etk::Color m_colorCursor
 
etk::Color m_colorSelection
 
enum ewol::font::mode m_mode
 
bool m_kerning
 
char32_t m_previousCharcode
 
float m_startTextpos
 
float m_stopTextPos
 
enum aligneMode m_alignement
 
ememory::SharedPtr< gale::resource::Program > m_GLprogram
 
int32_t m_GLPosition
 
int32_t m_GLMatrix
 
int32_t m_GLColor
 
int32_t m_GLtexture
 
int32_t m_GLtexID
 
int32_t m_GLtextWidth
 
int32_t m_GLtextHeight
 
int32_t m_selectionStartPos
 
int32_t m_cursorPos
 
std::vector< vec3m_coord
 
std::vector< vec2m_coordTex
 
std::vector< etk::Color< float > > m_coordColor
 
std::u32string m_htmlCurrrentLine
 
std::vector< TextDecorationm_htmlDecoration
 
TextDecoration m_htmlDecoTmp
 
- Protected Attributes inherited from ewol::Compositing
mat4 m_matrixApply
 

Additional Inherited Members

- Protected Member Functions inherited from ewol::compositing::TextBase
void parseHtmlNode (const exml::Element &_element)
 
bool extrapolateLastId (const std::string &_text, const int32_t _start, int32_t &_stop, int32_t &_space, int32_t &_freeSpace)
 
bool extrapolateLastId (const std::u32string &_text, const int32_t _start, int32_t &_stop, int32_t &_space, int32_t &_freeSpace)
 
void htmlAddData (const std::u32string &_data)
 
void htmlFlush ()
 

Constructor & Destructor Documentation

§ Text()

ewol::compositing::Text::Text ( const std::string &  _fontName = "",
int32_t  _fontSize = -1 
)

generic constructor

Parameters
[in]_fontNameName of the font that might be loaded
[in]_fontSizesize of the font that might be loaded

§ ~Text()

virtual ewol::compositing::Text::~Text ( )
virtual

generic destructor

Member Function Documentation

§ calculateSizeChar()

virtual vec3 ewol::compositing::Text::calculateSizeChar ( const char32_t &  _charcode)
virtual

§ drawD()

virtual void ewol::compositing::Text::drawD ( bool  _disableDepthTest)
virtual

draw All the refistered text in the current element on openGL

Implements ewol::compositing::TextBase.

§ drawMT()

virtual void ewol::compositing::Text::drawMT ( const mat4 _transformationMatrix,
bool  _enableDepthTest 
)
virtual

§ printChar()

virtual void ewol::compositing::Text::printChar ( const char32_t &  _charcode)
virtual

display the current char in the current element (note that the kerning is availlable if the position is not changed)

Parameters
[in]_charcodeChar that might be dispalyed

Implements ewol::compositing::TextBase.

§ setFont()

virtual void ewol::compositing::Text::setFont ( std::string  _fontName,
int32_t  _fontSize 
)
virtual

Specify the font property (this reset the internal element of the current text (system requirement)

Parameters
[in]fontNameCurrent name of the selected font
[in]fontSizeNew font size

Implements ewol::compositing::TextBase.

§ setFontMode()

virtual void ewol::compositing::Text::setFontMode ( enum ewol::font::mode  _mode)
virtual

Specify the font mode for the next print.

Parameters
[in]modeThe font mode requested

Implements ewol::compositing::TextBase.

§ setFontName()

virtual void ewol::compositing::Text::setFontName ( const std::string &  _fontName)
virtual

Specify the font name (this reset the internal element of the current text (system requirement)

Parameters
[in]_fontNameCurrent name of the selected font

Implements ewol::compositing::TextBase.

§ setFontSize()

virtual void ewol::compositing::Text::setFontSize ( int32_t  _fontSize)
virtual

Specify the font size (this reset the internal element of the current text (system requirement)

Parameters
[in]_fontSizeNew font size

Implements ewol::compositing::TextBase.

Member Data Documentation

§ m_font

ememory::SharedPtr<ewol::resource::TexturedFont> ewol::compositing::Text::m_font
protected

Font resources.


The documentation for this class was generated from the following file:
  • framework/atria-soft/ewol/ewol/compositing/Text.hpp