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 141 of file functions.c.
142{
143 switch (op)
144 {
145 case OP_BOTTOM_PAGE:
148
149 case OP_CURRENT_BOTTOM:
152
153 case OP_CURRENT_MIDDLE:
156
157 case OP_CURRENT_TOP:
160
161 case OP_FIRST_ENTRY:
164
165 case OP_HALF_DOWN:
168
169 case OP_HALF_UP:
172
173 case OP_LAST_ENTRY:
176
177 case OP_MIDDLE_PAGE:
180
181 case OP_NEXT_ENTRY:
184
185 case OP_NEXT_LINE:
188
189 case OP_NEXT_PAGE:
192
193 case OP_PREV_ENTRY:
196
197 case OP_PREV_LINE:
200
201 case OP_PREV_PAGE:
204
205 case OP_TOP_PAGE:
208
209 default:
211 }
212}
@ 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 231 of file functions.c.
232{
236}
void mutt_help(enum MenuType menu)
Display the Help Page.
◆ op_jump()
| static int op_jump |
( |
struct Menu * | menu, |
|
|
int | op ) |
|
static |
Jump to an index number - Implements menu_function_t -.
Definition at line 241 of file functions.c.
242{
244 {
247 }
248
249 const int digit = op - OP_JUMP;
251 {
253 }
254
258 {
259 int n = 0;
260 if (mutt_str_atoi_full(
buf_string(buf), &n) && (n > 0) && (n < (menu->
max + 1)))
261 {
263 }
264 else
265 {
267 }
268 }
269
272}
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 mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
@ HC_OTHER
Miscellaneous strings.
#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.