90 {
N_(
"Exit"), OP_EXIT },
91 {
N_(
"Select"), OP_GENERIC_SELECT_ENTRY },
92 {
N_(
"Help"), OP_HELP },
105 const char *s = entry->
desc;
117 const char *s = entry->
expr;
159 for (
size_t i = 0; i < menu->
max; i++)
176 int num_entries = 0, i = 0;
177 struct Buffer *entrybuf = NULL;
179 while (
Flags[num_entries].tag)
187 menu->
mdata = entries;
189 menu->
max = num_entries;
198 entries[i].
num = i + 1;
203 switch (
Flags[i].eat_arg)
249 const char *patternstr =
_(
"PATTERN");
251 entries[i].
num = i + 1;
256 entries[i].
desc =
mutt_str_dup(
_(
"messages in threads containing messages matching PATTERN"));
259 entries[i].
num = i + 1;
264 entries[i].
desc =
mutt_str_dup(
_(
"messages whose immediate parent matches PATTERN"));
267 entries[i].
num = i + 1;
272 entries[i].
desc =
mutt_str_dup(
_(
"messages having an immediate child matching PATTERN"));
321 if (ev_w->
win != win_menu)
397 { -1, -1, NULL, NULL },
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
@ FR_UNKNOWN
Unknown function.
const struct ExpandoRenderData PatternRenderData[]
Callbacks for Pattern Expandos.
static const struct Mapping PatternHelp[]
Help Bar for the Pattern selection dialog.
static struct Menu * create_pattern_menu(struct MuttWindow *dlg)
Create the Pattern Completion menu.
@ ED_PATTERN
Pattern ED_PAT_ ExpandoDataPattern.
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
int km_dokey(enum MenuType mtype, GetChFlags flags)
Determine what a keypress should do.
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
int pattern_function_dispatcher(struct MuttWindow *win, int op)
Perform a Pattern function - Implements function_dispatcher_t -.
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
long pattern_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Pattern: Index number - Implements ExpandoRenderData::get_number() -.
void pattern_e(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Pattern: pattern expression - Implements ExpandoRenderData::get_string() -.
void pattern_d(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Pattern: pattern description - Implements ExpandoRenderData::get_string() -.
bool dlg_pattern(char *buf, size_t buflen)
Show menu to select a Pattern -.
#define mutt_debug(LEVEL,...)
static int pattern_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int pattern_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
struct MuttWindow * simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
#define GETCH_NO_FLAGS
No flags are set.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
struct MuttWindow * window_find_child(struct MuttWindow *win, enum WindowType type)
Recursively find a child Window of a given type.
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
@ WT_DLG_PATTERN
Pattern Dialog, dlg_pattern()
@ NT_WINDOW_DELETE
Window is about to be deleted.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
const char * opcodes_get_name(int op)
Get the name of an opcode.
const struct PatternFlags Flags[]
Lookup table for all patterns.
@ ED_PAT_DESCRIPTION
PatternEntry.desc.
@ ED_PAT_EXPRESION
PatternEntry.expr.
@ ED_PAT_NUMBER
PatternEntry.num.
@ EAT_RANGE
Process a number (range)
@ EAT_MESSAGE_RANGE
Process a message number (range)
@ EAT_DATE
Process a date (range)
@ EAT_QUERY
Process a query string.
@ EAT_REGEX
Process a regex.
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.
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
String manipulation buffer.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
const char * name
Name of config item that changed.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
Mapping between user-readable string and a constant.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Data passed to a notification function.
void * event_data
Data from notify_send()
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()
Data to pass to the Pattern Functions.
char * buf
Buffer for the results.
struct Menu * menu
Pattern Menu.
bool done
Should we close the Dialog?
size_t buflen
Length of the results buffer.
bool selection
Was a selection made?
A line in the Pattern Completion menu.
const char * desc
Description of pattern.
const char * tag
Copied to buffer if selected.
const char * expr
Displayed in the menu.
@ MENU_DIALOG
Simple Dialog.
@ MENU_GENERIC
Generic selection list.