Struct leechbar::Bar [−][src]
pub struct Bar { /* fields omitted */ }
The main bar.
Examples
To create a bar you use the BarBuilder
.
This is the easiest way to get started:
use leechbar::BarBuilder; let bar = BarBuilder::new().spawn().unwrap();
Methods
impl Bar
[src]
impl Bar
pub fn start_event_loop(&self)
[src]
pub fn start_event_loop(&self)
Start the event loop of the bar. This handles all X.Org events and is blocking.
It must be called after adding all your components.
Examples
use leechbar::BarBuilder; let bar = BarBuilder::new().spawn().unwrap(); bar.start_event_loop();
pub fn add<T: 'static + Component + Send>(&mut self, component: T)
[src]
pub fn add<T: 'static + Component + Send>(&mut self, component: T)
Add a new component to the bar.
Examples
use leechbar::{BarBuilder, Component}; struct MyComponent; impl Component for MyComponent {} let mut bar = BarBuilder::new().spawn().unwrap(); bar.add(MyComponent);