MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / selectChild

Method selectChild

src/ui/listbox.cpp:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void ListBox::selectChild(Widget* item)
57{
58 for (auto child : children()) {
59 if (child->isSelected()) {
60 if (item && child == item)
61 return;
62
63 child->setSelected(false);
64 }
65 }
66
67 if (item) {
68 item->setSelected(true);
69 makeChildVisible(item);
70 }
71
72 onChange();
73}
74
75void ListBox::selectIndex(int index)
76{

Callers 7

onAddUndoStateMethod · 0.80
refillListMethod · 0.80
selectStateMethod · 0.80
onSearchChangeMethod · 0.80
loadThemesMethod · 0.80
showPopupMethod · 0.80
showPopupMethod · 0.80

Calls 2

isSelectedMethod · 0.80
setSelectedMethod · 0.80

Tested by

no test coverage detected