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]

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();

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);

Trait Implementations

impl Clone for Bar
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Bar

impl Sync for Bar