Prototype for a Menu Function.
More...
Prototype for a Menu Function.
- Parameters
-
menu | Menu |
op | Operation to perform, e.g. OP_NEXT_PAGE |
- Return values
-
◆ menu_movement()
static int menu_movement |
( |
struct Menu * |
menu, |
|
|
int |
op |
|
) |
| |
|
static |
Handle all the common Menu movements - Implements menu_function_t -.
Definition at line 139 of file functions.c.
140{
141 switch (op)
142 {
143 case OP_BOTTOM_PAGE:
146
147 case OP_CURRENT_BOTTOM:
150
151 case OP_CURRENT_MIDDLE:
154
155 case OP_CURRENT_TOP:
158
159 case OP_FIRST_ENTRY:
162
163 case OP_HALF_DOWN:
166
167 case OP_HALF_UP:
170
171 case OP_LAST_ENTRY:
174
175 case OP_MIDDLE_PAGE:
178
179 case OP_NEXT_ENTRY:
182
183 case OP_NEXT_LINE:
186
187 case OP_NEXT_PAGE:
190
191 case OP_PREV_ENTRY:
194
195 case OP_PREV_LINE:
198
199 case OP_PREV_PAGE:
202
203 case OP_TOP_PAGE:
206
207 default:
209 }
210}
@ FR_SUCCESS
Valid function - successfully performed.
@ FR_UNKNOWN
Unknown function.
◆ menu_search()
static int menu_search |
( |
struct Menu * |
menu, |
|
|
int |
op |
|
) |
| |
|
static |
◆ op_help()
static int op_help |
( |
struct Menu * |
menu, |
|
|
int |
op |
|
) |
| |
|
static |
Show the help screen - Implements menu_function_t -.
Definition at line 229 of file functions.c.
230{
234}
void mutt_help(enum MenuType menu)
Display the help menu.
◆ op_jump()
static int op_jump |
( |
struct Menu * |
menu, |
|
|
int |
op |
|
) |
| |
|
static |
Jump to an index number - Implements menu_function_t -.
Definition at line 239 of file functions.c.
240{
242 {
245 }
246
247 const int digit = op - OP_JUMP;
249 {
251 }
252
256 {
257 int n = 0;
258 if (mutt_str_atoi_full(
buf_string(buf), &n) && (n > 0) && (n < (menu->
max + 1)))
259 {
261 }
262 else
263 {
265 }
266 }
267
270}
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
int buf_get_field(const char *field, struct Buffer *buf, CompletionFlags complete, bool multiple, struct Mailbox *m, char ***files, int *numfiles)
Ask the user for a string.
#define MUTT_COMP_NO_FLAGS
No flags are set.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
String manipulation buffer.