All Projects → Osspial → derin

Osspial / derin

Licence: MPL-2.0 License
A Derive-Based GUI Library for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to derin

ValliStart
A start menu to replace the un-customizable one that you have right now.
Stars: ✭ 89 (+368.42%)
Mutual labels:  desktop
music-app-electron
Music-Streaming app built with Electron, Webpack, Vue.js, Vuex and the Spotify api.
Stars: ✭ 74 (+289.47%)
Mutual labels:  desktop
Playhouse
A Playground for HTML/CSS/JavaScript
Stars: ✭ 28 (+47.37%)
Mutual labels:  desktop
launchui
Launcher for GUI Node.js applications using libui-node.
Stars: ✭ 107 (+463.16%)
Mutual labels:  desktop
hello-libui
Hello World application using libui from maven repository
Stars: ✭ 17 (-10.53%)
Mutual labels:  desktop
glass2
Prototype HTML5 Desktop OS
Stars: ✭ 49 (+157.89%)
Mutual labels:  desktop
WindowResizer
Save and restore your window size and position with a hotkey
Stars: ✭ 51 (+168.42%)
Mutual labels:  desktop
ubuntu-vnc-xfce
Headless Ubuntu/Xfce containers with VNC/noVNC (Generation 1)
Stars: ✭ 51 (+168.42%)
Mutual labels:  desktop
x11-cr
X11 bindings for Crystal language.
Stars: ✭ 32 (+68.42%)
Mutual labels:  desktop
Lumi
Lumi is a Desktop App that offers a collection of tools to create, edit and share digital content with your class.
Stars: ✭ 55 (+189.47%)
Mutual labels:  desktop
desk
DESK exposing server kit : HTML5 solution for remote processing and visualization
Stars: ✭ 21 (+10.53%)
Mutual labels:  desktop
SoftwareHelper
This is a windows app shortcut widget 🔨
Stars: ✭ 122 (+542.11%)
Mutual labels:  desktop
ubuntu-first-steps
First steps with Ubuntu
Stars: ✭ 36 (+89.47%)
Mutual labels:  desktop
ModularPlayers
Modular desktop media widget
Stars: ✭ 28 (+47.37%)
Mutual labels:  desktop
Tana
Bringing the Picture-in-Picture experience to the desktop.
Stars: ✭ 109 (+473.68%)
Mutual labels:  desktop
modmail
Extremely Moddable Gmail
Stars: ✭ 12 (-36.84%)
Mutual labels:  desktop
reactors
View components and APIs that work web, mobile and native!
Stars: ✭ 14 (-26.32%)
Mutual labels:  desktop
OrganiseDesktop
Python script that cleans up a messy desktop
Stars: ✭ 81 (+326.32%)
Mutual labels:  desktop
yout
🔥 YouTube playlist player for desktop. Free, no YouTube ads, floating window. Available for Linux, Mac and Windows.
Stars: ✭ 82 (+331.58%)
Mutual labels:  desktop
FoldingBrowser
FoldingCoin & CureCoin All-In-One Installer
Stars: ✭ 48 (+152.63%)
Mutual labels:  desktop

Derin - Derivable User Interface

Crates.io Docs

A UI library for Rust that makes creating a GUI as simple as declaring a struct.

Setting up

[dependencies]

# The core library and APIs, used for creating and displaying widgets.
derin = "0.1"

# Adds #[derive(WidgetContainer)]. Is used to help create widget trees.
derin_macros = "0.1"

Examples

Beyond looking at the API docs, you're encouraged to look at one of the provided examples, to see more complex examples of how to use Derin. Those can be found in the derin/examples directory.

// A simple application that shows a click-able button to the user.
extern crate derin;

use derin::{Window, WindowConfig, LoopFlow};
use derin::widgets::{Button, Contents};
use derin::geometry::DimsBox;

fn main() {
    let print_string = "Prints to the console.";

    // Create a new window that displays a GUI on the desktop.
    let mut window = unsafe{ Window::new(
        // Set the attributes with which we'll create the window.
        WindowConfig {
            dimensions: Some(DimsBox::new2(400, 50)),
            title: "Derin's Hello World".to_string(),
            ..WindowConfig::default()
        },
        // Create a button that displays "Hello World" to the user, and passes `print_string`
        // to the UI's action loop.
        Button::new(Contents::Text("Hello, World!".to_string()), Some(print_string)),
        // Set the theme to the default theme.
        derin::theme::Theme::default()
    ).unwrap() };

    let _: Option<()> = window.run_forever(
        // Whenever an action is recieved from a widget, this function is called.
        |print_string, _, _| {
            // Print out strings passed to the action function.
            println!("{}", print_string);
            LoopFlow::Continue
        },
        |_, _| None
    );
}

License

Derin is made available under the Mozilla Public License, 2.0, viewable in this repository or on the Mozilla Website.

Contribution

Unless explicitly stated otherwise, any contributions intentionally submitted for inclusion within Derin will be licensed under the MPL-2.0 license, without any additional terms or conditions.

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].