2010-11-12 11:03:57 +03:00
|
|
|
/** \file listbox-window.h
|
|
|
|
* \brief Header: Listbox widget, a listbox within dialog window
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MC__LISTBOX_DIALOG_H
|
|
|
|
#define MC__LISTBOX_DIALOG_H
|
|
|
|
|
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
|
2015-10-04 15:14:16 +03:00
|
|
|
#define LISTBOX_APPEND_TEXT(l,h,t,d,f) \
|
|
|
|
listbox_add_item (l->list, LISTBOX_APPEND_AT_END, h, t, d, f)
|
2010-11-12 11:03:57 +03:00
|
|
|
|
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-03-03 22:51:40 +03:00
|
|
|
WDialog *dlg;
|
|
|
|
WListbox *list;
|
2010-11-12 11:03:57 +03:00
|
|
|
} Listbox;
|
|
|
|
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
|
|
|
|
/* Listbox utility functions */
|
2023-03-18 09:45:24 +03:00
|
|
|
Listbox *listbox_window_centered_new (int center_y, int center_x, int lines, int cols,
|
|
|
|
const char *title, const char *help);
|
|
|
|
Listbox *listbox_window_new (int lines, int cols, const char *title, const char *help);
|
|
|
|
int listbox_run (Listbox * l);
|
|
|
|
void *listbox_run_with_data (Listbox * l, const void *select);
|
2010-11-12 11:03:57 +03:00
|
|
|
|
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
|
|
|
|
#endif /* MC__LISTBOX_DIALOG_H */
|