Initial commit

This commit is contained in:
2025-11-01 15:54:37 +00:00
commit a7b578636e
9 changed files with 343 additions and 0 deletions

15
example/example.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include <quip.h>
int main() {
Quip::Window window("Quip Window", 800, 600);
int buttonPresses = 0;
window.addChild("textLabel", Quip::Widget::TextLabel("Hi there!", 10, 10));
window.addChild("button", Quip::Widget::Button("Click me!", [&window, &buttonPresses]() {
auto* widget = window.getChild("textLabel");
if (widget && std::holds_alternative<Quip::Widget::TextLabel>(*widget)) {
buttonPresses++;
std::get<Quip::Widget::TextLabel>(*widget).text = "You have clicked the button " + std::to_string(buttonPresses) + " times!";
}
}, 10, 50));
return window.run();
}