C Language Development Kit/Snippets/Menu
From OptiWiki
Almost all terminal applications use a menu to give the user the oppertunity to choose between different features of the application. Below you'll find a description of some functions that can used to add a menu to your application.
Contents |
Sources of all menu functions
To be able to use the menu functions, include the following header file and source file and the input functions header and source file in your project.
| Header file | menu.h (source) |
|---|---|
| Source file | menu.c (source) |
Function to show a standard text menu
The following function can be used to show a text style menu.
ShowTextMenu() Shows a text style menu that adjusts its layout depending on the terminal type and the fontsize.
Function to show a text style selection menu
The following function can be used to show a text style selection menu.
ShowTextSelectionMenu() Shows a text style selection menu that adjusts its layout depending on the terminal type and the fontsize.
Helper Function for showing a graphical menu
The following needs to be used when using one of the graphical menu functions.
InitGraphMenu() Helper function that is normally placed in the main() to initialize the menu_layers item.
Function to show a graphical style menu
The following function can be used to show a graphical style menu.
ShowGraphMenu() Shows a graphical style menu that adjusts its layout depending on the terminal type.
Function to show a graphical style selection menu
The following function can be used to show a graphical style selection menu.
ShowGraphSelectionMenu() Shows a graphical style selection menu that adjusts its layout depending on the terminal type.
