demos icon indicating copy to clipboard operation
demos copied to clipboard

Repo containing demo apps using the fltk crate

fltk-rs demos

Documentation Crates.io License Build


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.

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 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, Tokyo, 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 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:
git clone https://github.com/fltk-rs/demos.git
  1. Navigate to the cloned directory:
cd demos
  1. Compile and run the desired demo:
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:

  • 🏜️ cairo: Use cairo for custom drawing inside fltk widgets
  • 🗓️  calendar: Uses the chrono crate to create an fltk calendar dialog.
  • 🖍️  csv: Uses serde and csv to perform custom drawing of data.
  • 🎛️ egui: Use fltk as a backend for egui
  • 🪐 femtovg: Uses femtovg for 2D drawing in a GlWindow.
  • 📽️ ffmpeg: Uses ffmpeg for software video rendering.
  • ✒️ framebuffer: Using fltk for framebuffer drawing.
  • 🎇 glium: Use the glium crate for OpenGL drawing.
  • ✨  glow: Use the glow crate to do OpengGL drawing.
  • 🖌️  glut: Use the gl crate (An OpenGL function pointer loader) to do OpenGL drawing.
  • 📍  glyphmap: Maps glyphs (specifically font icons) to their unicode codepoint.
  • 🎞️ gst: Use libgstreamer to play a video inside an fltk window
  • 🏞️ image: Uses rust-embed and the image crates to load images into fltk.
  • 🔦  libmpv: use libmpv to play a video inside an fltk GlWindow.
  • 📺  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.
  • 🎞️ pixels: Use the pixels crate to draw a wgpu accelerated framebuffer.
  • 🌌 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.
  • 🌚 speedy2d: Uses speedy2D crate to do 2D drawings of a circle and an RGB image in a GlWindow.
  • 🖥️ systray: Use nwg to create an fltk app with systray functionalities on Windows
  • 💻 webview: Embeds a webview inside an fltk app.
  • 🔘 rounded-svg: Use the svg crate along with fltk to create images with rounded borders.
  • 📟 terminal: A minimal terminal emulator.
  • 🌐  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.
  • 🖊️ wgpu: Use wgpu-rs for gpu accelerated drawing.