summaryrefslogtreecommitdiffstats
path: root/src/hbox.rs
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-02-12 22:55:16 +0100
committerrabite <rabite@posteo.de>2019-02-12 22:55:16 +0100
commit56d9c3521599baef6ff1472c0c95fa07f17a5a67 (patch)
tree48f16edb6cc49a71bd9d438072f7c2d4848c3ac7 /src/hbox.rs
parent1c500d91cf7389850e9f32b14d8ae210a7e62888 (diff)
async widget
Diffstat (limited to 'src/hbox.rs')
-rw-r--r--src/hbox.rs16
1 files changed, 2 insertions, 14 deletions
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<T: Widget> {
}
-impl<T> HBox<T> where T: Widget {
+impl<T> HBox<T> where T: Widget + PartialEq {
pub fn new() -> HBox<T> {
HBox { coordinates: Coordinates::new(),
widgets: vec![],
@@ -78,7 +78,7 @@ impl<T> HBox<T> where T: Widget {
-impl<T> Widget for HBox<T> where T: Widget {
+impl<T> Widget for HBox<T> where T: Widget + PartialEq {
fn render_header(&self) -> String {
self.active_widget().render_header()
}
@@ -96,18 +96,6 @@ impl<T> Widget for HBox<T> 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
}