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

Function main

Applications/FileManager/main.cpp:29–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28extern "C"
29int main(int argc, char** argv){
30 Lemon::GUI::Window* window;
31
32 window = new Lemon::GUI::Window("Fileman", {512, 256}, WINDOW_FLAGS_RESIZABLE, Lemon::GUI::WindowType::GUI);
33
34 Lemon::GUI::FileView* fv = new Lemon::GUI::FileView({{0,0},{0,0}}, "/", OnFileOpened);
35 window->AddWidget(fv);
36 fv->SetLayout(Lemon::GUI::LayoutSize::Stretch, Lemon::GUI::LayoutSize::Stretch, Lemon::GUI::WidgetAlignment::WAlignLeft);
37
38 while(!window->closed){
39 Lemon::LemonEvent ev;
40 while(window->PollEvent(ev)){
41 window->GUIHandleEvent(ev);
42 }
43
44 window->Paint();
45
46 window->WaitEvent();
47 }
48
49 delete window;
50 return 0;
51}

Callers

nothing calls this directly

Calls 6

SetLayoutMethod · 0.80
PollEventMethod · 0.80
GUIHandleEventMethod · 0.80
WaitEventMethod · 0.80
AddWidgetMethod · 0.45
PaintMethod · 0.45

Tested by

no test coverage detected