updated the .TP cleanup for coherency in the key description pages.
[midnight-commander.git] / src / wtools.h
blob433d67f7f16b47f8e56611d450cd44cdb7c1dda4
1 #ifndef __WTOOLS_H
2 #define __WTOOLS_H
4 /* Listbox utility functions */
5 typedef struct {
6 Dlg_head *dlg;
7 WListbox *list;
8 } Listbox;
10 Listbox *create_listbox_window (int cols, int lines, char *title, char *help);
11 #define LISTBOX_APPEND_TEXT(l,h,t,d) \
12 listbox_add_item (l->list, 0, h, t, d);
14 int run_listbox (Listbox *l);
16 /* Quick Widgets */
17 enum {
18 quick_end, quick_checkbox,
19 quick_button, quick_input,
20 quick_label, quick_radio
21 } /* quick_t */;
23 /* The widget is placed on relative_?/divisions_? of the parent widget */
24 /* Please note that the contents of the fields in the union are just */
25 /* used for setting up the dialog. They are a convenient place to put */
26 /* the values for a widget */
28 typedef struct {
29 int widget_type;
30 int relative_x;
31 int x_divisions;
32 int relative_y;
33 int y_divisions;
35 char *text; /* Text */
36 int hotkey_pos; /* the hotkey position */
37 int value; /* Buttons only: value of button */
38 int *result; /* Checkbutton: where to store result */
39 char **str_result; /* Input lines: destination */
40 char *tkname; /* Name of the widget used for Tk only */
41 void *the_widget; /* For the quick quick dialog manager */
42 } QuickWidget;
44 typedef struct {
45 int xlen, ylen;
46 int xpos, ypos; /* if -1, then center the dialog */
47 char *title;
48 char *help;
49 QuickWidget *widgets;
50 int i18n; /* If true, internationalization has happened */
51 } QuickDialog;
53 int quick_dialog (QuickDialog *qd);
54 int quick_dialog_skip (QuickDialog *qd, int nskip);
56 /* The input dialogs */
58 /* Pass this as def_text to request a password */
59 #define INPUT_PASSWORD ((char *) -1)
61 char *input_dialog (char *header, char *text, char *def_text);
62 char *input_dialog_help (char *header, char *text, char *help, char *def_text);
63 char *input_expand_dialog (char *header, char *text, char *def_text);
64 char *real_input_dialog (char *header, char *text, char *def_text);
65 char *real_input_dialog_help (char *header, char *text, char *help, char *def_text);
67 void query_set_sel (int new_sel);
68 #endif /* __WTOOLS_H */