summaryrefslogtreecommitdiffstats
path: root/native/src/widget/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-14 16:07:22 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-14 16:07:22 +0700
commit03b34931383e701c39c653a7662a616fe21a0947 (patch)
tree8c0773d50b615dbc62210db8919ecb97ca912bd9 /native/src/widget/text.rs
parent3aae45c1913e6a6f60b009f19d00d10add7ad11e (diff)
downloadiced-03b34931383e701c39c653a7662a616fe21a0947.tar.gz
iced-03b34931383e701c39c653a7662a616fe21a0947.tar.bz2
iced-03b34931383e701c39c653a7662a616fe21a0947.zip
Remove trait-specific draw logic in `iced_native`
Diffstat (limited to 'native/src/widget/text.rs')
-rw-r--r--native/src/widget/text.rs40
1 files changed, 5 insertions, 35 deletions
diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs
index 168d49c2..9915a6e9 100644
--- a/native/src/widget/text.rs
+++ b/native/src/widget/text.rs
@@ -133,22 +133,13 @@ where
fn draw(
&self,
- renderer: &mut Renderer,
- defaults: &Renderer::Defaults,
- layout: Layout<'_>,
+ _renderer: &mut Renderer,
+ _defaults: &Renderer::Defaults,
+ _layout: Layout<'_>,
_cursor_position: Point,
_viewport: &Rectangle,
- ) -> Renderer::Output {
- renderer.draw(
- defaults,
- layout.bounds(),
- &self.content,
- self.size.unwrap_or(renderer.default_size()),
- self.font,
- self.color,
- self.horizontal_alignment,
- self.vertical_alignment,
- )
+ ) {
+ // TODO
}
fn hash_layout(&self, state: &mut Hasher) {
@@ -201,27 +192,6 @@ pub trait Renderer: crate::Renderer {
point: Point,
nearest_only: bool,
) -> Option<Hit>;
-
- /// Draws a [`Text`] fragment.
- ///
- /// It receives:
- /// * the bounds of the [`Text`]
- /// * the contents of the [`Text`]
- /// * the size of the [`Text`]
- /// * the color of the [`Text`]
- /// * the [`HorizontalAlignment`] of the [`Text`]
- /// * the [`VerticalAlignment`] of the [`Text`]
- fn draw(
- &mut self,
- defaults: &Self::Defaults,
- bounds: Rectangle,
- content: &str,
- size: u16,
- font: Self::Font,
- color: Option<Color>,
- horizontal_alignment: alignment::Horizontal,
- vertical_alignment: alignment::Vertical,
- ) -> Self::Output;
}
impl<'a, Message, Renderer> From<Text<Renderer>>