summaryrefslogtreecommitdiffstats
path: root/native/src/renderer/null.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-07-10 00:35:15 +0200
committerLibravatar GitHub <noreply@github.com>2020-07-10 00:35:15 +0200
commit46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3 (patch)
tree66449eec70609f8fc03a5e4e90ce39a7346d02fb /native/src/renderer/null.rs
parent5c4f5ae5ecb36703a95cafb2cd58692529c9466d (diff)
parent3c5921f30c17bcbe0af74a30b6a256a3fa03515c (diff)
downloadiced-46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3.tar.gz
iced-46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3.tar.bz2
iced-46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3.zip
Merge pull request #442 from hecrj/feature/pane-grid-titlebar
Title bar support for `PaneGrid`
Diffstat (limited to 'native/src/renderer/null.rs')
-rw-r--r--native/src/renderer/null.rs63
1 files changed, 60 insertions, 3 deletions
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs
index 5fd3627b..580f58f8 100644
--- a/native/src/renderer/null.rs
+++ b/native/src/renderer/null.rs
@@ -1,7 +1,8 @@
use crate::{
- button, checkbox, column, progress_bar, radio, row, scrollable, slider,
- text, text_input, Color, Element, Font, HorizontalAlignment, Layout, Point,
- Rectangle, Renderer, Size, VerticalAlignment,
+ button, checkbox, column, container, pane_grid, progress_bar, radio, row,
+ scrollable, slider, text, text_input, Color, Element, Font,
+ HorizontalAlignment, Layout, Point, Rectangle, Renderer, Size,
+ VerticalAlignment,
};
/// A renderer that does nothing.
@@ -223,3 +224,59 @@ impl progress_bar::Renderer for Null {
) {
}
}
+
+impl container::Renderer for Null {
+ type Style = ();
+
+ fn draw<Message>(
+ &mut self,
+ _defaults: &Self::Defaults,
+ _bounds: Rectangle,
+ _cursor_position: Point,
+ _style: &Self::Style,
+ _content: &Element<'_, Message, Self>,
+ _content_layout: Layout<'_>,
+ ) {
+ }
+}
+
+impl pane_grid::Renderer for Null {
+ fn draw<Message>(
+ &mut self,
+ _defaults: &Self::Defaults,
+ _content: &[(pane_grid::Pane, pane_grid::Content<'_, Message, Self>)],
+ _dragging: Option<(pane_grid::Pane, Point)>,
+ _resizing: Option<pane_grid::Axis>,
+ _layout: Layout<'_>,
+ _cursor_position: Point,
+ ) {
+ }
+
+ fn draw_pane<Message>(
+ &mut self,
+ _defaults: &Self::Defaults,
+ _bounds: Rectangle,
+ _style: &Self::Style,
+ _title_bar: Option<(
+ &pane_grid::TitleBar<'_, Message, Self>,
+ Layout<'_>,
+ )>,
+ _body: (&Element<'_, Message, Self>, Layout<'_>),
+ _cursor_position: Point,
+ ) {
+ }
+
+ fn draw_title_bar<Message>(
+ &mut self,
+ _defaults: &Self::Defaults,
+ _bounds: Rectangle,
+ _style: &Self::Style,
+ _title: &str,
+ _title_size: u16,
+ _title_font: Self::Font,
+ _title_bounds: Rectangle,
+ _controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>,
+ _cursor_position: Point,
+ ) {
+ }
+}