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

Public Member Functions

 TextDF (const std::string &_fontName="", int32_t _fontSize=-1)
 
virtual ~TextDF ()
 
void updateSizeToRender (const vec2 &_size)
 
virtual void clear ()
 
virtual void drawD (bool _disableDepthTest)
 
virtual void drawMT (const mat4 &_transformationMatrix, bool _enableDepthTest)
 
virtual float getHeight ()
 
virtual float getSize ()
 
virtual void setSize (float _size)
 
virtual ewol::GlyphPropertygetGlyphPointer (char32_t _charcode)
 
virtual void loadProgram (const std::string &_shaderName)
 
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 ()
 
 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 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::DistanceFieldFontm_fontDF
 
std::vector< float > m_glyphLevel
 
int32_t m_GLglyphLevel
 
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

§ TextDF()

ewol::compositing::TextDF::TextDF ( 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

§ ~TextDF()

virtual ewol::compositing::TextDF::~TextDF ( )
virtual

generic destructor

Member Function Documentation

§ calculateSizeChar()

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

§ clear()

virtual void ewol::compositing::TextDF::clear ( )
virtual

clear all the registered element in the current element

Reimplemented from ewol::compositing::TextBase.

§ drawD()

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

draw All the refistered text in the current element on openGL

Implements ewol::compositing::TextBase.

§ drawMT()

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

§ loadProgram()

virtual void ewol::compositing::TextDF::loadProgram ( const std::string &  _shaderName)
virtual

load the openGL program and get all the ID needed

Reimplemented from ewol::compositing::TextBase.

§ printChar()

virtual void ewol::compositing::TextDF::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::TextDF::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::TextDF::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::TextDF::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::TextDF::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.

§ updateSizeToRender()

void ewol::compositing::TextDF::updateSizeToRender ( const vec2 _size)

Calculate size to be at the best size for a render in this special size.

Note
special for Distance field mode.
Parameters
[in]_sizerequest dimention.

Member Data Documentation

§ m_fontDF

ememory::SharedPtr<ewol::resource::DistanceFieldFont> ewol::compositing::TextDF::m_fontDF
protected

Font resources.

§ m_GLglyphLevel

int32_t ewol::compositing::TextDF::m_GLglyphLevel
protected

openGL Id on the glyph level display

§ m_glyphLevel

std::vector<float> ewol::compositing::TextDF::m_glyphLevel
protected

Level of display of the glyph (notmal : 0.50, bold : 0.40, super bold : 0.30 ...)


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