4 #ifndef tools_sg_infos_box
5 #define tools_sg_infos_box
45 static const desc_fields s_v(parent::node_desc_fields(),15,
53 font_lato_regular_ttf().c_str(),
54 font_roboto_bold_ttf().c_str(),
55 font_arial_ttf().c_str(),
56 font_arialbd_ttf().c_str(),
57 font_timesbd_ttf().c_str(),
58 font_symbol_ttf().c_str(),
59 font_stixgeneral_otf().c_str(),
60 font_helvetica_ttf().c_str(),
61 font_times_roman_ttf().c_str()
119 if(a_action.
done())
return;
128 if(a_action.
done())
return;
131 if(a_action.
done())
return;
134 if(a_action.
done())
return;
159 ,
color(colorf_black())
206 parent::operator=(a_from);
244 std::vector<std::string>::const_iterator it;
246 if((*it).size()) {empty =
false;
break;}
250 if((*it).size()) {empty =
false;
break;}
353 {
float mn_x,mn_y,mn_z;
354 float mx_x,mx_y,mx_z;
355 ltext->
get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
356 float bxh = mx_y-mn_y;
370 {
float mn_x,mn_y,mn_z;
371 float mx_x,mx_y,mx_z;
372 ltext->
get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
373 float lw = mx_x-mn_x;
374 float xtrans = (fw-lw)*0.5f;
375 float xx = -(mn_x+mx_x)*0.5F-xtrans;
376 float yy = -(mn_y+mx_y)*0.5F;
379 {
float mn_x,mn_y,mn_z;
380 float mx_x,mx_y,mx_z;
381 rtext->
get_bounds(th,mn_x,mn_y,mn_z,mx_x,mx_y,mx_z);
384 float yy = -(mn_y+mx_y)*0.5F;
400 float lmn_x,lmn_y,lmn_z;
401 float lmx_x,lmx_y,lmx_z;
402 ltext->
get_bounds(th,lmn_x,lmn_y,lmn_z,lmx_x,lmx_y,lmx_z);
403 float lw = (lmx_x<lmn_x)?0:lmx_x-lmn_x;
405 float rmn_x,rmn_y,rmn_z;
406 float rmx_x,rmx_y,rmx_z;
407 rtext->
get_bounds(th,rmn_x,rmn_y,rmn_z,rmx_x,rmx_y,rmx_z);
408 float rw = (rmx_x<rmn_x)?0:rmx_x-rmn_x;
410 float mmn_x,mmn_y,mmn_z;
411 float mmx_x,mmx_y,mmx_z;
412 mtext->
get_bounds(th,mmn_x,mmn_y,mmn_z,mmx_x,mmx_y,mmx_z);
413 float mw = (mmx_x<mmn_x)?0:mmx_x-mmn_x;
415 float winfos = lw+mw+rw;
432 ltext->
get_bounds(th,lmn_x,lmn_y,lmn_z,lmx_x,lmx_y,lmx_z);
433 float hinfos = (lmx_x<lmn_x)?0:lmx_y-lmn_y;
436 float ty = -ltext->
ascent(th)+hinfos*0.5f;
443 rtext->
get_bounds(th,rmn_x,rmn_y,rmn_z,rmx_x,rmx_y,rmx_z);
444 rw = (rmx_x<rmn_x)?0:rmx_x-rmn_x;
447 rtext->
get_bounds(th,rmn_x,rmn_y,rmn_z,rmx_x,rmx_y,rmx_z);
448 rw = (rmx_x<rmn_x)?0:rmx_x-rmn_x;
449 xx = fw*0.5F-rw*0.5F;