11 releases
| 0.2.5 | Oct 2, 2025 |
|---|---|
| 0.2.4 | Oct 2, 2025 |
| 0.2.3 | Sep 11, 2025 |
| 0.1.4 | Dec 10, 2024 |
| 0.1.0 | Oct 20, 2023 |
#1977 in GUI
45 downloads per month
Used in rustyed
91KB
2K
SLoC
fltk-term
The fltk-term terminal is quite minimal, supports a limited subset of ansi escape sequences using vte, i.e. don't expect to run vim in it!, and is powered by portable-pty.
Known issues
- On Windows, the terminal defaults to cmd. More ansi escape sequences need to be handled to support powershell.
Usage
use fltk_term::PPTerm;
use fltk::{prelude::*, *};
fn main() {
let a = app::App::default();
let mut w = window::Window::default().with_size(600, 400);
// Defer PTY start until after window sizing to avoid truncated first prompt
let mut term = PPTerm::new_deferred(0, 0, 0, 0, None).size_of_parent();
w.end();
w.show();
// Start the PTY now that the widget has a real size
term.start();
app::add_timeout3(0.2, move |_| {
term.write_all(b"echo -e \"\x1b[1;31mHELLO\"\n").unwrap();
});
a.run().unwrap();
}
Dependencies
~17MB
~370K SLoC