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

Function main

Applications/Run/main.cpp:86–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86int main(int argc, char** argv){
87 window = new Lemon::GUI::Window("Run...", {200, 78}, 0, Lemon::GUI::WindowType::GUI);
88
89 textbox = new Lemon::GUI::TextBox({10, 10, 10, 24}, false);
90 textbox->SetLayout(Lemon::GUI::LayoutSize::Stretch, Lemon::GUI::LayoutSize::Fixed);
91 textbox->OnSubmit = OnSubmit;
92
93 okButton = new Lemon::GUI::Button("OK", {10, 44, 100, 24});
94 okButton->OnPress = OnPress;
95
96 window->AddWidget(textbox);
97 window->AddWidget(okButton);
98
99 while(!window->closed){
100 Lemon::LemonEvent ev;
101 while(window->PollEvent(ev)){
102 window->GUIHandleEvent(ev);
103 }
104
105 window->Paint();
106 window->WaitEvent();
107 }
108
109 return 0;
110}

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