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

Method getChildInfo

src/ui/grid.cpp:98–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98Grid::Info Grid::getChildInfo(Widget* child) {
99 Info info;
100 for (int row=0; row<(int)m_rowstrip.size(); ++row) {
101 for (int col=0; col<(int)m_colstrip.size(); ++col) {
102 Cell* cell = m_cells[row][col];
103
104 if (cell->child == child) {
105 info.col = col;
106 info.row = row;
107 info.hspan = cell->hspan;
108 info.vspan = cell->vspan;
109 info.grid_cols = m_colstrip.size();
110 info.grid_rows = m_rowstrip.size();
111 return info;
112 }
113 }
114 }
115 return info;
116}
117
118void Grid::onResize(ResizeEvent& ev)
119{

Callers 2

onPaintMethod · 0.80
onSizeHintMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected