11 /* Listbox utility functions */
12 Listbox
*create_listbox_window (int cols
, int lines
, const char *title
, const char *help
);
13 #define LISTBOX_APPEND_TEXT(l,h,t,d) \
14 listbox_add_item (l->list, LISTBOX_APPEND_AT_END, h, t, d)
16 int run_listbox (Listbox
*l
);
20 quick_end
, quick_checkbox
,
21 quick_button
, quick_input
,
22 quick_label
, quick_radio
25 /* The widget is placed on relative_?/divisions_? of the parent widget */
34 const char *text
; /* Text */
35 int hotkey_pos
; /* the hotkey position */
36 int value
; /* Buttons only: value of button */
37 int *result
; /* Checkbutton: where to store result */
38 char **str_result
; /* Input lines: destination */
39 const char *histname
; /* Name of the section for saving history */
41 #define NULL_QuickWidget { 0, 0, 0, 0, 0, NULL, 0, 0, NULL, NULL, NULL }
45 int xpos
, ypos
; /* if -1, then center the dialog */
49 int i18n
; /* If true, internationalization has happened */
52 int quick_dialog (QuickDialog
*qd
);
53 int quick_dialog_skip (QuickDialog
*qd
, int nskip
);
55 /* The input dialogs */
57 /* Pass this as def_text to request a password */
58 #define INPUT_PASSWORD ((char *) -1)
60 char *input_dialog (const char *header
, const char *text
, const char *def_text
);
61 char *input_dialog_help (const char *header
, const char *text
, const char *help
, const char *def_text
);
62 char *input_expand_dialog (const char *header
, const char *text
, const char *def_text
);
64 void query_set_sel (int new_sel
);
66 /* Create message box but don't dismiss it yet, not background safe */
67 struct Dlg_head
*create_message (int flags
, const char *title
,
68 const char *text
, ...)
69 __attribute__ ((format (__printf__
, 3, 4)));
71 /* Show message box, background safe */
72 void message (int flags
, const char *title
, const char *text
, ...)
73 __attribute__ ((format (__printf__
, 3, 4)));
76 /* Use this as header for message() - it expands to "Error" */
77 #define MSG_ERROR ((char *) -1)
79 int query_dialog (const char *header
, const char *text
, int flags
, int count
, ...);
81 /* flags for message() and query_dialog() */
85 } /* dialog options */;