MCPcopy Create free account
hub / github.com/davisking/dlib / set_grid_size

Method set_grid_size

dlib/gui_widgets/widgets.cpp:3822–3844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3820// ----------------------------------------------------------------------------------------
3821
3822 void text_grid::
3823 set_grid_size (
3824 unsigned long rows,
3825 unsigned long cols
3826 )
3827 {
3828 auto_mutex M(m);
3829 row_height.set_max_size(rows);
3830 row_height.set_size(rows);
3831
3832 col_width.set_max_size(cols);
3833 col_width.set_size(cols);
3834
3835 grid.set_size(rows,cols);
3836
3837 for (unsigned long i = 0; i < row_height.size(); ++i)
3838 row_height[i] = (mfont->height()*3)/2;
3839 for (unsigned long i = 0; i < col_width.size(); ++i)
3840 col_width[i] = mfont->height()*5;
3841
3842 compute_total_rect();
3843 compute_bg_rects();
3844 }
3845
3846// ----------------------------------------------------------------------------------------
3847

Callers

nothing calls this directly

Calls 4

set_max_sizeMethod · 0.80
set_sizeMethod · 0.45
sizeMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected