| 266 | void Widget::initRenderer() {} |
| 267 | |
| 268 | LayoutComponent* Widget::getOrCreateLayoutComponent() |
| 269 | { |
| 270 | auto layoutComponent = this->getComponent(__LAYOUT_COMPONENT_NAME); |
| 271 | if (nullptr == layoutComponent) |
| 272 | { |
| 273 | LayoutComponent* component = LayoutComponent::create(); |
| 274 | this->addComponent(component); |
| 275 | layoutComponent = component; |
| 276 | } |
| 277 | |
| 278 | return (LayoutComponent*)layoutComponent; |
| 279 | } |
| 280 | |
| 281 | void Widget::setContentSize(const Vec2& contentSize) |
| 282 | { |
no test coverage detected