g4tools  5.4.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
tools::sg::text Class Reference
Inheritance diagram for tools::sg::text:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::text:
Collaboration graph
[legend]

Public Member Functions

virtual const desc_fieldsnode_desc_fields () const
 
virtual void render (render_action &a_action)
 
virtual void pick (pick_action &a_action)
 
virtual void search (search_action &a_action)
 
virtual void bbox (bbox_action &a_action)
 
 text (const base_freetype &a_ttf)
 
virtual ~text ()
 
 text (const text &a_from)
 
textoperator= (const text &a_from)
 
float text_height () const
 
bool is_empty () const
 
const separatorcontainer () const
 
void update_sg ()
 
- Public Member Functions inherited from tools::sg::back_area
 back_area ()
 
virtual ~back_area ()
 
 back_area (const back_area &a_from)
 
back_areaoperator= (const back_area &a_from)
 
- Public Member Functions inherited from tools::sg::node
virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const =0
 
virtual nodecopy () const =0
 
virtual unsigned int cls_version () const
 
virtual void get_matrix (get_matrix_action &a_action)
 
virtual bool write (write_action &a_action)
 
virtual void event (event_action &)
 
virtual bool read (read_action &a_action)
 
virtual void is_visible (visible_action &)
 
virtual void protocol_one_fields (std::vector< field * > &a_fields) const
 
virtual bool draw_in_frame_buffer () const
 
virtual bool touched ()
 
virtual void reset_touched ()
 
 node ()
 
virtual ~node ()
 
void touch ()
 
fieldfield_from_desc (const field_desc &a_desc) const
 
void dump_field_descs (std::ostream &a_out) const
 
fieldfind_field_by_name (const std::string &a_name) const
 

Public Attributes

mf_string strings
 
sf< bool > confine
 
sf_vec< colorf, float > color
 
sf_string font
 
sf_enum< sg::font_modelingfont_modeling
 
sf_string encoding
 
sf< float > line_width
 
sf_enum< winding_typefront_face
 
sf< bool > back_visible
 
sf< bool > enforce_front_height
 
sf< float > front_height
 
sf< bool > enforce_front_width
 
sf< float > front_width
 
sf< float > wmargin_factor
 
sf< float > hmargin_factor
 
sf_enum< sg::hjusthjust
 
sf_enum< sg::vjustvjust
 
- Public Attributes inherited from tools::sg::back_area
sf< float > width
 
sf< float > height
 
sf_vec< colorf, float > color
 
sf< bool > gradient
 
sf_vec< colorf, float > color_top
 
sf< bool > border_visible
 
sf_vec< colorf, float > border_color
 
sf< float > border_line_width
 
sf< float > shadow
 
sf< float > corner_radius
 
sf< unsigned int > corner_steps
 
sf< unsigned int > corner_mask
 

Protected Attributes

separator m_sep
 
base_textm_base_text
 
base_freetypem_TT_text
 
- Protected Attributes inherited from tools::sg::back_area
separator m_back_sep
 

Additional Inherited Members

- Static Public Member Functions inherited from tools::sg::back_area
static unsigned int corner_top_right ()
 
static unsigned int corner_top_left ()
 
static unsigned int corner_bottom_right ()
 
static unsigned int corner_bottom_left ()
 
static unsigned int corner_all ()
 
- Protected Member Functions inherited from tools::sg::back_area
void update_sg ()
 
- Protected Member Functions inherited from tools::sg::node
 node (const node &)
 
nodeoperator= (const node &)
 
void add_field (field *a_field)
 
bool write_fields (write_action &a_action)
 
bool read_fields (read_action &a_action)
 
field_desc::offset_t field_offset (const field *a_field) const
 
fieldfind_field (const field_desc &a_rdesc) const
 
void check_fields (std::ostream &a_out) const
 

Detailed Description

Definition at line 25 of file text.

Constructor & Destructor Documentation

◆ text() [1/2]

tools::sg::text::text ( const base_freetype a_ttf)
inline

Definition at line 177 of file text.

178  :parent()
179  ,strings()
180  ,confine(false)
181 
182  ,color(colorf_black())
183  ,font(font_hershey())
186  ,line_width(1)
188 
189  ,back_visible(true)
190 
191  ,enforce_front_height(false)
192  ,front_height(1)
193  ,enforce_front_width(false)
194  ,front_width(1)
195 
196  ,wmargin_factor(0.9f)
197  ,hmargin_factor(0.9f)
198  ,hjust(left) // same default as base_text.
199  ,vjust(middle) // not same default as base_text (which is bottom). We take middle for backcomp of confined text.
200  // Note that text_hershey, text_freetype is (left,bottom) justified.
201 
202  ,m_base_text(0)
204  {
205  add_fields();
206  }

◆ ~text()

virtual tools::sg::text::~text ( )
inlinevirtual

Definition at line 207 of file text.

207  {
208  delete m_TT_text;
209  }

◆ text() [2/2]

tools::sg::text::text ( const text a_from)
inline

Definition at line 211 of file text.

212  :parent(a_from)
213  ,strings(a_from.strings)
214  ,confine(a_from.confine)
215 
216  ,color(a_from.color)
217  ,font(a_from.font)
218  ,font_modeling(a_from.font_modeling)
219  ,encoding(a_from.encoding)
220  ,line_width(a_from.line_width)
221  ,front_face(a_from.front_face)
222 
223  ,back_visible(a_from.back_visible)
224 
225  ,enforce_front_height(a_from.enforce_front_height)
226  ,front_height(a_from.front_height)
227  ,enforce_front_width(a_from.enforce_front_width)
228  ,front_width(a_from.front_width)
229 
230  ,wmargin_factor(a_from.wmargin_factor)
231  ,hmargin_factor(a_from.hmargin_factor)
232  ,hjust(a_from.hjust)
233  ,vjust(a_from.vjust)
234 
235  ,m_base_text(0)
236  ,m_TT_text(base_freetype::create(*a_from.m_TT_text))
237  {
238  add_fields();
239  }

Member Function Documentation

◆ bbox()

virtual void tools::sg::text::bbox ( bbox_action a_action)
inlinevirtual

Reimplemented from tools::sg::node.

Definition at line 168 of file text.

168  {
169  if(touched()) {
170  update_sg();
171  reset_touched();
172  }
173  if(back_visible.value()) m_back_sep.bbox(a_action);
174  m_sep.bbox(a_action);
175  }

◆ container()

const separator& tools::sg::text::container ( ) const
inline

Definition at line 301 of file text.

301 {return m_back_sep;} //must be consistent with pick().

◆ is_empty()

bool tools::sg::text::is_empty ( ) const
inline

Definition at line 293 of file text.

293  {
294  tools_vforcit(std::string,strings.values(),it) {
295  const std::string& line = *it;
296  if(line.size()) return false;
297  }
298  return true;
299  }

◆ node_desc_fields()

virtual const desc_fields& tools::sg::text::node_desc_fields ( ) const
inlinevirtual

Reimplemented from tools::sg::back_area.

Definition at line 51 of file text.

51  {
53  static const desc_fields s_v(parent::node_desc_fields(),17, //WARNING : have the right count.
56 
58 
60  font_hershey().c_str(),
61  font_lato_regular_ttf().c_str(),
62  font_roboto_bold_ttf().c_str(),
63  font_arial_ttf().c_str(),
64  font_arialbd_ttf().c_str(),
65  font_timesbd_ttf().c_str(),
66  font_symbol_ttf().c_str(),
67  font_stixgeneral_otf().c_str(),
68  font_helvetica_ttf().c_str(),
69  font_times_roman_ttf().c_str()
71 
77 
80 
85 
87 
94 
100 
106  );
107  return s_v;
108  }

◆ operator=()

text& tools::sg::text::operator= ( const text a_from)
inline

Definition at line 240 of file text.

240  {
241  parent::operator=(a_from);
242  if(&a_from==this) return *this;
243 
244  strings = a_from.strings;
245  confine = a_from.confine;
246 
247  color = a_from.color;
248  font = a_from.font;
249  font_modeling = a_from.font_modeling;
250  encoding = a_from.encoding;
251  line_width = a_from.line_width;
252  front_face = a_from.front_face;
253 
254  back_visible = a_from.back_visible;
255 
256  enforce_front_height = a_from.enforce_front_height;
257  front_height = a_from.front_height;
258  enforce_front_width = a_from.enforce_front_width;
259  front_width = a_from.front_width;
260 
261  wmargin_factor = a_from.wmargin_factor;
262  hmargin_factor = a_from.hmargin_factor;
263  hjust = a_from.hjust;
264  vjust = a_from.vjust;
265 
266  m_base_text = 0;
267 
268  //delete m_TT_text;
269  //m_TT_text = base_freetype::create(*a_from.m_TT_text);
270 
271  return *this;
272  }

◆ pick()

virtual void tools::sg::text::pick ( pick_action a_action)
inlinevirtual

Reimplemented from tools::sg::back_area.

Definition at line 142 of file text.

142  {
143  if(touched()) {
144  update_sg();
145  reset_touched();
146  }
147  if(back_visible.value()) {
148  nodekit_pick(a_action,m_back_sep,this);
149  }
150  //m_sep.pick(a_action);
151  }

◆ render()

virtual void tools::sg::text::render ( render_action a_action)
inlinevirtual

Reimplemented from tools::sg::back_area.

Definition at line 134 of file text.

134  {
135  if(touched()) {
136  update_sg();
137  reset_touched();
138  }
139  if(back_visible.value()) m_back_sep.render(a_action);
140  m_sep.render(a_action);
141  }

◆ search()

virtual void tools::sg::text::search ( search_action a_action)
inlinevirtual

Reimplemented from tools::sg::back_area.

Definition at line 152 of file text.

152  {
153  if(touched()) {
154  update_sg();
155  reset_touched();
156  }
157  parent::search(a_action);
158  if(a_action.done()) return;
159  if(a_action.do_path()) a_action.path_push(this);
160  if(back_visible.value()) {
161  m_back_sep.search(a_action);
162  if(a_action.done()) return;
163  }
164  m_sep.search(a_action);
165  if(a_action.done()) return;
166  if(a_action.do_path()) a_action.path_pop();
167  }

◆ text_height()

float tools::sg::text::text_height ( ) const
inline

Definition at line 274 of file text.

274  {
275  if(!m_base_text) return 0;
276  return m_base_text->height;
277  }

◆ update_sg()

void tools::sg::text::update_sg ( )
inline

Definition at line 303 of file text.

303  {
304  parent::update_sg();
305 
306  m_sep.clear();
307  m_base_text = 0;
308 
309  if(width.value()<=0) return;
310  if(height.value()<=0) return;
311  if(is_empty()) return;
312 
313  rgba* mat = new rgba();
314  mat->color = color;
315  m_sep.add(mat);
316 
317  matrix* tsf = new matrix;
318  m_sep.add(tsf);
319 
320  float fw = width * wmargin_factor;
321  float fh = height * hmargin_factor;
322 
323  //sf<float> zfront ?
324  float zz = back_visible.value()?0.01f:0;
325 
326  if(font==font_hershey()) {
327 
328  draw_style* ds = new draw_style;
329  ds->style = draw_lines;
330  ds->line_width = line_width;
331  m_sep.add(ds);
332 
333  text_hershey* _text = new text_hershey;
334  m_base_text = _text;
335  _text->encoding = encoding;
336  _text->strings = strings;
337  m_sep.add(_text);
338 
339  } else {
340 
342  //ttf/arialbd 11
343  //01234567890
344  m_TT_text->font = font;
347 
348  //_text->modeling.value(font_outline);
349 
350  m_sep.add(new noderef(*m_TT_text));
351 
352  }
353 
355 
357 
358  float mn_x,mn_y,mn_z;
359  float mx_x,mx_y,mx_z;
360  m_base_text->get_bounds(front_height,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
361 
362  float bxw = mx_x-mn_x;
363  float xtrans = 0;
364  if(hjust==center) {
365  xtrans = 0;
366  } else if(hjust==left) {
367  xtrans = -fw*0.5f+bxw*0.5f;
368  } else if(hjust==right) {
369  xtrans = fw*0.5f-bxw*0.5f;
370  }
371 
372  float bxh = mx_y-mn_y;
373  float ytrans = 0;
374  if(vjust==middle) {
375  ytrans = 0;
376  } else if(vjust==bottom) {
377  ytrans = -fh*0.5f+bxh*0.5f;
378  } else if(vjust==top) {
379  ytrans = fh*0.5f-bxh*0.5f;
380  }
381 
382  float xx = -(mn_x+mx_x)*0.5F+xtrans;
383  float yy = -(mn_y+mx_y)*0.5F+ytrans;
384  tsf->set_translate(xx,yy,zz);
385 
386  return;
387  }
388 
389  if(enforce_front_width) {
390 
391  float th = fh;
392  float mn_x,mn_y,mn_z;
393  float mx_x,mx_y,mx_z;
394  m_base_text->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
395  float bxw = mx_x-mn_x;
396 
397  // adjust box width :
398  // th -> bxw then to have front_width:
399  if(bxw>0) {
400  th = th*front_width/bxw;
401  m_base_text->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
402  }
403 
404  bxw = mx_x-mn_x;
405  float xtrans = 0;
406  if(hjust==center) {
407  xtrans = 0;
408  } else if(hjust==left) {
409  xtrans = -fw*0.5f+bxw*0.5f;
410  } else if(hjust==right) {
411  xtrans = fw*0.5f-bxw*0.5f;
412  }
413 
414  float bxh = mx_y-mn_y;
415  float ytrans = 0;
416  if(vjust==middle) {
417  ytrans = 0;
418  } else if(vjust==bottom) {
419  ytrans = -fh*0.5f+bxh*0.5f;
420  } else if(vjust==top) {
421  ytrans = fh*0.5f-bxw*0.5f;
422  }
423 
424  float xx = -(mn_x+mx_x)*0.5F+xtrans;
425  float yy = -(mn_y+mx_y)*0.5F+ytrans;
426  tsf->set_translate(xx,yy,zz);
427 
428  m_base_text->height = bxh; //=th?
429 
430  return;
431  }
432 
433  //various automatic text height strategies :
434 
435  if(confine) {
436  // code common to freetype and hershey :
437 
438  // try to adjust text within fw x fh (by attempting to be smart !).
439  // the below assumes that text bounds are linear according
440  // "text height".
441  {float mn_x,mn_y,mn_z;
442  float mx_x,mx_y,mx_z;
443 
444  float th = fh;
445  m_base_text->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
446  float bxh = mx_y-mn_y;
447  // adjust box height :
448  // fh -> bxh then to have fh :
449  if(bxh>0) {
450  th = fh*fh/bxh;
451  m_base_text->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
452  }
453 
454  //float bxw = box.mx()[0]-box.mn()[0];
455  float bxw = mx_x-mn_x;
456  bxh = mx_y-mn_y;
457  if((fh>0)&&(bxh>0)){
458  float fasp = fw/fh;
459  float basp = bxw/bxh;
460  if(fasp>=basp) {
461  } else {
462  // adjust box width :
463  // th -> bxw then to have fw :
464  if(bxw>0) {
465  th = th*fw/bxw;
466  m_base_text->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
467  }
468  }
469  }
470 
471  m_base_text->height = th;
472 
473  //bxw = box.mx()[0]-box.mn()[0];
474  bxw = mx_x-mn_x;
475  float xtrans = 0;
476  if(hjust==center) {
477  xtrans = 0;
478  } else if(hjust==left) {
479  xtrans = -fw*0.5f+bxw*0.5f;
480  } else if(hjust==right) {
481  xtrans = fw*0.5f-bxw*0.5f;
482  }
483 
484  bxh = mx_y-mn_y;
485  float ytrans = 0;
486  if(vjust==middle) {
487  ytrans = 0;
488  } else if(vjust==bottom) {
489  ytrans = -fh*0.5f+bxh*0.5f;
490  } else if(vjust==top) {
491  ytrans = fh*0.5f-bxw*0.5f;
492  }
493 
494  float xx = -(mn_x+mx_x)*0.5F+xtrans;
495  float yy = -(mn_y+mx_y)*0.5F+ytrans;
496 
497  tsf->set_translate(xx,yy,zz);
498 
499  }
500 
501  } else {
502 
503  // we arrange yy so that two aside texts
504  // with same height will have their text base lines aligned.
505  // The max height is given by ascent+descent (with descent>0).
506  float th = fh;
507 
508  float mxh = m_base_text->ascent(th)+
509  m_base_text->y_advance(th)*(strings.size()-1)+
510  m_base_text->descent(th);
511 
512  //{box3f box;
513  // m_base_text->get_bounds(th,box);
514  // float bxh = box.mx()[1]-box.mn()[1]; //should be idem mxh.
515  // mxh = bxh;}
516 
517  if(mxh) th = fh*fh/mxh; //end/final height.
518 
519  m_base_text->height = th; //then all chars will fit into th.
520 
521  mxh = m_base_text->ascent(th)+
522  m_base_text->y_advance(th)*(strings.size()-1)+
523  m_base_text->descent(th);
524 
525  float yy = -fh*0.5f+m_base_text->descent(th)+
526  m_base_text->y_advance(th)*(strings.size()-1);
527 
528  //float xx = -fw*0.5F; //left justified.
529  //tsf->set_translate(xx,yy,zz);
530  {float mn_x,mn_y,mn_z;
531  float mx_x,mx_y,mx_z;
532  m_base_text->get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
533 
534  float bxw = mx_x-mn_x;
535  float xtrans = 0;
536  if(hjust==center) {
537  xtrans = 0;
538  } else if(hjust==left) {
539  xtrans = -fw*0.5f+bxw*0.5f;
540  } else if(hjust==right) {
541  xtrans = fw*0.5f-bxw*0.5f;
542  }
543 /*
544  float bxh = mx_y-mn_y;
545  float ytrans = 0;
546  if(vjust==middle) {
547  ytrans = 0;
548  } else if(vjust==bottom) {
549  ytrans = -fh*0.5f+bxh*0.5f;
550  } else if(vjust==top) {
551  ytrans = fh*0.5f-bxw*0.5f;
552  }
553 */
554  float xx = -(mn_x+mx_x)*0.5F+xtrans;
555  tsf->set_translate(xx,yy,zz);}
556 
557  // truncate text at right if out of border :
558  {std::vector<std::string> labcut;
559  tools_vforcit(std::string,strings.values(),it) {
560  std::string scut;
561  m_base_text->truncate(*it,th,fw,scut);
562  labcut.push_back(scut);
563  }
564  m_base_text->strings = labcut;}
565  }
566  }

Member Data Documentation

◆ back_visible

sf<bool> tools::sg::text::back_visible

Definition at line 39 of file text.

◆ color

sf_vec<colorf,float> tools::sg::text::color

Definition at line 31 of file text.

◆ confine

sf<bool> tools::sg::text::confine

Definition at line 29 of file text.

◆ encoding

sf_string tools::sg::text::encoding

Definition at line 35 of file text.

◆ enforce_front_height

sf<bool> tools::sg::text::enforce_front_height

Definition at line 41 of file text.

◆ enforce_front_width

sf<bool> tools::sg::text::enforce_front_width

Definition at line 43 of file text.

◆ font

sf_string tools::sg::text::font

Definition at line 32 of file text.

◆ font_modeling

sf_enum<sg::font_modeling> tools::sg::text::font_modeling

Definition at line 33 of file text.

◆ front_face

sf_enum<winding_type> tools::sg::text::front_face

Definition at line 37 of file text.

◆ front_height

sf<float> tools::sg::text::front_height

Definition at line 42 of file text.

◆ front_width

sf<float> tools::sg::text::front_width

Definition at line 44 of file text.

◆ hjust

sf_enum<sg::hjust> tools::sg::text::hjust

Definition at line 48 of file text.

◆ hmargin_factor

sf<float> tools::sg::text::hmargin_factor

Definition at line 47 of file text.

◆ line_width

sf<float> tools::sg::text::line_width

Definition at line 36 of file text.

◆ m_base_text

base_text* tools::sg::text::m_base_text
protected

Definition at line 570 of file text.

◆ m_sep

separator tools::sg::text::m_sep
protected

Definition at line 569 of file text.

◆ m_TT_text

base_freetype* tools::sg::text::m_TT_text
protected

Definition at line 571 of file text.

◆ strings

mf_string tools::sg::text::strings

Definition at line 28 of file text.

◆ vjust

sf_enum<sg::vjust> tools::sg::text::vjust

Definition at line 49 of file text.

◆ wmargin_factor

sf<float> tools::sg::text::wmargin_factor

Definition at line 46 of file text.


The documentation for this class was generated from the following file:
tools::sg::text::vjust
sf_enum< sg::vjust > vjust
Definition: text:49
tools::sg::text::confine
sf< bool > confine
Definition: text:29
tools::sg::font_pixmap
@ font_pixmap
Definition: enums:94
tools::sg::group::search
virtual void search(search_action &a_action)
Definition: group:51
tools::sg::base_text::truncate
virtual bool truncate(const std::string &, float, float, std::string &) const =0
tools::sg::winding_ccw
@ winding_ccw
Definition: enums:105
TOOLS_ARG_FIELD_DESC_ENUMS_BEG
#define TOOLS_ARG_FIELD_DESC_ENUMS_BEG(a__field, a__num)
Definition: field:77
tools::sg::base_text::height
sf< float > height
Definition: base_text:30
tools::sg::text::font
sf_string font
Definition: text:32
tools::sg::base_freetype::modeling
sf_enum< font_modeling > modeling
Definition: base_freetype:21
tools::sg::text::m_TT_text
base_freetype * m_TT_text
Definition: text:571
tools::sg::encoding_PAW
const std::string & encoding_PAW()
Definition: strings:42
tools::sg::text
Definition: text:25
tools::sg::back_area::m_back_sep
separator m_back_sep
Definition: back_area:438
tools::sg::right
@ right
Definition: enums:76
tools::sg::base_text::descent
virtual float descent(float) const =0
tools::sg::base_text::get_bounds
virtual void get_bounds(float, float &, float &, float &, float &, float &, float &) const =0
tools::sg::text::color
sf_vec< colorf, float > color
Definition: text:31
tools::sg::text::strings
mf_string strings
Definition: text:28
tools::sg::base_text::ascent
virtual float ascent(float) const =0
tools::sg::top
@ top
Definition: enums:82
tools::sg::winding_cw
@ winding_cw
Definition: enums:106
tools::sg::text::hmargin_factor
sf< float > hmargin_factor
Definition: text:47
tools::sg::bmf::values
const std::vector< T > & values() const
Definition: bmf:71
tools::sg::separator::bbox
virtual void bbox(bbox_action &a_action)
Definition: separator:38
tools::sg::nodekit_pick
void nodekit_pick(pick_action &a_action, node &a_sg, node *a_node)
Definition: nodekit:13
tools::sg::text::enforce_front_width
sf< bool > enforce_front_width
Definition: text:43
tools::sg::text::m_base_text
base_text * m_base_text
Definition: text:570
tools::sg::left
@ left
Definition: enums:74
tools::sg::group::add
void add(node *a_node)
Definition: group:96
tools::sg::text::line_width
sf< float > line_width
Definition: text:36
tools::sg::base_freetype::font
sf_string font
Definition: base_freetype:19
tools::sg::text::update_sg
void update_sg()
Definition: text:303
tools::sg::text::font_modeling
sf_enum< sg::font_modeling > font_modeling
Definition: text:33
tools::sg::font_outline
@ font_outline
Definition: enums:92
TOOLS_ARG_FIELD_DESC_OPTS_BEG
#define TOOLS_ARG_FIELD_DESC_OPTS_BEG(a__field, a__num)
Definition: field:87
tools::sg::text::front_face
sf_enum< winding_type > front_face
Definition: text:37
tools::sg::back_area::height
sf< float > height
Definition: back_area:31
tools::sg::bottom
@ bottom
Definition: enums:80
TOOLS_ARG_FIELD_DESC_OPTS_END
#define TOOLS_ARG_FIELD_DESC_OPTS_END
Definition: field:89
tools::sg::middle
@ middle
Definition: enums:81
tools::sg::separator::render
virtual void render(render_action &a_action)
Definition: separator:18
tools::sg::base_freetype::create
static base_freetype * create(const base_freetype &a_ttf)
Definition: base_freetype:108
tools::sg::text::m_sep
separator m_sep
Definition: text:569
tools::sg::text::enforce_front_height
sf< bool > enforce_front_height
Definition: text:41
tools::sg::base_text::y_advance
virtual float y_advance(float) const =0
tools::sg::base_text::strings
mf_string strings
Definition: base_text:29
TOOLS_FIELD_DESC_NODE_CLASS
#define TOOLS_FIELD_DESC_NODE_CLASS(a__class)
Definition: field:68
tools::sg::text::hjust
sf_enum< sg::hjust > hjust
Definition: text:48
tools::sg::text::front_height
sf< float > front_height
Definition: text:42
TOOLS_ARG_ENUM
#define TOOLS_ARG_ENUM(a__value)
Definition: field:85
tools::sg::group::clear
void clear()
Definition: group:235
tools::sg::text::is_empty
bool is_empty() const
Definition: text:293
tools::sg::bsf::value
T & value()
Definition: bsf:98
tools::sg::bmf::size
size_t size() const
Definition: bmf:69
tools::sg::font_hershey
const std::string & font_hershey()
Definition: strings:186
tools::sg::back_area::width
sf< float > width
Definition: back_area:30
tools::sg::center
@ center
Definition: enums:75
tools_vforcit
#define tools_vforcit(a__T, a__v, a__it)
Definition: forit:7
tools::sg::text::front_width
sf< float > front_width
Definition: text:44
tools::sg::font_filled
@ font_filled
Definition: enums:93
tools::sg::text::encoding
sf_string encoding
Definition: text:35
tools::sg::text::back_visible
sf< bool > back_visible
Definition: text:39
tools::sg::draw_lines
@ draw_lines
Definition: enums:192
tools::sg::node::touched
virtual bool touched()
Definition: node:96
TOOLS_ARG_FIELD_DESC
#define TOOLS_ARG_FIELD_DESC(a__field)
Definition: field:71
tools::sg::text::wmargin_factor
sf< float > wmargin_factor
Definition: text:46
tools::sg::node::reset_touched
virtual void reset_touched()
Definition: node:102
TOOLS_ARG_FIELD_DESC_ENUMS_END
#define TOOLS_ARG_FIELD_DESC_ENUMS_END
Definition: field:83