Library which creates a serial test console, it supports pages and menu items. The items are added and the pages are added as necessary when the user sets it up. This is a great too for creating an easy to maintain menu system, whether for a test sytem, or anything else.
Dependencies: Terminal
Diff: page.h
- Revision:
- 3:f308cd7a34ed
- Parent:
- 0:907d2d5e77f7
- Child:
- 6:e992366d0684
--- a/page.h Fri May 01 13:34:09 2015 +0000 +++ b/page.h Fri May 01 15:08:49 2015 +0000 @@ -30,7 +30,10 @@ char max_number_cmd; int page_num; bool refresh_required; - MenuItem& add_item(MenuItem const &item_p); + Page& add(Page &page_p) { return add(MenuItem(page_p)); } + Page& add(char const *text) { return add(MenuItem(text, NULL, 0, heading)); } + Page& add(char const *text, MenuAction *action_p) { return add(MenuItem(text, action_p, 0, ::display, -1)); } + Page& add(MenuItem const &item_p); void display(); void update(); char * set_active() {make_active_flag = true; return NULL;} //flag the current page to be active