MCPcopy Create free account
hub / github.com/TankOs/SFGUI / HandleAdd

Method HandleAdd

src/SFGUI/ScrolledWindow.cpp:288–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288bool ScrolledWindow::HandleAdd( Widget::Ptr child ) {
289 if( GetChildren().size() > 2 ) {
290
291#if defined( SFGUI_DEBUG )
292 std::cerr << "SFGUI warning: Only one widget can be added to a ScrolledWindow.\n";
293#endif
294
295 return false;
296 }
297
298 Container::HandleAdd( child );
299
300 RecalculateContentAllocation();
301 Invalidate();
302
303 return true;
304}
305
306void ScrolledWindow::AddWithViewport( Widget::Ptr widget ) {
307 float border_width( Context::Get().GetEngine().GetProperty<float>( "BorderWidth", shared_from_this() ) );

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected