Skip to content

Pane grid widget#224

Merged
hecrj merged 56 commits into
masterfrom
feature/panes-widget
Mar 20, 2020
Merged

Pane grid widget#224
hecrj merged 56 commits into
masterfrom
feature/panes-widget

Conversation

@hecrj
Copy link
Copy Markdown
Member

@hecrj hecrj commented Mar 18, 2020

Pane grid - Iced

This PR introduces a new widget: PaneGrid.

A PaneGrid consists of a collection of panes, which are distributed using either vertical or horizontal splits to completely fill the space available. This distribution of space is common in tiling window managers (like awesome, i3, or even tmux).

The new PaneGrid features:

  • Vertical and horizontal splits
  • Tracking of the last active pane
  • Mouse-based resizing
  • Drag and drop to reorganize panes
  • Hotkey support
  • Configurable modifier keys
  • API to perform actions programmatically (split, swap, resize, etc.)

I believe this widget can be very useful if you want to allow your users to dynamically customize the layout of the application. For instance, it could be used to build a three-pane interface, a dashboard with different kinds of data visualization, etc.

Additionally, I have:

  • Added a couple of new variants to MouseCursor for the new resizing interactions.
  • Moved some reusable keyboard types to iced_core, as we will need them in iced_web soon enough.
  • Implemented Subscription::with, which can be used to move external data into a subscription.

As always, I have created an example (pane_grid) to showcase all the current features of the new widget.

hecrj added 30 commits March 4, 2020 04:10
It's too contrived. I will work on something simpler.
We can use the `split` method directly instead.
@hecrj hecrj added the feature New feature or request label Mar 18, 2020
@hecrj hecrj added this to the 0.1.0 milestone Mar 18, 2020
@hecrj hecrj self-assigned this Mar 18, 2020
@Songtronix
Copy link
Copy Markdown
Contributor

Holy moly! This is awesome!

Comment thread core/src/point.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants