2 * \brief Header: quick dialog engine
8 #include "lib/tty/mouse.h"
10 /*** typedefs(not structures) and defined constants **********************************************/
12 #define QUICK_CHECKBOX(x, xdiv, y, ydiv, txt, st) \
14 .widget_type = quick_checkbox, \
16 .x_divisions = xdiv, \
18 .y_divisions = ydiv, \
29 #define QUICK_BUTTON(x, xdiv, y, ydiv, txt, act, cb) \
31 .widget_type = quick_button, \
33 .x_divisions = xdiv, \
35 .y_divisions = ydiv, \
47 #define QUICK_INPUT(x, xdiv, y, ydiv, txt, len_, flags_, hname, res) \
49 .widget_type = quick_input, \
51 .x_divisions = xdiv, \
53 .y_divisions = ydiv, \
67 #define QUICK_LABEL(x, xdiv, y, ydiv, txt) \
69 .widget_type = quick_label, \
71 .x_divisions = xdiv, \
73 .y_divisions = ydiv, \
83 #define QUICK_RADIO(x, xdiv, y, ydiv, cnt, items_, val) \
85 .widget_type = quick_radio, \
87 .x_divisions = xdiv, \
89 .y_divisions = ydiv, \
101 #define QUICK_GROUPBOX(x, xdiv, y, ydiv, w, h, t) \
103 .widget_type = quick_groupbox, \
105 .x_divisions = xdiv, \
107 .y_divisions = ydiv, \
121 .widget_type = quick_end, \
139 /*** enums ***************************************************************************************/
153 /*** structures declarations (and typedefs of structures)*****************************************/
155 /* The widget is placed on relative_?/divisions_? of the parent widget */
166 widget_options_t options
;
168 /* widget parameters */
174 int *state
; /* in/out */
188 int flags
; /* 1 -- is_password, 2 -- INPUT_COMPLETE_CD */
189 const char *histname
;
191 gboolean strip_password
;
203 int *value
; /* in/out */
218 int xpos
, ypos
; /* if -1, then center the dialog */
221 QuickWidget
*widgets
;
224 gboolean i18n
; /* If true, internationalization has happened */
227 /*** global variables defined in .c file *********************************************************/
229 /*** declarations of public functions ************************************************************/
231 int quick_dialog_skip (QuickDialog
* qd
, int nskip
);
233 /*** inline functions ****************************************************************************/
236 quick_dialog (QuickDialog
* qd
)
238 return quick_dialog_skip (qd
, 0);
241 #endif /* MC__QUICK_H */