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

Method Create

examples/CustomWidget.cpp:19–23  ·  view source on GitHub ↗

Every widget should have a Create() method. It can take any parameters you want, but must return a Ptr.

Source from the content-addressed store, hash-verified

17 // Every widget should have a Create() method.
18 // It can take any parameters you want, but must return a Ptr.
19 static Ptr Create( const sf::String& label = L"" ) {
20 auto ptr = Ptr( new MyCustomWidget );
21 ptr->SetLabel( label );
22 return ptr;
23 }
24
25 // Every widget must have a GetName() method
26 // that returns the name of the widget type.

Callers

nothing calls this directly

Calls 1

SetLabelMethod · 0.45

Tested by

no test coverage detected