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

Method adjust_position

dlib/gui_widgets/widgets.cpp:3767–3778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3765// ----------------------------------------------------------------------------------------
3766
3767 void menu_bar::
3768 adjust_position (
3769 )
3770 {
3771 unsigned long width, height;
3772 rectangle old(rect);
3773 parent.get_size(width,height);
3774 rect.set_left(0);
3775 rect.set_top(0);
3776 rect = resize_rect(rect,width,mfont->height()+10);
3777 parent.invalidate_rectangle(old+rect);
3778 }
3779
3780// ----------------------------------------------------------------------------------------
3781// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

resize_rectFunction · 0.85
set_leftMethod · 0.80
set_topMethod · 0.80
heightMethod · 0.45

Tested by

no test coverage detected