| 170 | }; |
| 171 | |
| 172 | void wf::view_interface_t::base_initialization() |
| 173 | { |
| 174 | priv->root_node = std::make_shared<view_root_node_t>(this); |
| 175 | priv->transformed_node = std::make_shared<scene::transform_manager_node_t>(); |
| 176 | priv->root_node->set_children_list({priv->transformed_node}); |
| 177 | priv->root_node->set_enabled(false); |
| 178 | |
| 179 | priv->pre_free = [=] (auto) |
| 180 | { |
| 181 | this->_clear_data(); |
| 182 | if (auto self = dynamic_cast<toplevel_view_interface_t*>(this)) |
| 183 | { |
| 184 | auto children = self->children; |
| 185 | for (auto ch : children) |
| 186 | { |
| 187 | ch->set_toplevel_parent(nullptr); |
| 188 | } |
| 189 | } |
| 190 | }; |
| 191 | |
| 192 | this->connect(&priv->pre_free); |
| 193 | } |
| 194 | |
| 195 | wf::view_interface_t::~view_interface_t() |
| 196 | { |
no test coverage detected