| 33 | } |
| 34 | |
| 35 | void OnWindowCmd(unsigned short cmd, Lemon::GUI::Window* win){ |
| 36 | if(cmd == IMGVIEW_OPEN){ |
| 37 | free(image.buffer); |
| 38 | if(LoadImage(Lemon::GUI::FileDialog("/"))){ |
| 39 | exit(-1); |
| 40 | } |
| 41 | sv->RemoveWidget(imgWidget); |
| 42 | delete imgWidget; |
| 43 | imgWidget = new Lemon::GUI::Bitmap({{0, 0}, {0, 0}}, &image); |
| 44 | sv->AddWidget(imgWidget); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | int main(int argc, char** argv){ |
| 49 | if(argc > 1){ |
nothing calls this directly
no test coverage detected