Modules/Widgets/examples/ChatGUI.cpp
IlyaShurupov e2072d257f tmp
2024-05-03 15:09:26 +03:00

32 lines
581 B
C++

#include "ChatGUI.hpp"
#include "GraphicApplication.hpp"
using namespace tp;
class ExampleGUI : public Application {
public:
ExampleGUI() { mGui.setupConfig(mWidgetManager); }
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();
}
}