forked from NaiJi/project-kyoku
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
265 B
C++
14 lines
265 B
C++
3 years ago
|
#include "widget.h"
|
||
|
|
||
|
Widget::Widget(const std::shared_ptr<Widget>& parent) :
|
||
|
_parent(parent)
|
||
|
{
|
||
|
if (_parent)
|
||
|
_parent->addChild(shared_from_this());
|
||
|
}
|
||
|
|
||
|
void Widget::addChild(const std::shared_ptr<Widget> &child)
|
||
|
{
|
||
|
_children.emplace_back(child);
|
||
|
}
|