GithubHelp home page GithubHelp logo

orbtk's Introduction

OrbTk

Build and test MIT licensed crates.io docs.rs

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 like API.

The main goals of OrbTk are speed, ease of use, and being cross platform.

Calculator

Features:

  • Modern lightweight API
  • Cross platform
  • Modular crates
  • Based on Entity Component System library DCES
  • Flexible event system
  • Integrated widget library
  • Custom widgets
  • Theming
  • Integrated debugging tools

Platforms

  • Redox OS (native | cargo-node)
  • Linux (native | cargo-node)
  • macOS (native | cargo-node)
  • Windows (native | cargo-node)
  • openBSD (not tested, but should work)
  • Web (cargo-node)
  • Android (native planned after 0.3 | cargo-node)
  • iOS (native planned after 0.3 | cargo-node planned after 0.3)
  • Ubuntu Touch (native planned after 0.3 | cargo-node planned for 0.3)

Planned features

  • Conformable use of async
  • More default widgets
  • More examples
  • Book
  • Animations
  • Split application in modules
  • Theme update
  • 3D context
  • More integrated debugging tools

Usage

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

orbtk = "0.3.1-alpha1"

To use the latest development version of OrbTk, just add the dependency line to your Cargo.toml file:

orbtk = { git = "https://github.com/redox-os/orbtk.git", branch = "develop" }

Minimal Example

use orbtk::prelude::*;

fn main() {
      Application::new()
        .window(|ctx| {
            Window::create()
                .title("OrbTk - minimal example")
                .position((100.0, 100.0))
                .size(420.0, 730.0)
                .child(TextBlock::create().text("OrbTk").build(ctx))
                .build(ctx)
        })
        .run();
}

Run Examples

You can find examples in the examples/ directory.

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

cargo run --example widgets --release

OrbTk has also an integrated debug tools. If you want to show the bounds of all widgets (also non visual widgets) and want to see a debug print of the whole widget tree you could run the examples as follows:

cargo run --example widgets --release --features debug

Run Examples with cargo-node

To run the examples on as browser, electron or cordova app you have to install

cargo install -f cargo-node

Before you could use cargo node you have to install npm version 6.9.0. It is included in the Node.js version 10.16.3. You could download it from https://nodejs.org/dist/v10.16.3/.

Rust's cargo is presumed. All other dependencies of cargo node will be installed automatic.

Start examples

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

  • Run as browser app:
cargo node run --target browser --example widgets
  • Run as electron app:
cargo node run --target electron --example widgets
  • Run as cordova app on android:
cargo node run --target android --example widgets

Build and run documentation

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

cargo doc --no-deps --open

Sub Crates

  • api: base api elements of OrbTk e.g. widget and application parts
  • css-engine: parse and read values from a css file
  • proc-macros: procedural helper macros
  • render: cross platform 2D/3D render library
  • shell: cross platform window and event handling
  • theme: OrbTks default theme (light and dark)
  • tree: tree structure based on DCES
  • utils: helper structs and traits
  • widgets: base widget library

Inspirations

Showcases

Contribution

If you want to help bring OrbTk further or you have feedback check our issues https://github.com/redox-os/orbtk/issues. You could also discuss with us about OrbTk on the Redox chat https://redox-os.org/community/ (join the orbital channel).

License

Licensed under MIT license (LICENSE).

orbtk's People

Contributors

aclonegeek avatar adminxvii avatar arturkovacs avatar bjorn3 avatar blackle avatar bojankogoj avatar chebykinn avatar emily avatar fabiao avatar flovangh avatar gander7 avatar gheoan avatar hughlang avatar hustlei avatar jackpot51 avatar jsalzbergedu avatar keawade avatar lazyoxen avatar mjhouse avatar mmstick avatar movingtomars avatar polymetric avatar robbycerantola avatar tshepang 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.