|
C-Menu 0.2.9
A User Interface Toolkit
|
functions to create popup windows More...
#include "common.h"Go to the source code of this file.
Functions | |
| int | popup_form (Init *init, int argc, char **argv, int begy, int begx) |
| instantiate a form popup window | |
| int | popup_menu (Init *init, int argc, char **argv, int begy, int begx) |
| instantiate a menu popup window | |
| int | popup_pick (Init *init, int argc, char **argv, int begy, int begx) |
| instantiate a pick popup window | |
| int | popup_view (Init *init, int argc, char **argv, int lines, int cols, int begy, int begx) |
| instantiate a view popup window | |
functions to create popup windows
This file contains functions to create popup windows for menu, form, pick, and view. The functions in this file are called by the main function in main.c when the user selects a menu option that requires a popup window. The functions in this file also handle command line arguments that may be passed to the popup windows, such as the number of lines and columns for the view window, and the y and x coordinates for the popup windows. The functions in this file also save the current state of the popup windows before creating a new one, and restore the state after the popup window is closed. The functions in this file also call the appropriate functions to initialize and destroy the popup windows, and to handle the user input for the popup windows. The functions in this file also return the appropriate return codes to the main function in main.c, which will determine how to proceed based on the return codes. The functions in this file also handle any errors that may occur during the creation and handling of the popup windows, and will return appropriate error codes to the main function in main.c, which will determine how to proceed based on the error codes. The functions in this file also handle any cleanup that may be necessary after the popup windows are closed, such as freeing memory and resetting variables. The functions in this file also handle any necessary updates to the main window after the popup windows are closed, such as refreshing the main window and updating any relevant data.
Definition in file popups.c.
| int popup_form | ( | Init * | init, |
| int | argc, | ||
| char ** | argv, | ||
| int | begy, | ||
| int | begx ) |
instantiate a form popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| begy | the y coordinate for the form window |
| begx | the x coordinate for the form window |
begy and begx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 113 of file popups.c.
References Init::argc, Init::argv, destroy_form(), form, Init::form, init_form(), parse_opt_args(), and zero_opt_args().
Referenced by enter_file_spec(), and menu_cmd_processor().
| int popup_menu | ( | Init * | init, |
| int | argc, | ||
| char ** | argv, | ||
| int | begy, | ||
| int | begx ) |
instantiate a menu popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| begy | the y coordinate for the menu window |
| begx | the x coordinate for the menu window |
begy and begx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 53 of file popups.c.
References Init::argc, Init::argv, destroy_menu(), Init::menu, menu_engine(), new_menu(), parse_opt_args(), and zero_opt_args().
Referenced by menu_cmd_processor().
| int popup_pick | ( | Init * | init, |
| int | argc, | ||
| char ** | argv, | ||
| int | begy, | ||
| int | begx ) |
instantiate a pick popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| begy | the y coordinate for the pick window |
| begx | the x coordinate for the pick window |
begy and begx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 83 of file popups.c.
References Init::argc, Init::argv, destroy_pick(), init_pick(), parse_opt_args(), Init::pick, pick, and zero_opt_args().
Referenced by menu_cmd_processor().
| int popup_view | ( | Init * | init, |
| int | argc, | ||
| char ** | argv, | ||
| int | lines, | ||
| int | cols, | ||
| int | begy, | ||
| int | begx ) |
instantiate a view popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| lines | the number of lines for the view window |
| cols | the number of columns for the view window |
| begy | the y coordinate for the view window |
| begx | the x coordinate for the view window |
lines, cols, begy, and begx may also be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
lines, cols, begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 146 of file popups.c.
References Init::begx, View::begx, Init::begy, View::begy, Init::cols, View::cols, destroy_view(), View::f_full_screen, init_view_boxwin(), Init::lines, View::lines, new_view(), parse_opt_args(), View::title, Init::view, view, view_calc_win_dimensions(), view_file(), win_del(), and zero_opt_args().
Referenced by display_pick_help(), exec_objects(), form_engine(), form_exec_receiver(), menu_cmd_processor(), and view_display_help().