mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Merge with http://elinks.cz/elinks.git
This commit is contained in:
commit
9b9da06eb7
@ -57,7 +57,9 @@ update_all_widgets(struct dialog_data *dlg_data)
|
||||
{
|
||||
struct widget_data *widget_data;
|
||||
|
||||
foreach_widget(dlg_data, widget_data) {
|
||||
/* Iterate backwards rather than forwards so that listboxes are drawn
|
||||
* last, which means that they can grab the cursor. Yes, 'tis hacky. */
|
||||
foreach_widget_back(dlg_data, widget_data) {
|
||||
display_widget(dlg_data, widget_data);
|
||||
}
|
||||
}
|
||||
|
@ -131,6 +131,7 @@ void refresh_dialog(struct dialog_data *, dialog_refresh_handler_T handler, void
|
||||
void select_widget(struct dialog_data *dlg_data, struct widget_data *widget_data);
|
||||
struct widget_data *select_widget_by_id(struct dialog_data *dlg_data, int i);
|
||||
|
||||
#define before_widgets(dlg_data) (&(dlg_data)->widgets_data[-1])
|
||||
#define end_of_widgets(dlg_data) (&(dlg_data)->widgets_data[(dlg_data)->number_of_widgets])
|
||||
#define first_widget(dlg_data) (&(dlg_data)->widgets_data[0])
|
||||
#define last_widget(dlg_data) (&(dlg_data)->widgets_data[(dlg_data)->number_of_widgets - 1])
|
||||
@ -140,6 +141,11 @@ struct widget_data *select_widget_by_id(struct dialog_data *dlg_data, int i);
|
||||
(widget_data) != end_of_widgets(dlg_data); \
|
||||
(widget_data)++)
|
||||
|
||||
#define foreach_widget_back(dlg_data, widget_data) \
|
||||
for ((widget_data) = last_widget(dlg_data); \
|
||||
(widget_data) != before_widgets(dlg_data); \
|
||||
(widget_data)--)
|
||||
|
||||
#define is_selected_widget(dlg_data, widget_data) ((widget_data) == selected_widget(dlg_data))
|
||||
|
||||
#define add_dlg_end(dlg, n) \
|
||||
|
Loading…
Reference in New Issue
Block a user