SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

Overview

SixtyFPS

Build Status Discussions

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++, and JavaScript.

Our design goals are:

  • Lightweight: Fit into a few hundred kilobytes of RAM and require little processing power.
  • Straightforward: Programmers and designers should feel productive and be able to enjoy the design and development process. The APIs should be consistent, easy to use, and intuitive, no matter the target language. High-quality documentation should describe the APIs, teach concepts and how to use them.
  • Native: We support many different target platforms, from embedded devices to desktops including mobile and web. Both the user and the developer should feel at home on each platform. The look and feel and experience should match the users' expectations of a native application.

Current Status

It's possible to create user interfaces from C++, Rust, or NodeJS. These user interfaces can be compiled and shown on Linux, macOS, Windows, and in Web Browsers (using WebAssembly). You can also try out SixtyFPS using our online editor.

We plan to support the development of this project through dual-licensing and services. We seek feedback from potential customers or users.

Table Of Contents

Reference

Refer to the README of each language directory in the api sub-folder:

The examples folder contains examples and demos. The docs folder contains build instructions and internal developer docs.

Demos running in WebAssembly Simulation

Click on the screenshots to run the WebAssembly simulation

Printer Demo Slide Puzzle Todo Widget Gallery
Screenshot of the Printer Demo Screenshot of the Slide Puzzle Screenshot of the Todo Demo Screenshot of the Gallery Demo

Desktop Native Widgets

Windows macOS Linux
Screenshot of the Gallery on Windows Screenshot of the Gallery on macOS Screenshot of the Gallery on Linux

The .60 Markup Language

SixtyFPS comes with a markup language that is specifically designed for user interfaces. This language provides a powerful way to describe graphical elements, their placement, and the flow of data through the different states. It is a familiar syntax to describe the hierarchy of elements and property bindings. Here's the obligatory "Hello World":

HelloWorld := Window {
    width: 400px;
    height: 400px;

    Text {
       y: parent.width / 2;
       x: parent.x + 200px;
       text: "Hello, world";
       color: blue;
    }
}

Check out the language reference for more details.

Architecture

An application is composed of the business logic written in Rust, C++, or JavaScript and the .60 user interface design markup, which is compiled to native code.

Architecture Overview

Compiler

The .60 files are compiled ahead of time. The expressions in the .60 are pure functions that the compiler can optimize. For example, the compiler could choose to "inline" properties and remove those that are constant or unchanged. In the future we hope to improve rendering time on low end devices by pre-processing images and text. The compiler could determine that a Text or an Image element is always on top of another Image in the same location. Consequently both elements could be rendered ahead of time into a single element, thus cutting down on rendering time.

The compiler uses the typical compiler phases of lexing, parsing, optimization, and finally code generation. It provides different back-ends for code generation in the target language. The C++ code generator produces a C++ header file, the Rust generator produces Rust code, and so on. An interpreter for dynamic languages is also included.

Runtime

The runtime library consists of an engine that supports properties declared in the .60 language. Components with their elements, items, and properties are laid out in a single memory region, to reduce memory allocations.

Rendering backends and styles are configurable at compile time. Current there are two back-ends:

  • The gl backend uses OpenGL ES 2.0 for rendering.
  • The qt backend uses Qt's QStyle to achieve native looking widgets. In the future it could also use QPainter.

Tooling

We have a few tools to help with the development of .60 files:

  • A LSP Server that adds things like auto-complete and live preview of the .60 files to many editors
  • It is bundled in a Visual Studio Code Extension accessible from the market place
  • A sixtyfps-viewer tool which display the .60 files. With the --auto-reload argument, makes it easy to preview your UI as you are working it (when using the LSP preview is not possible)
  • An online editor to try out .60 syntax without installing anything (sources)
  • An updater to convert the .60 files from previous version to the newer version
  • An experimental Figma importer

Contributions

We welcome your contributions: in the form of code, bug reports or feedback.

  • If you see an RFC tag on an issue, feel free to chime in.
  • For contribution guidelines see CONTRIBUTING.md. The dual-licensing requires the contributor to accept a CLA.

License

This software is provided under a dual licensing scheme:

  • GNU GPLv3: Open source license ideal for free software.
  • Commercial SixtyFPS license: More details to come.

See also the Licensing FAQ

Frequently Asked Questions

Please see our separate FAQ.

About us

Olivier and Simon started their open source journey in the KDE project, the popular Open Source Desktop Environment for Linux. Later they met while working together in a small company in Norway called Trolltech, on the Qt C++ toolkit. Here, they gained valuable experience in API design, cross-platform software development and user interface components. Simon continued in the Qt Company as one lead developer and maintainer of the QtQml engine, while Olivier co-founded Woboq, a software consulting company. Years later, and now based in Berlin, they are starting a new project. With SixtyFPS they aim to make developing user interfaces fun for everyone: from JavaScript, C++, or Rust developers all the way to UI/UX designers.

Contact us

Feel free to join Github discussions for general chat or questions. Use Github issues to report public suggestions or bugs.

To contact us privately send an email to [email protected]

For chat, we also have our Mattermost instance

Comments
  • Add support for dispatching key events through the public platform API

    Add support for dispatching key events through the public platform API

    Now it is possible to dispatch key events from the public api using the WindowEvent enum. Related to #1745. Add impl From<char> for SharedString

    opened by FloVanGH 21
  • Unable to build on Ubuntu 20.04.2

    Unable to build on Ubuntu 20.04.2

    Unable to build on ubuntu based on instructions given.Am I missing something?. Attached terminal steps performed:

    shekhar@shekhar:~/packages/sixtyfps/cppbuild$ cmake --GNinja .. -- The CXX compiler identification is GNU 9.3.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active rustc version is rustc 1.52.1 (9bc8c42bb 2021-05-09) -- Rust Toolchain: stable-x86_64-unknown-linux-gnu -- Rust Target: x86_64-unknown-linux-gnu -- Found Rust: /home/shekhar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc (found version "1.52.1") -- Defaulting Cargo to build debug -- Using Corrosion as a subdirectory -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
    CMake Error: File /CMakeLists.cmake.in does not exist. CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:891 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) /usr/share/cmake-3.16/Modules/FetchContent.cmake:1047 (FetchContent_Populate) examples/iot-dashboard/CMakeLists.txt:21 (FetchContent_MakeAvailable)

    -- Configuring incomplete, errors occurred! See also "/home/shekhar/packages/sixtyfps/cppbuild/CMakeFiles/CMakeOutput.log". See also "/home/shekhar/packages/sixtyfps/cppbuild/CMakeFiles/CMakeError.log". shekhar@shekhar:~/packages/sixtyfps/cppbuild$ cmake --GNinja .. -- Rust Toolchain: stable-x86_64-unknown-linux-gnu -- Rust Target: x86_64-unknown-linux-gnu -- Defaulting Cargo to build debug -- Using Corrosion as a subdirectory CMake Error: File /CMakeLists.cmake.in does not exist. CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:891 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) /usr/share/cmake-3.16/Modules/FetchContent.cmake:1047 (FetchContent_Populate) examples/iot-dashboard/CMakeLists.txt:21 (FetchContent_MakeAvailable)

    -- Configuring incomplete, errors occurred! See also "/home/shekhar/packages/sixtyfps/cppbuild/CMakeFiles/CMakeOutput.log". See also "/home/shekhar/packages/sixtyfps/cppbuild/CMakeFiles/CMakeError.log". shekhar@shekhar:~/packages/sixtyfps/cppbuild$

    bug language-c++ 
    opened by ZEPORATH 21
  • public, private and readonly properties

    public, private and readonly properties

    We want to be able to declare the properties as public, private, or protected. Currently all top level properties are public.

    The motivation is not only for performance (since knowing that a property cannot be accessed or written from the outside would allow to optimize things) but also for code hygiene. For example, do we really want to allow changing property in states that could also be set from the outside.

    Updated suggestion:

    We classify the property in the different category:

    • in: This is a property that can be set by the user of the component, but cannot be set with = by the component itself. (Most properties)
    • out: Properties that can only be set within the component. You cannot assign a binding from the outside. (eg: pressed)
    • in-out: property that can be set both from the inside and outside.
    • (nothing): private properties can can only be accessed from the component

    Example of property declarations:

       in property <brush> background: blue; 
       out property <bool> pressed: touch-area.pressed;
       in-out property <int> value <=> slider.value;
       property <int> past_value: 32;  // this is private
    

    We will also recommend inheriting from a "base" element that doesn't have any properties to it so that it would not be exposed.

    Unresolved question:

    • [ ] Do we need to always have the property contextual keyword (input property <foo> bar) or is just one enough (input <foo> bar)
    Original suggestion
    • Requiring public/private/readonly annotation when defining properties
    • Require a public/private/readonly annotation when defining components to specify the default access of inherited property
    • Allow to change the visibility of inherited property with the public foo;/private bar;/readonly buz;
    Button := private Rectangle {
     // None of Rectangle's properties can be used by users of Button
     readonly property<bool> pressed;
     private property<int> internal_state;
    }
    
    Button1 := public Rectangle {
        // All properties of Rectangle are readable/writable to users of Button
    }
    
    Button2 := readonly Rectangle {
        // All of Rectangle's properties become read-only to users of Button, but
        // Button2 itself can still assign bindings
        color: pressed ? blue : red;
    }
    
    Foo := private Button {
       // Should be allowed to override and create a new property  (but we can also make it forbidden for now)
       private property<string> internal_state: "Foo";
    }
    
    Button := private Rectangle {
       // We want the Rectangle's color to be public
       public color;
    }
    
    Button := public Rectangle {
        // Just hide the Rectangle's color
        private color;
        readonly border-color;
    }
    

    Questions:

    • Do we want to force the use of such a keyword, or should there be a default, and if there is a default, which one?
    • Properties that are not at the top level don't matter since they can only be private, so no keyword required. Maybe non top level property does make sense?
    • Syntax: Are these keyword the best we can come up? Should we be able to elide the property keyword:
       private <int> foo;
       public <string> bar;
       readonly <float> xxx;
    
    rfc breaking change 
    opened by ogoffart 21
  • Stack overflow on Windows in Rust Debug Builds

    Stack overflow on Windows in Rust Debug Builds

    Due to the inlining the generated structures tend to become rather big (the gallery for example ~13kb with the ugly style), which on debug builds with Rust on Windows tends to result in a bunch of copies of said struct. That can lead to the process running out of stack space.

    bug platform-win language-rust 
    opened by tronical 19
  • winit-femtovg renderer panics on startup with nVidia GPU on Wayland

    winit-femtovg renderer panics on startup with nVidia GPU on Wayland

    slint on  HEAD (7ec79fb) via △ v3.22.2 via 🦀 v1.64.0 
    ❯ RUST_BACKTRACE=full SLINT_BACKEND=winit-femtovg cargo run -p memory
        Finished dev [unoptimized + debuginfo] target(s) in 0.09s
         Running `target/debug/memory`
    thread 'main' panicked at 'Failed to create OpenGL context: could not create GlLatest context : Couldn't find any pixel format that matches the criteria.', internal/backends/winit/glcontext.rs:189:17
    stack backtrace:
       0:     0x55d24d9f6d7d - std::backtrace_rs::backtrace::libunwind::trace::h9135f25bc195152c
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
       1:     0x55d24d9f6d7d - std::backtrace_rs::backtrace::trace_unsynchronized::h015ee85be510df51
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
       2:     0x55d24d9f6d7d - std::sys_common::backtrace::_print_fmt::h5fad03caa9652a2c
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:66:5
       3:     0x55d24d9f6d7d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2b42ca28d244e5c7
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:45:22
       4:     0x55d24da19fdc - core::fmt::write::h401e827d053130ed
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/fmt/mod.rs:1198:17
       5:     0x55d24d9f3811 - std::io::Write::write_fmt::hffec93268f5cde32
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/io/mod.rs:1672:15
       6:     0x55d24d9f8335 - std::sys_common::backtrace::_print::h180c4c706ee1d3fb
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:48:5
       7:     0x55d24d9f8335 - std::sys_common::backtrace::print::hd0c35d18765761c9
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:35:9
       8:     0x55d24d9f8335 - std::panicking::default_hook::{{closure}}::h1f023310983bc730
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:295:22
       9:     0x55d24d9f8051 - std::panicking::default_hook::h188fec3334afd5be
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:314:9
      10:     0x55d24d9f88e6 - std::panicking::rust_panic_with_hook::hf26e9d4f97b40096
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:698:17
      11:     0x55d24d9f87d7 - std::panicking::begin_panic_handler::{{closure}}::hfab912107608087a
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:588:13
      12:     0x55d24d9f7274 - std::sys_common::backtrace::__rust_end_short_backtrace::h434b685ce8d9965b
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:138:18
      13:     0x55d24d9f8509 - rust_begin_unwind
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
      14:     0x55d24da17d23 - core::panicking::panic_fmt::ha6dc7f2ab2479463
                                   at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
      15:     0x55d24ce72009 - i_slint_backend_winit::glcontext::OpenGLContext::new_context::{{closure}}::h70f0612afd669450
                                   at /home/be/sw/slint/internal/backends/winit/glcontext.rs:189:17
    fish: Job 1, 'RUST_BACKTRACE=full SLINT_BACKE…' terminated by signal SIGABRT (Abort)
    

    using NVIDIA Corporation GA106 [GeForce RTX 3060 Lite Hash Rate] (rev a1) with proprietary nVidia driver akmod-nvidia-515.76-1.fc36.x86_64 with Linux 5.19.14-200.fc36.x86_64

    This is not reproducible with the same hardware on X11.

    bug backend-winit 
    opened by Be-ing 16
  • Set the rpath to Qt for Rust binaries

    Set the rpath to Qt for Rust binaries

    For C++ apps we apply rpath to the cdylib implicitly via qttypes, but link flags for rust binaries are not transitively propagated but require explicit opt-in by the top-level crate. However we want that convenience, to avoid Rust apps having to deal with Qt backend specific code in their build.rs. Therefore we use the _DEP mechanism to get the qt library path from the qttypes crate and write it into a generic file in the qt backend's build.rs, which is then picked up by sixtyfps-build.

    We'll use the same mechanism to propagate link flags for the MCU build (such as the linker script).

    cc #566

    opened by tronical 16
  • PNG and BMP Image Format not supported

    PNG and BMP Image Format not supported

    Hello, I am trying to load a PNG-Image file into a slint program on my Raspberry Pi.

    Somehow the PNG and BMP Image formats are not supported. I am running Raspberry Pi OS light with a minimal x setup.

    Am I missing any packages? I was unable to find out if i do.

    Does someone know what I'm missing?

    opened by AlexanderHeim 15
  • error: failed to run custom build command for `servo-fontconfig-sys v5.1.0`

    error: failed to run custom build command for `servo-fontconfig-sys v5.1.0`

    error: failed to run custom build command for servo-fontconfig-sys v5.1.0

    Caused by: process didn't exit successfully: /home/mahdi/Rust/my-project/target/debug/build/servo-fontconfig-sys-136e4a39fa7e8154/build-script-build (exit status: 101) --- stdout cargo:rerun-if-env-changed=FONTCONFIG_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=FONTCONFIG_STATIC cargo:rerun-if-env-changed=FONTCONFIG_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

    --- stderr thread 'main' panicked at '"pkg-config" "--libs" "--cflags" "fontconfig" "fontconfig >= 2.11.1" did not exit successfully: exit status: 1 --- stderr Package fontconfig was not found in the pkg-config search path. Perhaps you should add the directory containing fontconfig.pc' to the PKG_CONFIG_PATH environment variable No package 'fontconfig' found Package fontconfig was not found in the pkg-config search path. Perhaps you should add the directory containingfontconfig.pc' to the PKG_CONFIG_PATH environment variable No package 'fontconfig' found ', /home/mahdi/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-5.1.0/build.rs:34:17 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... error: build failed

    opened by Behkar 15
  • Widget focus

    Widget focus

    Do not derive widgets from FocusScope

    We expose less functionality this way:-)

    Add enabled property to FocusScope

    Allow for a bool to enable/disable focus delivery.

    Make the Button accept focus

    ... and handle space/return keys to click() it!

    opened by hunger 14
  • Fix mouse exit events not triggered by scrolling a Flickable

    Fix mouse exit events not triggered by scrolling a Flickable

    This is more of an POC of a fix to #1107. Basically the main idea here is to make sure that mouse events are handled as usual by child items in case of a mouse scroll event on a flickable, so they are part of the previous mouse grabber stack which is required to be included in the exit event dispatching. This works for the case shown on the video at the bottom (mouse leave) but I think it's not the most complete solution here. Probably a better solution would be to convert the scroll event to a move event as this would be more correct for the child items. I also had to move the call to send_exit_events after the actual event handling to be able to catch the updated scroll position in the frame it was changed and not 1 frame later. While this wasn't a huge issue when scrolling slowly, scrolling fast could easily trigger a wrong hovering state as the jump in a single frame was greater than a single item in height.

    Open questions:

    • Is introducing a new input event filter result the best option here?
    • Using EventIgnore as result of the flickable event handler feels a bit hacky.
    • Could there be any regressions or unintended side effects caused by sending exit events at the end of event handling?
    • While the mouse event should be forwarded to child items only, it is also forwarded to siblings if I'm not mistaken, which is not desired

    https://user-images.githubusercontent.com/9491603/168012405-f40b14e6-e074-4f7c-a4ba-afe12130872b.mp4

    Fixes #1107 Fixes #1278

    opened by levrik 13
  • use log::debug macro for debug function in .60 language

    use log::debug macro for debug function in .60 language

    It would be nice if using the built-in debug function in .60 files autogenerated Rust code which used the debug macro from the log crate. This would allow applications to choose the logging implementation instead of always printing directly to standard out. It would also be nice to add functions for the other log levels (trace, info, warn, error).

    good first issue 
    opened by Be-ing 13
  • Fix C++ memory game tutorial not starting out of the box on Windows

    Fix C++ memory game tutorial not starting out of the box on Windows

    After commit 3e5aa212d5954ac9b171a043c52088ca292e292a the Slint DLLs aren't placed in the bin/ directory by default anymore. Since the tutorial builds Slint as an external sub-project, it is entirely isolated and the CMAKE_*_OUTPUT_DIRECTORY variables do not propagate. On macOS and Linux, the program still runs due to rpath. On Windows, the instructions said to put bin into %PATH%, but that doesn't work anymore, the dll is now in _deps/slint-build.

    Instead of adjusting %PATH%, this change adjusts the documentation to recommend the use of a custom command on Windows using $<TARGET_RUNTIME_DLLS:tgt> to copy the DLL across. This is guarded with WIN32 due to https://gitlab.kitware.com/cmake/cmake/-/issues/23543 , where the proposed solution requires CMake 3.26 (not released yet).

    opened by tronical 1
  • Future TableView features

    Future TableView features

    This is relevant after #2032 is finished:

    • [ ] Resizing of columns
    • [ ] Build in column sort mechanism (e.g. by internal generate sort model wrapper)
    • [ ] More cell types like selection (compare ComboBox), and bool (CheckBox)
    • [ ] Optional row zebra pattern (show/hide by flag)
    opened by FloVanGH 0
  • Add TableView widget

    Add TableView widget

    • fluent TableView
    • material TableView
    • native TableView (wip)

    This PR is intended to review the api of the TableView.

    This is the first version of the TableView with Text only cells (editable) and sort by column feature (ascending / descending).

    Not included in this PR: resizing of columns and different cell types like CheckBox.

    opened by FloVanGH 0
  • Encapsulate widgets with rust logic

    Encapsulate widgets with rust logic

    Hey, I've read the documentation and examples, but couldn't quite figure out what the proper approach for more complex applications looks like. Let's say, that I have some application with multiple screens using Rust. From what I understand, if I want to add some logic using rust, I have to do it via callbacks on the window? Is there no way to create a widget using the slint language, add some logic using rust and then use that Widget, with the rust logic, within another slint language widget/window?

    Having a single point to add the rust logic feels extremely inconvenient to me. I would have imagined something like this: (pseudocode):

    pub fn MyLoginScreen() {
        slint::slint! {
            import { Button } from "std-widgets.slint";
    
            export LoginScreen := Rectangle {
                callback login_clicked <=> btnLogin.clicked;
    
                HorizontalLayout {
                    alignment: center;
                    VerticalLayout {
                        alignment: center;
                        btnLogin := Button {
                            text: "Login";
                        }
                    }
                }
            }
        }
    
        let login = LoginScreen::new();
        login.on_login_clicked(|| eprintln!("LOGIN"));
    }
    
    
    pub fn main() {
        slint::slint! {
            export App := Window {
                callback quit();
                login := MyLoginScreen {  }
            }
        }
    
        let app = App::new();
        app.run();
    }
    
    

    Is adding the logic via callbacks to the window and then forwarding these to the screens the only way?

    enhancement language-c++ language-rust 
    opened by John0x 5
  • GL backend: Text disappears if its font-size is too large compared to the height of its parent

    GL backend: Text disappears if its font-size is too large compared to the height of its parent

    What I'm trying to do is to have text take the full height of its parent.

    Demo := Window {
        width: 600px;
        height: 200px;
        Rectangle {
            background: blue;
            Rectangle {
                height: 50%;
                y: parent.height / 2 - height / 2;
                background: yellow;
                Text {
                    text: "Hello World!";
                    height: 100%;
    
                    // This works
                    // font-size: 86px;
    
                    // This doesn't work (but it does if you increase height: 50% of the parent Rectangle)
                    // font-size: 87px;
    
                    // This also doesn't work with the winit-femtovg nor winit-software backends,
                    // but it does work with the Qt backend
                    // (at least in the code I had with slint-lsp before I tried to reproduce it here).
                    font-size: height;
                }
            }
        }
    }
    

    Online editor

    font renderer-femtovg 
    opened by jturcotte 2
Releases(v0.3.3)
Owner
SixtyFPS
SixtyFPS
SixtyFPS
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Dear ImGui (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addit

omar 44.4k Jan 5, 2023
🖼 A Rust library for building user interfaces on the web with WebGL.

wasm-ui Hey! Welcome to my little experiment. It's a Rust library for building user interfaces on the web. You write the interface in Rust, and wasm-u

Harry 10 Dec 1, 2022
Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces.

Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces.

null 1.9k Dec 22, 2022
With Dejavu, you can have a perfect memory by capturing and organizing your visual recordings efficiently.

Dejavu The content in README.md is assisted by ChatGPT. Overview Dejavu is an open-source, cross-platform tool designed to help you record and search

Zhou Zhiqiang 127 Jul 31, 2023
AccessKit: UI accessibility infrastructure across platforms and programming languages

AccessKit: UI accessibility infrastructure across platforms and programming languages Motivation There are numerous UI toolkits, and new ones continue

null 490 Jan 3, 2023
Build smaller, faster, and more secure desktop applications with a web frontend.

TAURI Tauri Apps footprint: minuscule performance: ludicrous flexibility: gymnastic security: hardened Current Releases Component Descrip

Tauri 56.3k Jan 3, 2023
Graphical font editor (GTK + Rust)

gerb *gerb ʰ-: reconstructed Proto-Indo-European root, meaning to carve gerb: a WIP font editor in gtk3 and rust Introduction gerb is an experimental,

Manos Pitsidianakis 40 Jan 1, 2023
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

Deno Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Features Secure by default. No file,

Derek Jones 2 Aug 13, 2022
A utility for mapping events from Linux event devices.

What is evsieve? Evsieve (from "event sieve") is a low-level utility that can read events from Linux event devices (evdev) and write them to virtual e

Kars Mulder 116 Jan 2, 2023
A data-first Rust-native UI design toolkit.

Druid A data-first Rust-native UI toolkit. Druid is an experimental Rust-native UI toolkit. Its main goal is to offer a polished user experience. Ther

null 8.2k Dec 31, 2022
The Rust UI-Toolkit.

The Orbital Widget Toolkit is a cross-platform (G)UI toolkit for building scalable user interfaces with the programming language Rust. It's based on t

Redox OS 3.7k Jan 1, 2023
Rust bindings to the minimalist, native, cross-platform UI toolkit `libui`

Improved User Interface A cross-platform UI toolkit for Rust based on libui iui: ui-sys: iui is a simple (about 4 kLOC of Rust), small (about 800kb, i

Rust Native UI Group 865 Dec 27, 2022
Cross-platform GUI toolkit written in Rust

Tuix is a cross-platform GUI toolkit written in Rust. The driving principle behind tuix is to be a self-contained, small-as-possible, but still fast,

George Atkinson 166 Dec 13, 2022
A Rust binding of the wxWidgets cross platform toolkit.

wxRust master: / mac(0.10): This is a Rust binding for the wxWidgets cross platform toolkit. API wxRust API documentation How it works The wxRust libr

KENZ 129 Jan 4, 2023
A light windows GUI toolkit for rust

Native Windows GUI Welcome to Native Windows GUI (aka NWG). A rust library to develop native GUI applications on the desktop for Microsoft Windows. NW

Gabriel Dube 1.6k Jan 7, 2023
A cross-platform GUI toolkit in Rust

NXUI - Native X UI A cross-platform GUI toolkit in Rust NXUI is a GUI toolkit that calls OS native APIs as much as possible to achieve fast operation.

らて 11 Jun 3, 2022
Modular FFXIV data toolkit written in rust.

ironworks Modular FFXIV data toolkit written in rust. ironworks is pre-1.0, and as such its API should be considered unstable. Breaking API changes wi

Saxon Landers 10 Oct 21, 2022
A small tool to display markdown files as a slideshow.

Rusty Slider A small tool to display markdown files as a slideshow. Demo Try out Rusty Slider online: Example slideshows. Download Rusty Slider is ava

Olle Wreede 37 Dec 21, 2022
A demo of using JavaScript in a Rust program, via the "deno_core" crate.

js-in-rs created by Austin Poor A demo of using JavaScript in a Rust program, via the deno_core crate. Usage js-in-rs is a sample grep-like applicatio

Austin Poor 32 Jun 12, 2023