Crate iced_split

Crate iced_split 

Source
Expand description

§iced_split - resizeable splits for iced

iced license crates.io docs.rs

§Overview

iced_split provides a pane-style resizeable split widget for use with the iced GUI library.

use iced::Element;
use iced_split::vertical_split;

enum Message {
	OnDrag(f32),
}

struct State {
	split_at: f32,
}

impl State {
	fn update(&mut self, message: Message) {
		match message {
			Message::OnDrag(split_at) => self.split_at = split_at,
		}
	}

	fn view(&self) -> Element<'_, Message> {
		vertical_split(
			"left pane",
			"right pane",
			self.split_at,
			Message::OnDrag,
		)
		.into()
	}
}

§Compatibility

Refer to the table below to determine which version(s) of iced_split are compatible with your version of iced.

icediced_split
0.14.00.1.0
0.15-dev0.2-dev

§License

iced_split is licensed under the MIT License. By contributing to iced_split, you agree that your contributions will be licensed under the MIT as well.

Structs§

Split
Resizeable splits for iced.
Style
The style of a Split.
StyleSheet
The stylesheet of a Split.

Enums§

Direction
How the Split is oriented.
Strategy
How the Split behaves when dragged or resized.

Traits§

Catalog
The theme catalog of a Split.

Functions§

default
The default styling of a Split.
horizontal_split
Creates a new horizontal Split with the given top and bottom widgets, a split position, and a function to emit messages when the split gets dragged.
vertical_split
Creates a new vertical Split with the given left and right widgets, a split position, and a function to emit messages when the split gets dragged.

Type Aliases§

StyleFn
A styling function for a Split.