summaryrefslogtreecommitdiffstats
path: root/native/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-01-09 18:46:06 +0100
committerLibravatar GitHub <noreply@github.com>2020-01-09 18:46:06 +0100
commit0a8302450557877cb667b51fc84383aaf0a11b02 (patch)
treefe3a8a6b0ae82f7fd1fa0c0de34b4b09d0b9edda /native/src/renderer.rs
parent6699329d3f91c5b9d8e8e55ad88de24bd3894955 (diff)
parent7b278755fc7929633b5771824beac4d39b16e82e (diff)
downloadiced-0a8302450557877cb667b51fc84383aaf0a11b02.tar.gz
iced-0a8302450557877cb667b51fc84383aaf0a11b02.tar.bz2
iced-0a8302450557877cb667b51fc84383aaf0a11b02.zip
Merge pull request #146 from hecrj/feature/custom-styling
Custom styling
Diffstat (limited to 'native/src/renderer.rs')
-rw-r--r--native/src/renderer.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/native/src/renderer.rs b/native/src/renderer.rs
index 7a68ada4..284c95f6 100644
--- a/native/src/renderer.rs
+++ b/native/src/renderer.rs
@@ -21,14 +21,15 @@
//! [`checkbox::Renderer`]: ../widget/checkbox/trait.Renderer.html
mod debugger;
-#[cfg(debug_assertions)]
-mod null;
mod windowed;
pub use debugger::Debugger;
+pub use windowed::{Target, Windowed};
+
+#[cfg(debug_assertions)]
+mod null;
#[cfg(debug_assertions)]
pub use null::Null;
-pub use windowed::{Target, Windowed};
use crate::{layout, Element};
@@ -43,6 +44,13 @@ pub trait Renderer: Sized {
/// [`Renderer`]: trait.Renderer.html
type Output;
+ /// The default styling attributes of the [`Renderer`].
+ ///
+ /// This type can be leveraged to implement style inheritance.
+ ///
+ /// [`Renderer`]: trait.Renderer.html
+ type Defaults: Default;
+
/// Lays out the elements of a user interface.
///
/// You should override this if you need to perform any operations before or