Skip to content
Snippets Groups Projects
Forked from an inaccessible project.
user avatar
Florian Blasius authored
b6a47272
History
OrbTk

Build status MIT licensed crates.io docs.rs

OrbTk 0.3.0 is under heavy development and it's not compatible to earlier releases.

The Orbital Widget Toolkit is a multi platform (G)UI toolkit for building scalable user interfaces with the programming language Rust. It's based on the Entity Component System Pattern and provides a functional-reactive API.

The main goals of OrbTk are fast performance, easy to use and cross platform.

Calculator

Features:

  • Modern Flutter, React, Redux like API
  • Uses the Entity Component System library DCES for widget and properties handling
  • Updating instead of rebuilding sub-trees
  • Flexible event system
  • Widget state management
  • Cross platform: Redox OS, Linux, macOS, Windows
  • CSS theming

Usage

To include OrbTk in your project, just add the dependency line to your Cargo.toml file:

orbtk = "0.2.27"

To use OrbTk 0.3, just add the dependency line to your Cargo.toml file:

orbtk = { git = "https://gitlab.redox-os.org/redox-os/orbtk.git" }

However you also need to have the SDL2 libraries installed on your system. The best way to do this is documented by the SDL2 crate.

Minimal Example

use orbtk::*;

fn main() {
    let mut application = Application::default();
    application
        .create_window()
        .bounds(Bounds::new(100.0, 100.0, 420.0, 730.0))
        .title("OrbTk - minimal example")
        .root(TextBlock::create().text("OrbTk").into())
        .debug_flag(false)
        .build();
    application.run();
}

Additional Examples

You find the examples in the examples/ directory.

You can start the widgets example by executing the following command:

cargo run --example widgets --release

Build and run documentation

You can build and run the latest documentation y executing the following command:

cargo doc --no-deps --open

Planned features

  • Style guide
  • More default widgets
  • More examples
  • Book
  • Animations
  • Exchange views / widgets / screens on runtime
  • Split application in modules
  • Theme update
  • Support for Android, iOS and WebAssembly
  • Vulkan / OpenGL Support

Dependencies

Inspirations