#ifndef COMPOUND_WIDGET_HPP_
#define COMPOUND_WIDGET_HPP_

#include <Widget/Layout/Layout.hpp>

/**
 * @brief A widget which simply wraps another widget.
 */
class CompoundWidget : public Layout
{
public:
    /**
     * @brief Construct the compound without a child; make sure to call addChildren() afterwards.
     */
    CompoundWidget() = default;

    /**
     * @brief Construct a compound widget wrapping the specified child.
     */
    CompoundWidget(Widget *child);

    virtual void layout() override;
    virtual glm::ivec2 getMinSize() override;
    virtual void draw(GraphicsContext &context) override;
};

#endif