MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / contentBoundRect

Method contentBoundRect

source/windowing/StarScrollArea.cpp:279–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279RectI ScrollArea::contentBoundRect() const {
280 RectI res = RectI::null();
281 for (auto child : m_members) {
282 if (child == m_vBar || child == m_hBar) // scroll bars don't count
283 continue;
284 if (!child->active()) // neither do hidden members
285 continue;
286 res.combine(child->relativeBoundRect());
287 }
288 res.setMax({res.max()[0], res.max()[1] + 1});
289 return res;
290}
291
292Vec2I ScrollArea::contentSize() const {
293 return contentBoundRect().size();

Callers

nothing calls this directly

Calls 5

setMaxMethod · 0.80
activeMethod · 0.45
combineMethod · 0.45
relativeBoundRectMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected