MCPcopy Create free account
hub / github.com/DISTRHO/DPF / setAbsolutePos

Method setAbsolutePos

dgl/src/Layout.cpp:29–45  ·  view source on GitHub ↗

horizontal

Source from the content-addressed store, hash-verified

27
28template<> // horizontal
29uint Layout<true>::setAbsolutePos(int x, int y, const uint padding)
30{
31 uint maxHeight = 0;
32 y += padding;
33 x += padding;
34
35 for (SubWidgetWithSizeHintIterator it=widgets.begin(), end=widgets.end(); it != end; ++it)
36 {
37 SubWidgetWithSizeHint& s(*it);
38 maxHeight = std::max(maxHeight, s.widget->getHeight());
39 s.widget->setAbsolutePos(x, y);
40 x += static_cast<int>(s.widget->getWidth());
41 x += static_cast<int>(padding);
42 }
43
44 return maxHeight;
45}
46
47template<> // vertical
48uint Layout<false>::setAbsolutePos(int x, int y, const uint padding)

Callers 6

DemoWindowMethod · 0.45
CairoExampleUIMethod · 0.45
onResizeMethod · 0.45
setupButtonFunction · 0.45
onResizeFunction · 0.45

Calls 2

getHeightMethod · 0.45
getWidthMethod · 0.45

Tested by

no test coverage detected