Draft first-class TitleBar in pane_grid
This commit is contained in:
parent
4c494c7244
commit
a11bcf5af0
10 changed files with 190 additions and 56 deletions
|
|
@ -14,8 +14,8 @@ use iced_native::pane_grid;
|
|||
use iced_native::{Element, Layout, Point, Rectangle, Vector};
|
||||
|
||||
pub use iced_native::pane_grid::{
|
||||
Axis, Direction, DragEvent, Focus, KeyPressEvent, Pane, ResizeEvent, Split,
|
||||
State,
|
||||
Axis, Configuration, Content, Direction, DragEvent, Focus, KeyPressEvent,
|
||||
Pane, ResizeEvent, Split, State, TitleBar,
|
||||
};
|
||||
|
||||
/// A collection of panes distributed using either vertical or horizontal splits
|
||||
|
|
@ -34,7 +34,7 @@ where
|
|||
fn draw<Message>(
|
||||
&mut self,
|
||||
defaults: &Self::Defaults,
|
||||
content: &[(Pane, Element<'_, Message, Self>)],
|
||||
content: &[(Pane, Content<'_, Message, Self>)],
|
||||
dragging: Option<Pane>,
|
||||
resizing: Option<Axis>,
|
||||
layout: Layout<'_>,
|
||||
|
|
@ -115,4 +115,15 @@ where
|
|||
},
|
||||
)
|
||||
}
|
||||
|
||||
fn draw_pane<Message>(
|
||||
&mut self,
|
||||
defaults: &Self::Defaults,
|
||||
_title_bar: Option<&TitleBar<'_, Message, Self>>,
|
||||
body: &Element<'_, Message, Self>,
|
||||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
) -> Self::Output {
|
||||
body.draw(self, defaults, layout, cursor_position)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue