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

Function PollMenu

Applications/Shell/menu.cpp:272–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270
271static bool paint = false;
272void PollMenu(){
273 Lemon::LemonEvent ev;
274 while(menuWindow->PollEvent(ev)){
275 if(ev.event == Lemon::EventWindowCommand){
276 try{
277 auto& item = items.at(ev.windowCmd);
278 item.Open({0, 0});
279 } catch(const std::out_of_range& e){
280
281 }
282 } else {
283 menuWindow->GUIHandleEvent(ev);
284 }
285 paint = true;
286 }
287
288 if(paint){
289 menuWindow->Paint();
290 paint = false;
291 }
292}
293
294void MinimizeMenu(bool s){
295 menuWindow->Minimize(s);

Callers 1

mainFunction · 0.85

Calls 4

PollEventMethod · 0.80
GUIHandleEventMethod · 0.80
OpenMethod · 0.45
PaintMethod · 0.45

Tested by

no test coverage detected