From 56d9c3521599baef6ff1472c0c95fa07f17a5a67 Mon Sep 17 00:00:00 2001 From: rabite Date: Tue, 12 Feb 2019 22:55:16 +0100 Subject: async widget --- src/hbox.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/hbox.rs') diff --git a/src/hbox.rs b/src/hbox.rs index cdd7023..23c580b 100644 --- a/src/hbox.rs +++ b/src/hbox.rs @@ -11,7 +11,7 @@ pub struct HBox { } -impl HBox where T: Widget { +impl HBox where T: Widget + PartialEq { pub fn new() -> HBox { HBox { coordinates: Coordinates::new(), widgets: vec![], @@ -78,7 +78,7 @@ impl HBox where T: Widget { -impl Widget for HBox where T: Widget { +impl Widget for HBox where T: Widget + PartialEq { fn render_header(&self) -> String { self.active_widget().render_header() } @@ -96,18 +96,6 @@ impl Widget for HBox where T: Widget { }).collect() } - fn get_size(&self) -> &Size { - &self.coordinates.size - } - fn get_position(&self) -> &Position { - &self.coordinates.position - } - fn set_size(&mut self, size: Size) { - self.coordinates.size = size; - } - fn set_position(&mut self, position: Position) { - self.coordinates.position = position; - } fn get_coordinates(&self) -> &Coordinates { &self.coordinates } -- cgit v1.2.3