Adds a menu and toolbar from annotated functions. It uses the top-level annotations from this module, so it is better to put the commands in a separate struct instad of in your window subclass, to avoid potential conflicts with method names (if you do hit one though, you can use @(.icon(...)) instead of plain @icon(...) to disambiguate, though).
Adds a menu and toolbar from annotated functions. It uses the top-level annotations from this module, so it is better to put the commands in a separate struct instad of in your window subclass, to avoid potential conflicts with method names (if you do hit one though, you can use @(.icon(...)) instead of plain @icon(...) to disambiguate, though).
Note that you can call this function multiple times and it will add the items in order to the given items.