Lines Matching refs:child
100 UIView* child = childrenHead_; in CalValidLength() local
107 while (child != nullptr) { in CalValidLength()
108 if (child->IsVisible()) { in CalValidLength()
109 child->ReMeasure(); in CalValidLength()
111 left = child->GetStyle(STYLE_MARGIN_LEFT); in CalValidLength()
112 right = child->GetStyle(STYLE_MARGIN_RIGHT); in CalValidLength()
113 totalValidLength += (child->GetRelativeRect().GetWidth() + left + right); in CalValidLength()
115 top = child->GetStyle(STYLE_MARGIN_TOP); in CalValidLength()
116 bottom = child->GetStyle(STYLE_MARGIN_BOTTOM); in CalValidLength()
117 totalValidLength += (child->GetRelativeRect().GetHeight() + top + bottom); in CalValidLength()
121 child = child->GetNextSibling(); in CalValidLength()
127 UIView* child = childrenHead_; in CalRowCount() local
133 while (child != nullptr) { in CalRowCount()
134 if (child->IsVisible()) { in CalRowCount()
135 child->ReMeasure(); in CalRowCount()
136 left = child->GetStyle(STYLE_MARGIN_LEFT); in CalRowCount()
137 right = child->GetStyle(STYLE_MARGIN_RIGHT); in CalRowCount()
139 if ((pos + child->GetRelativeRect().GetWidth() + right) > GetWidth()) { in CalRowCount()
143 pos += child->GetRelativeRect().GetWidth() + right; in CalRowCount()
145 child = child->GetNextSibling(); in CalRowCount()
151 UIView* child = childrenHead_; in GetRowMaxHeight() local
164 while (child != nullptr) { in GetRowMaxHeight()
165 if (child->IsVisible()) { in GetRowMaxHeight()
166 left = child->GetStyle(STYLE_MARGIN_LEFT); in GetRowMaxHeight()
167 right = child->GetStyle(STYLE_MARGIN_RIGHT); in GetRowMaxHeight()
168 top = child->GetStyle(STYLE_MARGIN_TOP); in GetRowMaxHeight()
169 bottom = child->GetStyle(STYLE_MARGIN_BOTTOM); in GetRowMaxHeight()
171 if ((pos + child->GetRelativeRect().GetWidth() + right) > GetWidth()) { in GetRowMaxHeight()
177 height = MATH_MAX(height, child->GetRelativeRect().GetHeight() + top + bottom); in GetRowMaxHeight()
179 pos += child->GetRelativeRect().GetWidth() + right; in GetRowMaxHeight()
181 child = child->GetNextSibling(); in GetRowMaxHeight()
187 UIView* child = childrenHead_; in GetRowsWidth() local
199 while (child != nullptr) { in GetRowsWidth()
200 if (child->IsVisible()) { in GetRowsWidth()
201 left = child->GetStyle(STYLE_MARGIN_LEFT); in GetRowsWidth()
202 right = child->GetStyle(STYLE_MARGIN_RIGHT); in GetRowsWidth()
204 if ((pos + child->GetRelativeRect().GetWidth() + right) > GetWidth()) { in GetRowsWidth()
212 width += child->GetRelativeRect().GetWidth() + right + left; in GetRowsWidth()
216 pos += child->GetRelativeRect().GetWidth() + right; in GetRowsWidth()
218 child = child->GetNextSibling(); in GetRowsWidth()
222 …lexLayout::GetCrossAxisPosY(int16_t& posY, uint16_t& count, uint16_t* rowsMaxHeight, UIView* child) in GetCrossAxisPosY() argument
224 if ((rowsMaxHeight == nullptr) || (child == nullptr)) { in GetCrossAxisPosY()
230 int16_t top = child->GetStyle(STYLE_MARGIN_TOP); in GetCrossAxisPosY()
231 int16_t bottom = child->GetStyle(STYLE_MARGIN_BOTTOM); in GetCrossAxisPosY()
242 posY = GetHeight() - child->GetRelativeRect().GetHeight() - bottom - offset; in GetCrossAxisPosY()
251 …posY = (GetHeight() - child->GetRelativeRect().GetHeight() - top - bottom) / 2 + top + offset; // … in GetCrossAxisPosY()
257 UIView* child = childrenHead_; in LayoutHorizontal() local
285 while (child != nullptr) { in LayoutHorizontal()
286 if (child->IsVisible()) { in LayoutHorizontal()
287 int16_t left = child->GetStyle(STYLE_MARGIN_LEFT); in LayoutHorizontal()
288 int16_t right = child->GetStyle(STYLE_MARGIN_RIGHT); in LayoutHorizontal()
290 … if (((posX + child->GetRelativeRect().GetWidth() + right) > GetWidth()) && (wrap_ == WRAP)) { in LayoutHorizontal()
295 GetCrossAxisPosY(posY, count, rowsMaxHeight, child); in LayoutHorizontal()
297 child->SetPosition(GetWidth() - posX - child->GetRelativeRect().GetWidth() - right, in LayoutHorizontal()
298 posY - child->GetStyle(STYLE_MARGIN_TOP)); in LayoutHorizontal()
300 child->SetPosition(posX - left, posY - child->GetStyle(STYLE_MARGIN_TOP)); in LayoutHorizontal()
302 posX += child->GetRelativeRect().GetWidth() + right + interval; in LayoutHorizontal()
303 child->LayoutChildren(); in LayoutHorizontal()
305 child = child->GetNextSibling(); in LayoutHorizontal()
317 UIView* child = childrenHead_; in CalColumnCount() local
323 while (child != nullptr) { in CalColumnCount()
324 if (child->IsVisible()) { in CalColumnCount()
325 child->ReMeasure(); in CalColumnCount()
326 top = child->GetStyle(STYLE_MARGIN_TOP); in CalColumnCount()
327 bottom = child->GetStyle(STYLE_MARGIN_BOTTOM); in CalColumnCount()
329 if ((pos + child->GetRelativeRect().GetHeight() + bottom) > GetHeight()) { in CalColumnCount()
333 pos += child->GetRelativeRect().GetHeight() + bottom; in CalColumnCount()
335 child = child->GetNextSibling(); in CalColumnCount()
341 UIView* child = childrenHead_; in GetColumnMaxWidth() local
353 while (child != nullptr) { in GetColumnMaxWidth()
354 if (child->IsVisible()) { in GetColumnMaxWidth()
355 left = child->GetStyle(STYLE_MARGIN_LEFT); in GetColumnMaxWidth()
356 right = child->GetStyle(STYLE_MARGIN_RIGHT); in GetColumnMaxWidth()
357 bottom = child->GetStyle(STYLE_MARGIN_BOTTOM); in GetColumnMaxWidth()
359 if ((pos + child->GetRelativeRect().GetHeight() + bottom) > GetHeight()) { in GetColumnMaxWidth()
365 width = MATH_MAX(width, child->GetRelativeRect().GetWidth() + left + right); in GetColumnMaxWidth()
367 pos += child->GetRelativeRect().GetHeight() + bottom; in GetColumnMaxWidth()
369 child = child->GetNextSibling(); in GetColumnMaxWidth()
375 UIView* child = childrenHead_; in GetColumnsHeight() local
387 while (child != nullptr) { in GetColumnsHeight()
388 if (child->IsVisible()) { in GetColumnsHeight()
389 top = child->GetStyle(STYLE_MARGIN_TOP); in GetColumnsHeight()
390 bottom = child->GetStyle(STYLE_MARGIN_BOTTOM); in GetColumnsHeight()
392 if ((pos + child->GetRelativeRect().GetHeight() + bottom) > GetHeight()) { in GetColumnsHeight()
400 height += child->GetRelativeRect().GetHeight() + top + bottom; in GetColumnsHeight()
404 pos += child->GetRelativeRect().GetHeight() + bottom; in GetColumnsHeight()
406 child = child->GetNextSibling(); in GetColumnsHeight()
410 …xLayout::GetCrossAxisPosX(int16_t& posX, uint16_t& count, uint16_t* columnsMaxWidth, UIView* child) in GetCrossAxisPosX() argument
412 if ((columnsMaxWidth == nullptr) || (child == nullptr)) { in GetCrossAxisPosX()
418 int16_t left = child->GetStyle(STYLE_MARGIN_LEFT); in GetCrossAxisPosX()
419 int16_t right = child->GetStyle(STYLE_MARGIN_RIGHT); in GetCrossAxisPosX()
430 posX = GetWidth() - child->GetRelativeRect().GetWidth() - right - offset; in GetCrossAxisPosX()
439 …posX = (GetWidth() - child->GetRelativeRect().GetWidth() - left - right) / 2 + left + offset; // 2… in GetCrossAxisPosX()
445 UIView* child = childrenHead_; in LayoutVertical() local
473 while (child != nullptr) { in LayoutVertical()
474 if (child->IsVisible()) { in LayoutVertical()
475 int16_t top = child->GetStyle(STYLE_MARGIN_TOP); in LayoutVertical()
476 int16_t bottom = child->GetStyle(STYLE_MARGIN_BOTTOM); in LayoutVertical()
478 … if (((posY + child->GetRelativeRect().GetHeight() + bottom) > GetHeight()) && (wrap_ == WRAP)) { in LayoutVertical()
483 GetCrossAxisPosX(posX, count, columnsMaxWidth, child); in LayoutVertical()
485 child->SetPosition(posX - child->GetStyle(STYLE_MARGIN_LEFT), in LayoutVertical()
486 … GetHeight() - posY - child->GetRelativeRect().GetHeight() - bottom); in LayoutVertical()
488 child->SetPosition(posX - child->GetStyle(STYLE_MARGIN_LEFT), posY - top); in LayoutVertical()
490 posY += child->GetRelativeRect().GetHeight() + bottom + interval; in LayoutVertical()
491 child->LayoutChildren(); in LayoutVertical()
493 child = child->GetNextSibling(); in LayoutVertical()