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