Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fltk-rs/demos

Repo containing demo apps using the fltk crate
https://github.com/fltk-rs/demos

Last synced: 5 days ago
JSON representation

Repo containing demo apps using the fltk crate

Awesome Lists containing this project

README

        



fltk-rs demos

[![Documentation](https://docs.rs/fltk/badge.svg)](https://docs.rs/fltk)
[![Crates.io](https://img.shields.io/crates/v/fltk.svg)](https://crates.io/crates/fltk)
[![License](https://img.shields.io/crates/l/fltk.svg)](https://github.com/fltk-rs/fltk-rs/blob/master/LICENSE)
[![Build](https://github.com/fltk-rs/fltk-rs/workflows/Build/badge.svg?branch=master)](https://github.com/fltk-rs/fltk-rs/actions)

---

This repository contains demos and examples of applications built with fltk-rs, a user interface library in Rust based on the Fast Light Toolkit (FLTK).

These are usually associated with video tutorials from this on youtube. Also the fltk-rs repo has an [examples directory](https://github.com/fltk-rs/fltk-rs/tree/master/fltk/examples) for several standalone examples. These demo apps mainly show interop with other projects in the Rust ecosystem.

### Content

The demos and examples in this demo show the ability of fltk-rs to interact with other projects in the Rust ecosystem. The following resources are provided:

- Video Tutorials โ€“ To make it easy to learn fltk-rs, a tutorial [playlist](https://www.youtube.com/playlist?list=PLHqrrowPLkDu9U-uk60sGM-YWLOJFfLoE) has been created on YouTube that shows how to use the library and develop applications with it.

- Samples directory โ€“ Within the fltk-rs repository is a [examples directory](https://github.com/fltk-rs/fltk-rs/tree/master/fltk/examples) that includes stand-alone samples of how to use different components of the library. Examples range from simple windows to more advanced applications with multiple windows and complex controls.

- Demo apps โ€“ In addition to the code examples, this demo provides a number of demo apps that demonstrate fltk-rs' ability to integrate with other projects in the Rust ecosystem. These apps include examples of integration with popular projects like Reqwest, Serde, Tokio, and many others.

### Requirements

To use the demos and examples in this repository, you need to have Rust and the Cargo package manager installed. If you don't have them installed, you can follow the
[official instructions ](https://www.rust-lang.org/tools/install)to install Rust and Cargo on your system.

### Install

To install and run the demos and examples in this repository, follow these steps:

1. Clone this repository to your local machine:

```bash
git clone https://github.com/fltk-rs/demos.git
```

2. Navigate to the cloned directory:

```bash
cd demos
```

3. Compile and run the desired demo:

```bash
cargo run --release
```

### Contribute

If you would like to contribute more examples or improvements to this demo, please create a new fork of the repository and submit your changes via a pull request. We greatly appreciate your contribution and support of the Fltk and the Rust community. It is appreciated to add at the end of the examples, yours with a demonstration via gif and the title of the repository as shown below.

### License

This repository is licensed under the MIT license. You can get more information about the license terms in the LICENSE file of this repository.

---

The current demos include:
- ๐ŸŒโ€Šweb-todo: Creating an async web todo app using fltk, reqwest, serde and tokio.
- ๐ŸŒโ€Šweb-todo2: Creating an async web todo app using fltk, surf, serde and async-std.
- ๐Ÿ“บโ€Šlibvlc: Creating a media player using fltk and the vlc crate.
- ๐ŸŽถ musicplayer: Creating a music player using custom widgets and the soloud crate.
- ๐ŸŽจโ€Šopengl: Raw OpenGL drawing in an fltk GlWindow.
- ๐Ÿ–Œ๏ธโ€Šglut: Use the gl crate (An OpenGL function pointer loader) to do OpenGL drawing.
- ๐Ÿ–Š๏ธ wgpu: Use wgpu-rs for gpu accelerated drawing.
- ๐ŸŽž๏ธ pixels: Use the pixels crate to draw a wgpu accelerated framebuffer.
- โœ’๏ธ framebuffer: Using fltk for framebuffer drawing.
- ๐ŸŒŒ plotters: Use plotters for live plotting (drawing animations) with fltk.
- ๐ŸŒˆโ€Šraqote: Use raqote for custom drawing (paint example).
- ๐Ÿ–ผ๏ธโ€Štinyskia: Use tiny-skia for custom drawing.
- ๐Ÿ–ฅ๏ธ systray: Use nwg to create an fltk app with systray functionalities on Windows
- โœจโ€Šglow: Use the glow crate to do OpengGL drawing.
- ๐ŸŽ‡ glium: Use the glium crate for OpenGL drawing.
- ๐Ÿ—“๏ธโ€Šcalendar: Uses the chrono crate to create an fltk calendar dialog.
- ๐Ÿž๏ธ image: Uses rust-embed and the image crates to load images into fltk.
- ๐ŸŒš speedy2d: Uses speedy2D crate to do 2D drawings of a circle and an RGB image in a GlWindow.
- ๐Ÿช femtovg: Uses femtovg for 2D drawing in a GlWindow.
- ๐Ÿ“ฝ๏ธ ffmpeg: Uses ffmpeg for software video rendering.
- ๐Ÿ’ป webview: Embeds a webview inside an fltk app.
- ๐Ÿ–๏ธโ€Šcsv: Uses serde and csv to perform custom drawing of data.
- ๐Ÿ”˜ rounded-svg: Use the svg crate along with fltk to create images with rounded borders.
- ๐Ÿ”ฆโ€Šlibmpv: use libmpv to play a video inside an fltk GlWindow.
- โ€Š๐Ÿงฅโ€Šmpv: mpv: Use mpv (the command line app) to play a video inside an fltk window.
- ๐Ÿ“ฒโ€Šxterm: embed an xterm window inside an fltk window.
- ๐ŸŽ›๏ธ egui-demo: Use fltk as a backend for egui
- ๐ŸŽž๏ธ gst: Use libgstreamer to play a video inside an fltk window
- ๐Ÿœ๏ธ cairo-demo: Use cairo for custom drawing inside fltk widgets
- ๐Ÿ“โ€Šglyphmap: Maps glyphs (specifically font icons) to their unicode codepoint.
- ๐Ÿ“Ÿ terminal: A minimal terminal emulator.
- ๐ŸŽž๏ธ softbuf: Use the softbuffer crate to draw using native graphics api's.

---

musicplayer

![musicplayer](musicplayer/musicplayer.gif)

web-todo

![web-todo](web-todo/web-todo.gif)

opengl

![opengl](opengl/opengl.gif)

glut

![glut](glut/glut.gif)

pixels

![pixels](pixels/pixels.gif)

plotters

![plotters](plotters/plotters.gif)

raqote

![raqote](raqote/raqote.gif)

tinyskia

![tinyskia](tinyskia/tinyskia.gif)

glow

![glow](glow/glow.gif)

glium

![glium](glium/glium.gif)

calendar

![calendar](calendar/calendar.gif)

speedy2d

![speedy2d](speedy2d/speedy2d.gif)

femtovg

![femtovg](femtovg/femtovg.gif)

webview

![webview](webview/webview.gif)

csv

![csv](csv/csv.gif)

egui-demo

![egui-demo](egui-demo/egui-demo.gif)

glyphmap

![glyphmap](glyphmap/glyphmap.gif)

terminal

![terminal](terminal/terminal.gif)

rounded-svg

![rounded-svg](rounded-svg/rounded-svg.gif)

systray

![systray](systray/systray.gif)

wgpu

![wgpu](wgpu/wgpu.gif)

cairo

![cairo](cairo-demo/ex.jpg)

cairo shadow button

![cairo](cairo_shadow_button/ex1.jpg)