Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fltk-rs/fltk-flow
A flow widget for fltk-rs (wraps Fl_Flow).
https://github.com/fltk-rs/fltk-flow
Last synced: about 2 months ago
JSON representation
A flow widget for fltk-rs (wraps Fl_Flow).
- Host: GitHub
- URL: https://github.com/fltk-rs/fltk-flow
- Owner: fltk-rs
- License: mit
- Created: 2021-11-25T11:23:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T19:36:38.000Z (6 months ago)
- Last Synced: 2024-10-31T11:48:22.886Z (2 months ago)
- Language: C++
- Size: 44.9 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fltk-flow
A crate wrapping [Fl_Flow](https://github.com/osen/Fl_Flow). This uses a native module written in C++, so it won't work with the fltk-bundled feature.
## Example:
```rust
#![allow(unused_mut)]use fltk::{prelude::*, enums::*, *};
use fltk_flow::Flow;fn main() {
let a = app::App::default().with_scheme(app::Scheme::Gtk);let mut win = window::Window::default().with_size(640, 480);
let mut flow = Flow::default_fill();
let btn = button::Button::default().with_size(100, 30).with_label("Button1");
let inp = input::Input::default().with_size(150, 30);
let mut sep = frame::Frame::default().with_size(10, 1);
let area = input::MultilineInput::default().with_size(10, 10);
let mut sep2 = frame::Frame::default().with_size(10, 1);
let btn2 = button::Button::default().with_size(100, 30).with_label("Button2");
flow.end();
win.end();
win.resizable(&flow);
win.show();
sep.set_color(Color::Black);
sep.set_frame(FrameType::FlatBox);
sep2.set_color(Color::Black);
sep2.set_frame(FrameType::FlatBox);flow.rule(&btn, "^<");
flow.rule(&inp, "^<");
flow.rule(&sep, "=<^");
flow.rule(&area, "<^");
flow.rule(&sep2, "=<^");
flow.rule(&btn2, "v");
flow.rule(&sep2, "v");
flow.rule(&area, "=>=v");a.run().unwrap();
}
```![alt_test](screenshots/flow.jpg)