MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / RemoveWidget

Method RemoveWidget

LibLemon/src/gui/widgets.cpp:102–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 void Container::RemoveWidget(Widget* w){
103 w->SetParent(nullptr);
104 w->window = nullptr;
105
106 if(active == w) active = nullptr;
107
108 children.erase(std::remove(children.begin(), children.end(), w), children.end());
109 }
110
111 void Container::Paint(surface_t* surface){
112 if(background.a == 255) Graphics::DrawRect(fixedBounds, background, surface);

Callers

nothing calls this directly

Calls 3

SetParentMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected