LibraryViewer

This commit is contained in:
IlyaShurupov 2023-11-28 23:22:04 +03:00 committed by Ilya Shurupov
parent f6ba86aff8
commit dd71eba0ec
24 changed files with 226111 additions and 36 deletions

View file

@ -0,0 +1,46 @@
#include "NewPlacement.hpp"
#include "LibraryGui.hpp"
// events
// animations
// monitor resource usage
// sorting
void runApp() {
Library library;
library.loadJson("library/Library.json");
auto gui = LibraryWidget<tp::Window::Events, tp::Graphics::Canvas>(&library);
auto window = tp::Window::createWindow(800, 600, "Window 1");
if (window) {
while (!window->shouldClose()) {
window->processEvents();
auto area = window->getCanvas().getAvaliableArea();
gui.proc(window->getEvents(), {}, { area.x, area.y, area.z, area.w });
gui.draw(window->getCanvas(), {}, { area.x, area.y, area.z, area.w });
window->draw();
}
}
tp::Window::destroyWindow(window);
}
int main() {
tp::ModuleManifest* deps[] = { &tp::gModuleLibraryViewer, nullptr };
tp::ModuleManifest binModule("LibViewEntry", nullptr, nullptr, deps);
if (!binModule.initialize()) {
return 1;
}
runApp();
binModule.deinitialize();
}

Binary file not shown.