Giter Site home page Giter Site logo

orbtk's Introduction

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 peformance, easy to use and cross platform.

Redox

Features:

  • Modern Flutter, React, Redux like API
  • Uses the Entity Component System library DCES for widget and properties handling
  • Updating instead of rebuling subtrees
  • 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

extern crate orbtk;
use orbtk::*;

struct MainView;

impl Widget for MainView {
    fn create() -> Template {
        Template::default()
            .as_parent_type(ParentType::Single)
            .with_child(
                Container::create()
                    .as_parent_type(ParentType::Single)
                    .with_child(TextBlock::create().with_property(Label::from("OrbTk"))),
            )
    }
}

fn main() {
    let mut application = Application::default();
    application
        .create_window()
        .with_bounds(Rect::new(0, 0, 420, 730))
        .with_title("Orbtk")
        .with_root(MainView::create())
        .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 documenation

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

orbtk's People

Contributors

bjorn3 avatar blackle avatar bojankogoj avatar chebykinn avatar emily avatar fabiao avatar flovangh avatar jackpot51 avatar jsalzbergedu avatar keawade avatar lazyoxen avatar mmstick avatar movingtomars avatar polymetric avatar robbycerantola avatar xtibor avatar zakcodes avatar

Watchers

 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.