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 for several standalone examples. These demo apps mainly show interop with other projects in the Rust ecosystem.
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 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 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.
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 to install Rust and Cargo on your system.
To install and run the demos and examples in this repository, follow these steps:
- Clone this repository to your local machine:
git clone https://github.com/fltk-rs/demos.git
- Navigate to the cloned directory:
cd demos
- Compile and run the desired demo:
cargo run --release
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.
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.