| 198 | } |
| 199 | |
| 200 | void Viewport::HandleRequisitionChange() { |
| 201 | // A child just requested it's size. Because we are a viewport |
| 202 | // and have a virtual screen we give it everything it wants. |
| 203 | if( GetChild() ) { |
| 204 | auto new_allocation = GetChild()->GetAllocation(); |
| 205 | new_allocation.size.x = GetChild()->GetRequisition().x; |
| 206 | new_allocation.size.y = GetChild()->GetRequisition().y; |
| 207 | GetChild()->SetAllocation( new_allocation ); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | const std::string& Viewport::GetName() const { |
| 212 | static const std::string name( "Viewport" ); |
nothing calls this directly
no test coverage detected