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

Method get_selected

dlib/gui_widgets/widgets.cpp:2597–2611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2595
2596 template <typename S>
2597 unsigned long list_box<S>::
2598 get_selected (
2599 ) const
2600 {
2601 auto_mutex M(m);
2602 DLIB_ASSERT ( multiple_select_enabled() == false,
2603 "\tunsigned long list_box::get_selected()"
2604 );
2605 for (unsigned long i = 0; i < items.size(); ++i)
2606 {
2607 if (items[i].is_selected)
2608 return i;
2609 }
2610 return items.size();
2611 }
2612// ----------------------------------------------------------------------------------------
2613
2614 // making instance of template

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected