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
menuitem.cpp
- Committer:
- iillyyaa
- Date:
- 2015-05-01
- Revision:
- 3:f308cd7a34ed
- Parent:
- 0:907d2d5e77f7
- Child:
- 6:e992366d0684
File content as of revision 3:f308cd7a34ed:
#include "menuitem.h" #include "page.h" MenuItem::MenuItem() : name(NULL), level(0), type(display), action(NULL), name_len(0), data_col(0), target_page(-1) {} MenuItem::MenuItem(const char * name_p, MenuAction *action_p, int level_p, MenuType type_p, int target_page_p): name(name_p), level(level_p), type(type_p), action(action_p), name_len(strlen(name_p)), data_col(0), target_page(target_page_p) {} MenuItem::MenuItem(Page &target_page_p): name(target_page_p.Name), level(0), type(menu), action(NULL), name_len(strlen(name)), data_col(0), target_page(target_page_p.page_num) {}