listbox-window.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /** \file listbox-window.h
  2. * \brief Header: Listbox widget, a listbox within dialog window
  3. */
  4. #ifndef MC__LISTBOX_DIALOG_H
  5. #define MC__LISTBOX_DIALOG_H
  6. /*** typedefs(not structures) and defined constants **********************************************/
  7. #define LISTBOX_APPEND_TEXT(l,h,t,d,f) \
  8. listbox_add_item (l->list, LISTBOX_APPEND_AT_END, h, t, d, f)
  9. /*** enums ***************************************************************************************/
  10. /*** structures declarations (and typedefs of structures)*****************************************/
  11. typedef struct
  12. {
  13. WDialog *dlg;
  14. WListbox *list;
  15. } Listbox;
  16. /*** global variables defined in .c file *********************************************************/
  17. /*** declarations of public functions ************************************************************/
  18. /* Listbox utility functions */
  19. Listbox *listbox_window_centered_new (int center_y, int center_x, int lines, int cols,
  20. const char *title, const char *help);
  21. Listbox *listbox_window_new (int lines, int cols, const char *title, const char *help);
  22. int listbox_run (Listbox * l);
  23. void *listbox_run_with_data (Listbox * l, const void *select);
  24. /*** inline functions ****************************************************************************/
  25. #endif /* MC__LISTBOX_DIALOG_H */