TextBase.hpp
Go to the documentation of this file.
49 };
365 void setTextAlignement(float _startTextpos, float _stopTextPos, enum ewol::compositing::aligneMode _alignement=ewol::compositing::alignDisable);
429 bool extrapolateLastId(const std::string& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace);
431 bool extrapolateLastId(const std::u32string& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace);
const T & x() const
etk::Color m_defaultColorFg
The text foreground color.
Definition: TextBase.hpp:60
void draw(const mat4 &_transformationMatrix, bool _enableDepthTest=false)
Definition: TextBase.hpp:117
etk::Color m_defaultColorBg
The text background color.
Definition: TextBase.hpp:61
Definition: TextBase.hpp:43
etk::Color m_colorSelection
The text Selection color.
Definition: TextBase.hpp:66
vec3 m_sizeDisplayStop
The end windows of the display.
Definition: TextBase.hpp:53
std::vector< etk::Color< float > > m_coordColor
internal color of the different point
Definition: TextBase.hpp:90
void setDefaultColorFg(const etk::Color<> &_color)
set the default Foreground color of the font (when reset, set this value ...)
Definition: TextBase.hpp:170
int32_t m_GLColor
openGL id on the element (color buffer)
Definition: TextBase.hpp:79
vec3 calculateSize(const char32_t &_charcode)
calculate a theoric charcode size
Definition: TextBase.hpp:404
int32_t m_cursorPos
Cursor position (default no cursor == > -100)
Definition: TextBase.hpp:86
void draw(bool _disableDepthTest=true)
draw All the refistered text in the current element on openGL
Definition: TextBase.hpp:113
This class represent the specific display for every char in the string ... .
Definition: TextBase.hpp:23
Definition: Drawing.hpp:17
vec3 m_position
The current position to draw.
Definition: TextBase.hpp:55
int32_t m_selectionStartPos
start position of the Selection (if == m_cursorPos ==> no selection)
Definition: TextBase.hpp:85
vec3 m_sizeDisplayStart
The start windows of the display.
Definition: TextBase.hpp:52
void setColor(const etk::Color<> &_color)
set the Color of the current foreground font
Definition: TextBase.hpp:177
etk::Color m_colorBg
display background color
Definition: TextBase.hpp:25
char32_t m_previousCharcode
we remember the previous charcode to perform the kerning. Kerning
Definition: TextBase.hpp:70
float m_startTextpos
start position of the Alignement (when the text return at this position)
Definition: TextBase.hpp:72
const Color blue
int32_t m_GLtexture
openGL id on the element (Texture position)
Definition: TextBase.hpp:80
std::u32string m_htmlCurrrentLine
current line for HTML display
Definition: TextBase.hpp:434
int32_t m_nbCharDisplayed
prevent some error in calculation size.
Definition: TextBase.hpp:49
Definition: Area.hpp:16
bool m_needDisplay
This just need the display and not the size rendering.
Definition: TextBase.hpp:54
vec3 m_clippingPosStop
Clipping stop position.
Definition: TextBase.hpp:57
void setClippingWidth(const vec3 &_pos, const vec3 &_width)
Request a clipping area for the text (next draw only)
Definition: TextBase.hpp:190
void setDefaultColorBg(const etk::Color<> &_color)
set the default background color of the font (when reset, set this value ...)
Definition: TextBase.hpp:163
std::vector< vec2 > m_coordTex
internal texture coordinate for every point
Definition: TextBase.hpp:89
Definition: GlyphProperty.hpp:48
etk::Color m_colorBg
The text background color.
Definition: TextBase.hpp:64
void clear()
const T & y() const
std::vector< vec3 > m_coord
internal coord of the object
Definition: TextBase.hpp:88
enum ewol::font::mode m_mode
display mode Regular/Bold/Italic/BoldItalic
Definition: TextBase.hpp:27
bool m_clippingEnable
true if the clipping must be activated
Definition: TextBase.hpp:58
vec3 m_clippingPosStart
Clipping start position.
Definition: TextBase.hpp:56
Definition: Compositing.hpp:13
int32_t m_GLtextWidth
openGL Id on the texture width
Definition: TextBase.hpp:82
TextDecoration m_htmlDecoTmp
current decoration
Definition: TextBase.hpp:436
ememory::SharedPtr< gale::resource::Program > m_GLprogram
pointer on the opengl display program
Definition: TextBase.hpp:76
int32_t m_GLtextHeight
openGL Id on the texture height
Definition: TextBase.hpp:83
void setClipping(const vec2 &_pos, const vec2 &_posEnd)
Definition: TextBase.hpp:204
etk::Color m_color
The text foreground color.
Definition: TextBase.hpp:63
int32_t m_GLMatrix
openGL id on the element (transformation matrix)
Definition: TextBase.hpp:78
ewol::compositing::Drawing m_vectorialDraw
This is used to draw background selection and other things ...
Definition: TextBase.hpp:45
std::vector< TextDecoration > m_htmlDecoration
current decoration for the HTML display
Definition: TextBase.hpp:435
const Color green
int32_t m_GLtexID
openGL id on the element (texture ID)
Definition: TextBase.hpp:81
etk::Color m_colorFg
display foreground color
Definition: TextBase.hpp:26
bool m_kerning
Kerning enable or disable on the next elements displayed.
Definition: TextBase.hpp:69
etk::Color m_colorCursor
The text cursor color.
Definition: TextBase.hpp:65
float m_stopTextPos
end of the alignement (when a string is too hight it cut at the word previously this virtual line and...
Definition: TextBase.hpp:73
int32_t m_GLPosition
openGL id on the element (vertex buffer)
Definition: TextBase.hpp:77
void setClippingWidth(const vec2 &_pos, const vec2 &_width)
Definition: TextBase.hpp:194
const vec3 & getPos()
get the current display position (sometime needed in the gui control)
Definition: TextBase.hpp:138