#BasicMenu Library
______ _ ___ ___
| ___ \ (_) | \/ |
| |_/ / __ _ ___ _ ___| . . | ___ _ __ _ _
| ___ \/ _` / __| |/ __| |\/| |/ _ \ '_ \| | | |
| |_/ / (_| \__ \ | (__| | | | __/ | | | |_| |
\____/ \__,_|___/_|\___\_| |_/\___|_| |_|\__,_|
Basicmenu is a an open source library coded in C, allows the programmer to create and display a menu easily in his/her console application on linux and mac os x, works with C/C++ programs.
Example of program uses basicmenu library
##Installation:
There is no installation required, you need just to download the basicmenu.h file, include it in your code then start use the libray :)
#include "basicmenu.h"
##Essential functions:
To use this library , you have just to learn about some basic functions
1. Start the basic menu library :
First you need to tell the program that you will use the library
to do this, invoke startBasicMenu()
function in the beginning of the main.
2. Create and initialize a new menu:
To create a new menu you need to declare it with its type:
custom_Menu* mymenu;
To initialize it with the init_new_menu()
function:
init_new_menu (&mymenu);
3. Add a new item to the menu:
Any menu , need to have at least tow items, to add a new item to the menu use the addNewItem()
function:
addNewItem (&mymenu , "Choice number one!");
addNewItem (&mymenu , "Choice number tow!");
You can add unlimited number of items, but be careful to don't exceed the console size :)
see the TODO list.
4. Put and display a menu into the program:
To display the menu you need to invoke the put_menu()
function.
example: Link
TODO:
- Allow the programmer to add unlimited items to the menu.
- Add a scroll menu option.
- Add the maximum of items to shown on the menu.
Useful functions:
- item_border_ON() & item_border_OFF()
- menu_border_ON() & menu_border_OFF();
- BG_COLOR_ON() & BG_COLOR_OFF()
for more functions and examples please visit this page
Are you a developer?
Fork me on GitHub:
I'll be very happy to take pull requests from others, Go ahead and fork me.
Documentation:
for code documentation please visit http://cyounes.com/basicmenu/doc/index.html
##Who are you ?
I'm Younes CHEIKH, read more about me