13 assert(number_of_children > 0);
15 for (
int i=0; i<m_number_of_children; i++) {
16 m_children_layouts[i] = children_layouts[i];
25 for (
int i=0; i<m_number_of_children; i++) {
26 delete m_children_layouts[i];
28 delete[] m_children_layouts;
41 totalWidth += childSize.
width();
42 if (childSize.
height() -
c->baseline() > max_under_baseline) {
43 max_under_baseline = childSize.
height() -
c->baseline() ;
45 if (
c->baseline() > max_above_baseline) {
46 max_above_baseline =
c->baseline();
49 return KDSize(totalWidth, max_under_baseline + max_above_baseline);
53 assert(index <= (
unsigned int) m_number_of_children);
54 if (index < (
unsigned int) m_number_of_children) {
55 return m_children_layouts[index];
65 for (
int i=0;i<m_number_of_children;i++) {
66 if (m_children_layouts[i] ==
child) {
73 assert(previousChild !=
nullptr);
constexpr KDCoordinate width() const
HorizontalLayout(ExpressionLayout **layouts, int number_of_children)
void render(KDContext *ctx, KDPoint p, KDColor expressionColor, KDColor backgroundColor) override
ExpressionLayout * child(uint16_t index) override
void setParent(ExpressionLayout *parent)
KDSize computeSize() override
KDPoint positionOfChild(ExpressionLayout *child) override
constexpr KDCoordinate height() const