Skip to content

🧩 MENU Generator Tool

πŸ“˜ Overview

The MENU Generator Tool is a web-based application that allows you to visually design hierarchical menus for the MENU_LIB library.
It generates ready-to-use menu.c and menu.h files compatible with the menu_t structure.

πŸ”— Live tool: https://niwciu.github.io/LCD_MENU_GENERATOR_APP/
πŸ’» Source code: GitHub β€” LCD_MENU_GENERATOR_APP


βš™οΈ Usage Workflow

  1. Open the tool
    Go to the web application link above.

  2. Add your first menu item
    Click the β€œ+” button next to the MENU label to create the first item.
    Enter the item name β€” it must not exceed (number of display columns - 1) characters.

  3. Add more items

  4. To add a new item on the same level, click the β€œ+” button next to the menu title again.
  5. To create a submenu, click the β€œ+” next to an existing item.

  6. Reorder items
    Use the up/down arrow buttons to move items within the same menu level.
    Moving items between different hierarchy levels is not supported β€” each item can only be reordered inside its current parent menu.

  7. Delete items
    Click the trash icon to remove an item together with all its sub-items.

  8. Save your structure
    Use the green Save icon (πŸ’Ύ) in the top bar to export your menu as a .json file.

  9. Load an existing menu
    Use the Open icon (πŸ“‚) to load a previously saved .json structure and edit it.

  10. Generate source code
    Click the green icon with a pencil and page βœοΈπŸ“„ to generate C source code.
    Two files will be generated:

  11. menu.c
  12. menu.h

  13. Enable callback generation (optional)
    To include function stubs for callbacks, enable the checkbox
    β€œEnable menu items execute callback generation”.
    Callback functions are generated only if a name is entered for that menu item.

  14. Export generated code

    • You can copy the generated code directly from the preview.
    • Or download ready .c and .h files and copy them into your project.

🧠 Notes

  • The generator automatically calculates menu depth and displays the current maximum depth in the UI (MAX MENU DEPTH: n).
  • It prevents creating structures that exceed the limits defined by MAX_MENU_DEPTH.
  • The output files are immediately ready to be compiled together with MENU_LIB.
  • Callback stubs are only added when a function name is provided in the input field.


Β© 2025 Niwciu β€” MENU_LIB
Web-based generator for creating menu structures compatible with MENU_LIB.