Update widgets module. Raster example initial.

This commit is contained in:
IlyaShurupov 2024-04-12 15:27:40 +03:00 committed by Ilya Shurupov
parent aa10424fbb
commit 90244934d9
48 changed files with 1169 additions and 530 deletions

View file

@ -0,0 +1,32 @@
#include "ChatGUI.hpp"
#include "GraphicApplication.hpp"
using namespace tp;
class ExampleGUI : public Application {
public:
ExampleGUI() = default;
void processFrame(EventHandler* eventHandler) override {
auto rec = RectF({ 0, 0 }, mWindow->getSize());
mGui.updateConfigCache(mWidgetManager);
mGui.proc(*eventHandler, rec, rec);
}
void drawFrame(Canvas* canvas) override { mGui.draw(*canvas); }
private:
WidgetManager mWidgetManager;
ComplexWidget<EventHandler, Canvas> mGui;
};
int main() {
{
ExampleGUI gui;
gui.run();
}
}