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:
- glansberry
- Date:
- 2015-05-01
- Revision:
- 0:907d2d5e77f7
- Child:
- 3:f308cd7a34ed
File content as of revision 0:907d2d5e77f7:
#include "menuitem.h" MenuItem::MenuItem() : Name(NULL), level(0), type(display), callback(NULL), name_len(0), data_col(0), target_page(-1) {} MenuItem::MenuItem(const char * Name_p, callback_function callback_p, int level_p, MenuType type_p, int target_page_p) :Name(Name_p), level(level_p), type(type_p), target_page(target_page_p){ callback = callback_p; name_len = strlen(Name); } MenuItem::MenuItem(const char * Name_p, int target_page_p ): Name(Name_p), level(0), type(menu), callback(NULL), data_col(0), target_page(target_page_p) { name_len = strlen(Name); }