119 c_menu_context =
MIN(c_menu_context, (page / 2));
124 int bottom = top + page;
126 if (index < top + c_menu_context)
127 top = index - c_menu_context;
128 else if (index >= (bottom - c_menu_context))
129 top = index - page + c_menu_context + 1;
133 if ((index < top) || (index >= (top + page)))
134 top = (index / page) * page;
135 int bottom = top + page;
138 if (index < (top + c_menu_context))
139 top = index - page + c_menu_context + 1;
140 else if (index >= (bottom - c_menu_context))
141 top = index - c_menu_context;
149 if (!c_menu_move_off && (top >= (menu->
max - page)))
151 top = menu->
max - page;
167 c_menu_context =
MIN(c_menu_context, (menu->
page_len / 2));
171 min += c_menu_context;
174 if (max < (menu->
max - 1))
175 max -= c_menu_context;
181 else if (index > max)
200 c_menu_context =
MIN(c_menu_context, (menu->
page_len / 2));
203 if (index < c_menu_context)
206 int top = menu->
top + relative;
213 int max = menu->
max - 1;
217 max -= c_menu_context;
240 else if (index >= menu->
max)
241 index = menu->
max - 1;
259 c_menu_context =
MIN(c_menu_context, (menu->
page_len / 2));
262 int top = menu->
top + relative;
267 else if (c_menu_move_off && (top >= (menu->
max - c_menu_context)))
269 top = menu->
max - c_menu_context - 1;
271 else if (!c_menu_move_off && ((top + menu->
page_len) >= menu->
max))
282 else if (index >= (top + menu->
page_len))
286 if (index < c_menu_context)
291 else if (!c_menu_move_off && (index > (menu->
max - c_menu_context)))
297 if (top == menu->
top)
302 else if (index > (top + menu->
page_len - c_menu_context - 1))
352 if (i > (menu->
max - 1))
372 if (index > (menu->
max - 1))
373 index = menu->
max - 1;
452 if (c_menu_context > (menu->
page_len / 2))
455 c_menu_context =
MIN(c_menu_context, (menu->
page_len / 2));
473 if (c_menu_context > (menu->
page_len / 2))
493 if (c_menu_context > (menu->
page_len / 2))
496 c_menu_context =
MIN(c_menu_context, (menu->
page_len / 2));
498 menu->
current - c_menu_context));
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
@ LL_NOTIFY
Log of notifications.
MenuRedrawFlags menu_next_page(struct Menu *menu)
Move the focus to the next page in the menu.
MenuRedrawFlags menu_bottom_page(struct Menu *menu)
Move the focus to the bottom of the page.
void menu_adjust(struct Menu *menu)
Reapply the config to the Menu.
MenuRedrawFlags menu_half_up(struct Menu *menu)
Move the focus up half a page in the menu.
MenuRedrawFlags menu_prev_line(struct Menu *menu)
Move the view up one line, keeping the selection the same.
MenuRedrawFlags menu_current_bottom(struct Menu *menu)
Move the current selection to the bottom of the window.
MenuRedrawFlags menu_move_view_relative(struct Menu *menu, int relative)
Move the view relatively.
static int calc_move_view(struct Menu *menu, int relative)
Move the view.
MenuRedrawFlags menu_current_middle(struct Menu *menu)
Move the current selection to the centre of the window.
MenuRedrawFlags menu_middle_page(struct Menu *menu)
Move the focus to the centre of the page.
MenuRedrawFlags menu_set_and_notify(struct Menu *menu, int top, int index)
Set the Menu selection/view and notify others.
MenuRedrawFlags menu_first_entry(struct Menu *menu)
Move the focus to the first entry in the menu.
MenuRedrawFlags menu_half_down(struct Menu *menu)
Move the focus down half a page in the menu.
MenuRedrawFlags menu_top_page(struct Menu *menu)
Move the focus to the top of the page.
MenuRedrawFlags menu_move_selection(struct Menu *menu, int index)
Move the selection, keeping within between [0, menu->max].
MenuRedrawFlags menu_last_entry(struct Menu *menu)
Move the focus to the last entry in the menu.
MenuRedrawFlags menu_prev_page(struct Menu *menu)
Move the focus to the previous page in the menu.
static int calc_fit_selection_to_view(struct Menu *menu, int top, int index)
Move the selection into the view.
static int menu_drag_view(struct Menu *menu, int top, int index)
Move the view around the selection.
MenuRedrawFlags menu_next_line(struct Menu *menu)
Move the view down one line, keeping the selection the same.
MenuRedrawFlags menu_prev_entry(struct Menu *menu)
Move the focus to the previous item in the menu.
MenuRedrawFlags menu_current_top(struct Menu *menu)
Move the current selection to the top of the window.
MenuRedrawFlags menu_next_entry(struct Menu *menu)
Move the focus to the next item in the menu.
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
#define WA_REPAINT
Redraw the contents of the Window.
@ NT_MENU
Menu has changed, MenuRedrawFlags.
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.