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 140 of file functions.c.
141{
142 switch (op)
143 {
144 case OP_BOTTOM_PAGE:
147
148 case OP_CURRENT_BOTTOM:
151
152 case OP_CURRENT_MIDDLE:
155
156 case OP_CURRENT_TOP:
159
160 case OP_FIRST_ENTRY:
163
164 case OP_HALF_DOWN:
167
168 case OP_HALF_UP:
171
172 case OP_LAST_ENTRY:
175
176 case OP_MIDDLE_PAGE:
179
180 case OP_NEXT_ENTRY:
183
184 case OP_NEXT_LINE:
187
188 case OP_NEXT_PAGE:
191
192 case OP_PREV_ENTRY:
195
196 case OP_PREV_LINE:
199
200 case OP_PREV_PAGE:
203
204 case OP_TOP_PAGE:
207
208 default:
210 }
211}
@ 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 230 of file functions.c.
231{
235}
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 240 of file functions.c.
241{
243 {
246 }
247
248 const int digit = op - OP_JUMP;
250 {
252 }
253
257 {
258 int n = 0;
259 if (mutt_str_atoi_full(
buf_string(buf), &n) && (n > 0) && (n < (menu->
max + 1)))
260 {
262 }
263 else
264 {
266 }
267 }
268
271}
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.