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

Method need_v_scroll

dlib/gui_widgets/base_widgets.cpp:3102–3120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3100// ----------------------------------------------------------------------------------------
3101
3102 bool scrollable_region::
3103 need_v_scroll (
3104 ) const
3105 {
3106 if (total_rect_.height() > rect.height()-style->get_border_size()*2)
3107 {
3108 return true;
3109 }
3110 else
3111 {
3112 // check if we would need a horizontal scroll bar and if adding one would make us need
3113 // a vertical_scroll_pos one
3114 if (total_rect_.width() > rect.width()-style->get_border_size()*2 &&
3115 total_rect_.height() > rect.height()-style->get_border_size()*2-hsb.height())
3116 return true;
3117 else
3118 return false;
3119 }
3120 }
3121
3122// ----------------------------------------------------------------------------------------
3123

Callers

nothing calls this directly

Calls 3

heightMethod · 0.45
get_border_sizeMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected