improv(menu): simplify menu construction.

- Added `MenuAction` trait to call the `message` method on button press.
- Added two new methods to construct a MenuTree.
- Added MenuItem enum to represent an action or a separator in a MenuTree.
- Added menu example.
- Moved Modifier enum and KeyBind struct to libcosmic.
- Moved menu_button macro to libcosmic.
This commit is contained in:
Eduardo Flores 2024-03-16 15:38:26 -07:00 committed by Jeremy Soller
parent 9e6d94c7eb
commit 0b47efe1de
6 changed files with 346 additions and 0 deletions

View file

@ -54,7 +54,9 @@
//! ```
//!
pub mod action;
mod flex;
pub mod key_bind;
pub mod menu_bar;
mod menu_inner;
pub mod menu_tree;