Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fltk-rs/fltk-flex
A flexbox widget for fltk-rs
https://github.com/fltk-rs/fltk-flex
Last synced: about 2 months ago
JSON representation
A flexbox widget for fltk-rs
- Host: GitHub
- URL: https://github.com/fltk-rs/fltk-flex
- Owner: fltk-rs
- License: mit
- Created: 2021-07-19T00:41:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-24T00:37:23.000Z (over 3 years ago)
- Last Synced: 2024-10-06T22:05:34.780Z (3 months ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fltk-flex
# Note to current and future users:
The Flex widget has been added to the fltk crate, under the group module. This repo mostly now serves the purpose of providing examples of usage!A Rust port of [FL_Flex](https://github.com/osen/FL_Flex), which provides a flexbox widget for FLTK.
## Usage
```toml
[dependencies]
fltk = "1.2"
fltk-flex = "0.2"
```## Example
```rust
use fltk::{prelude::*, *};
use fltk_flex::Flex;fn main() {
let a = app::App::default().with_scheme(app::Scheme::Gtk);
let mut win = window::Window::default().with_size(400, 300);
let mut flex = Flex::default().size_of_parent().column();
let _expanding = button::Button::default().with_label("Expanding");
let mut normal = button::Button::default().with_label("Normal");
flex.set_size(&mut normal, 30);
flex.end();
win.end();
win.make_resizable(true);
win.show();
a.run().unwrap();
}
```