A lightweight C++17 UI library for Windows and Linux, using SDL2 as the renderer.
- Widgets:
- Panel
- Button
- Text
- Images
- Label
- Progress Bar
- Imageview
- TreeView (experimental)
- Input-Field (experimental)
- Status Bar
- Standard-Dialogs
- Open-File-Dialog
- Save-File-Dialog
- Platforms:
- Windows
- Linux
# Configure and build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config ReleaseYou can check out samples at Samples-Section
#include <iostream>
#include "widgets.h"
using namespace tinyui;
static int onQuit(unsigned int id, void *data) {
auto *ctx = static_cast<Context*>(data);
ctx->mRequestShutdown = true;
return ResultOk;
}
int main() {
Context *ctx = Context::create("Sample", TinyUi::getDefaultStyle());
if (ctx == nullptr) {
return -1;
}
TinyUi::initScreen(20, 20, 1024, 768);
// This is my parent panel
const auto parentPanel = Widgets::panel(ctx, WidgetHandle::getRootHandle(), "Dialog", 90, 5, 120, 300, nullptr);
// And these are my two children wisgets
Widgets::label(ctx, parentPanel, "Title", 100, 10, 100, 20, Alignment::Center);
Widgets::button(ctx, parentPanel, "Quit", nullptr, 100, 50, 100, 40, &onQuit);
// My render loop
while (TinyUi::run()) {
TinyUi::render();
}
TinyUi::release();
return 0;
}./bin/release/tiny_ui_sample.exe # Windows
./bin/tiny_ui_sample # Linux- Checkboxes
- Dategrid
- Selection-Boxes
- Tabs
- Togglebuttons
- Layouter
- Engine Integration
- Tutorials
- Website

