#include "StackWidget.h"

#include <iostream>

StackWidget::StackWidget()
{

}

std::unique_ptr<StackWidget> StackWidget::Create()
{
    return std::make_unique<StackWidget>();
}

void StackWidget::showChild(Widget* target)
{
    for(auto& child : mChildren)
    {
        if(child.get() == target)
        {
            child->setVisible(true);
        }
        else
        {
            child->setVisible(false);
        }
    }
}
