All Projects → alialib → alia

alialib / alia

Licence: MIT license
a declarative UI library for C++

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to alia

Layerjs
layerJS: Javascript UI composition framework
Stars: ✭ 1,825 (+2301.32%)
Mutual labels:  declarative
helloworld-sdl2-opengl-emscripten
Basic program that uses SDL2+OpenGL, compiling both locally and via emscripten
Stars: ✭ 71 (-6.58%)
Mutual labels:  emscripten
node-seal
Homomorphic Encryption for TypeScript or JavaScript - Microsoft SEAL
Stars: ✭ 139 (+82.89%)
Mutual labels:  emscripten
roswasm suite
Libraries for compiling C++ ROS nodes to Webassembly using Emscripten
Stars: ✭ 62 (-18.42%)
Mutual labels:  emscripten
react-is-scrolling
Simply detect if users are scrolling in your components in a declarative API
Stars: ✭ 17 (-77.63%)
Mutual labels:  declarative
bazel-emscripten
C++ to WASM or JS using Bazel and Emscripten
Stars: ✭ 40 (-47.37%)
Mutual labels:  emscripten
Solid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Stars: ✭ 13,115 (+17156.58%)
Mutual labels:  declarative
sugar
Declarative HTTP client for Golang
Stars: ✭ 25 (-67.11%)
Mutual labels:  declarative
dclareForMPS
Adding declarative, reactive and incremental rules to MPS
Stars: ✭ 21 (-72.37%)
Mutual labels:  declarative
physx-js
PhysX for JavaScript
Stars: ✭ 80 (+5.26%)
Mutual labels:  emscripten
eigen-js
⚡ Eigen-js is a port of the Eigen C++ linear algebra library
Stars: ✭ 78 (+2.63%)
Mutual labels:  emscripten
sparrowql
Declarative MongoDB aggregations.
Stars: ✭ 28 (-63.16%)
Mutual labels:  declarative
bs-declaredom
Strongly typed declarative markup for the DOM and CSS
Stars: ✭ 66 (-13.16%)
Mutual labels:  declarative
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Stars: ✭ 179,407 (+235961.84%)
Mutual labels:  declarative
vuo
A realtime visual programming language for interactive media.
Stars: ✭ 103 (+35.53%)
Mutual labels:  declarative
Plotly.py
The interactive graphing library for Python (includes Plotly Express) ✨
Stars: ✭ 10,701 (+13980.26%)
Mutual labels:  declarative
perl.js
emscripten build settings for perl
Stars: ✭ 31 (-59.21%)
Mutual labels:  emscripten
bem-react-boilerplate
DEPRECATED! A bare minimum frontend boilerplate based on create-react-app and bem-react-core.
Stars: ✭ 32 (-57.89%)
Mutual labels:  declarative
react-nonav
Experimental React Native declarative navigation
Stars: ✭ 58 (-23.68%)
Mutual labels:  declarative
MoleculeJS
A library for creating fast and reactive Custom Elements
Stars: ✭ 39 (-48.68%)
Mutual labels:  declarative

alia - A Library for Interactive Applications

MSVC Build Status GCC Build Status Clang Build Status Code Coverage C++ Support Stability

alia (pronounced uh-LEE-uh) is a modern C++ library for declaratively developing user interfaces.

alia currently targets the web. It leverages Emscripten and asm-dom to allow you to write client-side web apps in C++. The declarative core of alia, however, is independent of all this, and the intention is to eventually target other environments, including native desktop applications. Stay tuned...

For more info on alia, see its website.

Obligatory pretty picture and code... (Click the image for the interactive version!)

alia/HTML Tip Calculator

void
tip_calculator(html::context ctx)
{
    // Get some component-local state for the bill amount.
    auto bill = get_state(ctx, empty<double>());
    p(ctx, "How much is the bill?");
    // Display an input that allows the user to manipulate our bill state.
    input(ctx, bill);

    // Get some more component-local state for the tip rate.
    auto tip_rate = get_state(ctx, empty<double>());
    p(ctx, "What percentage do you want to tip?");
    // Users like percentages, but we want to keep the 'tip_rate' state as a
    // rate internally, so this input presents a scaled view of it for the user.
    input(ctx, scale(tip_rate, 100));
    // Add a few buttons that set the tip rate to common values.
    button(ctx, "18%", tip_rate <<= 0.18);
    button(ctx, "20%", tip_rate <<= 0.20);
    button(ctx, "25%", tip_rate <<= 0.25);

    // Calculate the results and display them for the user.
    // Note that these operations have dataflow semantics, and since `bill` and
    // `tip_rate` both start out empty, nothing will actually be calculated
    // (or displayed) until the user supplies values for them.
    auto tip = bill * tip_rate;
    auto total = bill + tip;
    p(ctx,
        printf(ctx,
            "You should tip %.2f, for a total of %.2f.", tip, total));

    // Conditionally display a message suggesting cash for small amounts.
    alia_if (total < 10)
    {
        p(ctx,
            "You should consider using cash for small amounts like this.");
    }
    alia_end
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].