Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 116 lines (99 sloc) 4.03 kb
e577381 Initial revision
Thomas Roessler authored
1 /*
e8da501 Fix Mike's and my e-mail addresses in copyright lines.
Thomas Roessler authored
2 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
e577381 Initial revision
Thomas Roessler authored
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
62255b8 @bcully Gah, forgot the zip code when updating the FSF address...
bcully authored
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
e577381 Initial revision
Thomas Roessler authored
17 */
18
19 /*
20 * This file is named mutt_menu.h so it doesn't collide with ncurses menu.h
21 */
22
b357ba4 @bcully Move some attachment-related prototypes and structures into attach.h
bcully authored
23 #ifndef _MUTT_MENU_H_
24 #define _MUTT_MENU_H_ 1
25
e577381 Initial revision
Thomas Roessler authored
26 #include "keymap.h"
27 #include "mutt_regex.h"
28
29 #define REDRAW_INDEX (1)
30 #define REDRAW_MOTION (1<<1)
31 #define REDRAW_MOTION_RESYNCH (1<<2)
32 #define REDRAW_CURRENT (1<<3)
33 #define REDRAW_STATUS (1<<4)
34 #define REDRAW_FULL (1<<5)
35 #define REDRAW_BODY (1<<6)
28edcba Gero Treuner's help-wrap patch.
Thomas Roessler authored
36 #define REDRAW_SIGWINCH (1<<7)
e577381 Initial revision
Thomas Roessler authored
37
d63919f CVS branch clean-up.
Thomas Roessler authored
38 #define M_MODEFMT "-- Mutt: %s"
39
e577381 Initial revision
Thomas Roessler authored
40 typedef struct menu_t
41 {
42 char *title; /* the title of this menu */
43 char *help; /* quickref for the current menu */
44 void *data; /* extra data for the current menu */
45 int current; /* current entry */
46 int max; /* the number of entries in the menu */
47 int redraw; /* when to redraw the screen */
48 int menu; /* menu definition for keymap entries. */
49 int offset; /* which screen row to start the index */
50 int pagelen; /* number of entries per screen */
51 int tagprefix;
a299683 Tommi Komulainen's menu/dialog patch.
Thomas Roessler authored
52
53 /* Setting dialog != NULL overrides normal menu behaviour.
54 * In dialog mode menubar is hidden and prompt keys are checked before
55 * normal menu movement keys. This can cause problems with scrolling, if
56 * prompt keys override movement keys.
57 */
58 char **dialog; /* dialog lines themselves */
59 char *prompt; /* prompt for user, similar to mutt_multi_choice */
60 char *keys; /* keys used in the prompt */
e577381 Initial revision
Thomas Roessler authored
61
62 /* callback to generate an index line for the requested element */
63 void (*make_entry) (char *, size_t, struct menu_t *, int);
64
65 /* how to search the menu */
66 int (*search) (struct menu_t *, regex_t *re, int n);
67
e3e15d8 The addressbook used to crash when someone issued the alias and
Thomas Roessler authored
68 int (*tag) (struct menu_t *, int i, int m);
e577381 Initial revision
Thomas Roessler authored
69
70 /* color pair to be used for the requested element
71 * (default function returns ColorDefs[MT_COLOR_NORMAL])
72 */
73 int (*color) (int i);
74
75 /* the following are used only by mutt_menuLoop() */
76 int top; /* entry that is the top of the current page */
77 int oldcurrent; /* for driver use only. */
78 int searchDir; /* direction of search */
79 int tagged; /* number of tagged entries */
80 } MUTTMENU;
81
95e5e4d Manage last search pattern outside of menu lifecycle
Rocco Rutte authored
82 void mutt_menu_init (void);
e577381 Initial revision
Thomas Roessler authored
83 void menu_jump (MUTTMENU *);
84 void menu_redraw_full (MUTTMENU *);
85 void menu_redraw_index (MUTTMENU *);
bd4e453 From the Compose menu, invoke attach-message. Tag a whole bunch of
Thomas Roessler authored
86 void menu_redraw_status (MUTTMENU *);
e577381 Initial revision
Thomas Roessler authored
87 void menu_redraw_motion (MUTTMENU *);
88 void menu_redraw_current (MUTTMENU *);
4aefc65 This patch fixes various aspects of the attachment-saving
Thomas Roessler authored
89 int menu_redraw (MUTTMENU *);
e577381 Initial revision
Thomas Roessler authored
90 void menu_first_entry (MUTTMENU *);
91 void menu_last_entry (MUTTMENU *);
92 void menu_top_page (MUTTMENU *);
93 void menu_bottom_page (MUTTMENU *);
94 void menu_middle_page (MUTTMENU *);
95 void menu_next_page (MUTTMENU *);
96 void menu_prev_page (MUTTMENU *);
97 void menu_next_line (MUTTMENU *);
98 void menu_prev_line (MUTTMENU *);
99 void menu_half_up (MUTTMENU *);
100 void menu_half_down (MUTTMENU *);
101 void menu_current_top (MUTTMENU *);
102 void menu_current_middle (MUTTMENU *);
103 void menu_current_bottom (MUTTMENU *);
104 void menu_check_recenter (MUTTMENU *);
105 void menu_status_line (char *, size_t, MUTTMENU *, const char *);
106
95e5e4d Manage last search pattern outside of menu lifecycle
Rocco Rutte authored
107 MUTTMENU *mutt_new_menu (int);
e577381 Initial revision
Thomas Roessler authored
108 void mutt_menuDestroy (MUTTMENU **);
109 int mutt_menuLoop (MUTTMENU *);
110
111 /* used in both the index and pager index to make an entry. */
112 void index_make_entry (char *, size_t, struct menu_t *, int);
113 int index_color (int);
b357ba4 @bcully Move some attachment-related prototypes and structures into attach.h
bcully authored
114
115 #endif /* _MUTT_MENU_H_ */
Something went wrong with that request. Please try again.