C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
Menu Struct Reference

The Menu structure is the main data structure for the menu application, containing all the information about the menu, its lines, and its display properties. More...

#include <menu.h>

Collaboration diagram for Menu:
[legend]

Data Fields

int argc
char ** argv
uint begx
uint begy
uint bg_clr_idx
uint bo_clr_idx
uint choice_max_len
char cmd [MAXLEN]
uint cols
bool f_cmd
bool f_help_spec
bool f_mapp_spec
bool f_provider_cmd
bool f_receiver_cmd
uint fg_clr_idx
char help_spec [MAXLEN]
uint item_count
Lineline [MAX_MENU_LINES]
uint line_idx
uint lines
char mapp_spec [MAXLEN]
char provider_cmd [MAXLEN]
char receiver_cmd [MAXLEN]
uint text_max_len
char title [MAXLEN]

Detailed Description

The Menu structure is the main data structure for the menu application, containing all the information about the menu, its lines, and its display properties.

Definition at line 105 of file menu.h.

Field Documentation

◆ argc

int Menu::argc

The number of arguments on the command line, used to determine how many arguments were passed to the menu application when it was executed

Definition at line 138 of file menu.h.

◆ argv

char** Menu::argv

The argument vector from the command line, used to access the specific arguments passed to the menu application when it was executed

Definition at line 141 of file menu.h.

◆ begx

uint Menu::begx

The screen column for the upper left corner of the menu window, used to determine the horizontal position of the menu display on the screen

Definition at line 121 of file menu.h.

Referenced by menu_cmd_processor(), menu_engine(), and new_menu().

◆ begy

uint Menu::begy

The screen line for the upper left corner of the menu window, used to determine the vertical position of the menu display on the screen

Definition at line 118 of file menu.h.

Referenced by menu_cmd_processor(), menu_engine(), and new_menu().

◆ bg_clr_idx

uint Menu::bg_clr_idx

Definition at line 109 of file menu.h.

◆ bo_clr_idx

uint Menu::bo_clr_idx

<The background color for the menu display, used to determine the color of the background in the menu display The color for the box around the menu, used to determine the color of the box in the menu display

Definition at line 112 of file menu.h.

◆ choice_max_len

uint Menu::choice_max_len

The longest choice text string of all menu lines, used to determine the width of the menu window, calculated based on the length of the choice_text for all menu lines and used to ensure that the menu window is wide enough to accommodate the longest choice text without truncation or wrapping

Definition at line 204 of file menu.h.

Referenced by menu_engine(), and parse_menu_description().

◆ cmd

char Menu::cmd[MAXLEN]

A command that can be executed in the foreground, possibly taking control of the screen, by the menu application, such as an editor or other program that is called by the menu application, used to specify a command that can be run in the foreground when selected from the menu, which may take control of the screen and require user interaction

Definition at line 170 of file menu.h.

◆ cols

uint Menu::cols

The number of columns for the menu window size, used to determine the width of the menu display

Definition at line 116 of file menu.h.

Referenced by menu_cmd_processor(), menu_engine(), and parse_menu_description().

◆ f_cmd

bool Menu::f_cmd

A flag to indicate whether the foreground command has been verified, used to indicate whether the command specified by cmd has been successfully verified and can be executed in the foreground when selected from the menu

Definition at line 200 of file menu.h.

◆ f_help_spec

bool Menu::f_help_spec

A flag to indicate whether the menu application help file has been verified, used to indicate whether the help file specified by help_spec has been successfully verified and can be used to provide help information for the menu application

Definition at line 182 of file menu.h.

Referenced by init_menu_files(), and menu_cmd_processor().

◆ f_mapp_spec

bool Menu::f_mapp_spec

A flag to indicate whether the menu application description file has been verified, used to indicate whether the menu description file specified by mapp_spec has been successfully verified and can be used to populate the menu lines and their properties

Definition at line 177 of file menu.h.

Referenced by init_menu_files().

◆ f_provider_cmd

bool Menu::f_provider_cmd

A flag to indicate whether the provider command has been verified, used to indicate whether the provider command specified by provider_cmd has been successfully verified and can be executed in the background to provide dynamic content for the menu display or for a program called by the menu application

Definition at line 187 of file menu.h.

◆ f_receiver_cmd

bool Menu::f_receiver_cmd

A flag to indicate whether the receiver command has been verified, used to indicate whether the receiver command specified by receiver_cmd has been successfully verified and can be executed in the background to process the output of a program called by the menu application

Definition at line 194 of file menu.h.

◆ fg_clr_idx

uint Menu::fg_clr_idx

The foreground color for the menu display, used to determine the color of the text and other elements in the menu display

Definition at line 106 of file menu.h.

◆ help_spec

char Menu::help_spec[MAXLEN]

The menu application help file spec, which may be a file name or a fully qualified path to a file, used to specify the location of the help file that contains the information about the menu application and how to use it

Definition at line 150 of file menu.h.

Referenced by init_menu_files(), and menu_cmd_processor().

◆ item_count

uint Menu::item_count

The number of menu lines in this menu, used to determine how many lines are currently defined in the menu and to manage the array of menu lines

Definition at line 216 of file menu.h.

Referenced by destroy_menu(), menu_cmd_processor(), menu_engine(), and parse_menu_description().

◆ line

Line* Menu::line[MAX_MENU_LINES]

An array of pointers to the menu line structures in this menu, used to store the information about each menu line, including its type, text, choice letter, command type, and command string, and to manage the menu lines in the menu display

Definition at line 223 of file menu.h.

Referenced by destroy_menu(), menu_cmd_processor(), menu_engine(), and parse_menu_description().

◆ line_idx

uint Menu::line_idx

The index of the currently selected menu line, used for highlighting and selection purposes, updated based on user input to indicate which menu line is currently selected and should be highlighted in the menu display

Definition at line 219 of file menu.h.

Referenced by destroy_menu(), menu_cmd_processor(), menu_engine(), and parse_menu_description().

◆ lines

uint Menu::lines

The number of lines for the menu window size, used to determine the height of the menu display

Definition at line 114 of file menu.h.

Referenced by menu_engine(), and parse_menu_description().

◆ mapp_spec

char Menu::mapp_spec[MAXLEN]

The menu application description file spec, which may be a file name or a fully qualified path to a file, used to specify the location of the menu description file that contains the information about the menu lines and their properties

Definition at line 144 of file menu.h.

Referenced by init_menu_files(), and parse_menu_description().

◆ provider_cmd

char Menu::provider_cmd[MAXLEN]

The provider command, which can be executed in the background to provide dynamic content for a program called by the menu application, used to specify a command that can be run in the background to generate dynamic content for the menu display or for a program that is called by the menu application

Definition at line 155 of file menu.h.

◆ receiver_cmd

char Menu::receiver_cmd[MAXLEN]

The receiver command, which can be executed in the background to process the output of a program called by the menu application, used to specify a command that can be run in the background to process the output of a program that is called by the menu application, such as parsing the output and updating the menu display or performing some other action based on the output

Definition at line 162 of file menu.h.

◆ text_max_len

uint Menu::text_max_len

The longest text string of all menu lines, used to determine the width of the menu window, calculated based on the length of the raw_text for all menu lines and used to ensure that the menu window is wide enough to accommodate the longest text without truncation or wrapping

Definition at line 210 of file menu.h.

Referenced by menu_engine(), and parse_menu_description().

◆ title

char Menu::title[MAXLEN]

The title to display on the top line of the box window, used to provide a title or header for the menu display

Definition at line 135 of file menu.h.

Referenced by menu_engine(), and parse_menu_description().


The documentation for this struct was generated from the following file: