Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.32 KB

File metadata and controls

34 lines (28 loc) · 1.32 KB

MenuAPI

MenuAPI is a library written in C with which developers can build a menu driven application with ease

How to use MenuAPI

MenuAPI is easy to install on your project

Step#1 : Include the menu_api to your project

         #include "menu_api.h"

Step#2 : Define a global Variable with MENU_SIZE

         #define MENU_SIZE 2
       *change the value 2 to number of menu options*

Step#3 : Declare a string array with menusize and initialize with the menu options

         char *menuOptions[MENU_SIZE]={"Patient","Management / Doctor"};
      *change the menuOptions variable with all the menu options*

Step#4 : Declare a functionPointerList array with menusize and initialize with the functions to call for each menu item selection.

         void (*functionList[MENU_SIZE])()={&defaultFunction, &defaultFunction}; 
      *change the &funcName with your required function to be called when a men*

Step#5 : Invoking the method with above 3 variables and the MenuNavigation String

          displayMenu(MENU_SIZE, menuOptions, functionList, "Home "); 			
          displayMenu(<size-of-menu>, <function-list-containing-address>, <page-navigation-title>)