@@ -83,9 +83,6 @@ impl Tray {
}
impl widget::Widget for Tray {
- fn init(&mut self) {
- }
-
fn width(&mut self) -> u16 {
(self.children.len() * 20) as u16
@@ -5,11 +5,13 @@ use std::rc::Rc;
use std::sync::Arc;
pub trait Widget {
- fn init(&mut self);
+ fn init(&mut self) {}
fn render(&mut self, x: u16);
fn width(&mut self) -> u16;
- fn handle_event(&mut self, event: &xcb::GenericEvent, is_finishing: bool) -> bool;
+ fn handle_event(&mut self, _event: &xcb::GenericEvent, _is_finishing: bool) -> bool {
- fn finish(&mut self);
+ false
+ }
+ fn finish(&mut self) {}
pub struct DrawContext {