| 84 | } |
| 85 | |
| 86 | int 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 | } |