Skip to content
/ tau Public

Declarative, lightweight and easy to use UI library for C++

License

Notifications You must be signed in to change notification settings

loater69/tau

Repository files navigation

TAU

Tau is a C++ Library for UI

Dependencies

Using the Library

To start off, first create a tau::Instance.

#include <tau/tau.h>

tau::Instance instance;

Then create a simple component:

const auto component = tau::component([]() {

    return tau::view{
        .layout = { .width = 500.0f, .height = 500.0f },
        // Styling elements is done by combining different primitives, each unique combination will generate its own Fragment Shader
        .style = tau::Gradient{ .from = tau::rgb(128, 141, 143), .to = tau::rgb(47, 50, 51) } | tau::Border{ .corner_radius = 4, .width = 2, .color = tau::rgb(0, 202, 0) },
        .onClick = [](tau::element&, tau::MouseEvent&) {
            // do stuff
        }
    }();
});

After that, you can tell your instance to render the root component:

instance.render(component());

About

Declarative, lightweight and easy to use UI library for C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published