MCPcopy Create free account
hub / github.com/DFHack/dfhack / get_visible_child

Function get_visible_child

library/modules/Gui.cpp:286–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286static df::widget * get_visible_child(df::widget *parent) {
287 df::widget_container *container = virtual_cast<df::widget_container>(parent);
288 if (!container)
289 return NULL;
290 for (auto child : container->children) {
291 if (widget_is_visible(child.get()))
292 return child.get();
293 }
294 return NULL;
295}
296
297static df::widget_container * get_visible_child_container(df::widget *parent) {
298 df::widget_container *container = virtual_cast<df::widget_container>(parent);

Callers 1

Calls 2

widget_is_visibleFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected