From 2e577349b7fc72eb43c4f9b9d3a0ebd060372f7e Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sun, 6 Aug 2017 18:10:39 -0400 Subject: [PATCH] Add a small example to README. --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index f137a80..2f7906c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,25 @@ Library for interacting with the system's taskbar / tray / statusbar +## Example + +```rust +let mut bar = sysbar::Sysbar::new("Foo"); + +bar.add_item( + "Say 'bar'", + Box::new(move || { + println!("bar"); + }), +); + +bar.add_quit_item("Quit"); + +bar.display(); +``` + +![Resulting screenshot of code above](http://i.imgur.com/mEI6Mxy.png) + ## License Licensed under either of -- 2.51.2