After writing a configuration file, run `stamen <config file>` which
will create source file and include file in the current directory with the name
as the configuration file but with extensions `.cpp` and `.hpp` respectively.
You can create files with extensions `.c` and `.h` by appending adding `--c`
flag to the command line arguments.
Include file will contain declarations for all of the menu functions. You
should include this file in your code.
Include file will contain declarations for all of the menu functions, as well
as the class to be used in this specific menu instance. You should include this
file in your code.
Source file contains definitions for the menu functions. It also includes
`shared.h` file which should contain declarations for all of the free functions
you have specified in the configuration. The name of the file with free functions
can be changed with `--header NAME` flag;
Generated source file should be compiled with the rest of your code, as it
contains definitions for the menu functions.
Custom display function to be used can be set with `-d FUNC` flag. Specified
function will be forward-declared according to `stamen_display_f`, so you
don't have to worry about doing it yourself.
User should give a definition of `menu_t::visit(const menu_t& menu)`, that
actually renders the menu end prompts the user for action.
Generated source file should be compiled with the rest of your code. If
`stamen_builtin_display` is not used, there is no need to link with the stamen library.
You can call any function to display the menu starting from that specific pane.
You can call any function to display the menu starting from that specific panel.
### Custom display function
Please refer to the implementation of `stamen_builtin_display` to get a general
Please refer to the implementation in `example/static.cpp` to get a general
idea of the direction.
A display function should have `int name(const char*, const stamen_item_t[], int)`
signature as prescribed by `stamen_display_f`.
After prompting user to select one of the items all you have to do is call a
function pointed to by the callback field on selected item to invoke the next
panel or free function. The return type of int is intended to be used as a