Git Product home page Git Product logo

uxx's Introduction

uxx

An user friendly GUI library for C++ made for quick and easy GUI application prototyping.

Features

  • Immediate mode rendering.
  • Window management and GUI controls (e.g. buttons, menus, tabs).
  • Custom graphics.
  • Video rendering.

Examples

In order to create an application window, simply include uxx.hpp and create your application runner:

#include <uxx/uxx.h>

int main() {
    uxx::app app;
    return app.run("My App", [](uxx::screen& screen) {
        // Now you got a screen to work with...
    });
}

The app.run() method is your application rendering loop that will be called until the user close the application. You can use the screen object to render windows:

screen.window("My window", [](uxx::pane& my_window) {
    if (my_window.button("Press me")) {
        std::puts("Hello, world!");
    }
});

Even rendering video is made easy:

screen.window("Video player", [](uxx::pane& my_window) {
    static uxx::video video;

    if (not video.is_loaded()) {
        try {
            video.load_from_disk("/path/to/video.mp4");
            video.play();
        } catch (const std::exception& ex) {
            std::puts(ex.what());
        }
    }
    my_window.draw_video(video);
});

Screenshot

The below screenshot is rendered by the uxx_graphics_demo target provided by the project (see under examples/).

Build

Requirements

OS Build tool Compilers Status
Linux cmake >= 3.15 g++ >= 10.1

clang++ >= 10.0
Build Status
Windows cmake >= 3.15 msvc >= 19.26 AppVeyor Build status

Dependencies

  • OpenGL
  • SFML >= 2.5.1
  • LibVLC >= 3.0

NOTE For Windows the SFML and LibVLC libraries are automatically downloaded by cmake.

Instructions

$ cd uxx/
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .

Build flags

The following flags are optional with the cmake command.

  • -DDISABLE_EXAMPLES - Don't build examples.
  • -DDISABLE_TESTS - Don't build unit tests.

Status

Unstable API that will change. In general a lot of features implemented and working, but API interface is un-finished, and features are missing.

License

Licensed under the MIT License.

Special thanks to:

uxx's People

Contributors

kjetand avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.