| 27 | |
| 28 | extern "C" |
| 29 | int 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 | } |