94 char tmp[128] = { 0 };
99 snprintf(buf, buflen,
"%s:%s", tmp, txt);
120 for (
int i = 0; items[i].
name && (buflen > 2); i++)
122 if (!
make_help(pbuf, buflen,
_(items[i].name), menu, items[i].value))
155 while (win_focus && !win_focus->
help_data)
156 win_focus = win_focus->
parent;
161 char helpstr[1024] = { 0 };
307 if (ew->
win != win_helpbar)
Color and attribute parsing.
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
@ MT_COLOR_STATUS
Status bar (takes a pattern)
@ MT_COLOR_NORMAL
Plain text.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_paddstr(struct MuttWindow *win, int n, const char *s)
Display a string on screen, padded if necessary.
#define mutt_debug(LEVEL,...)
static int helpbar_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
static int helpbar_binding_observer(struct NotifyCallback *nc)
Notification that a Key Binding has changed - Implements observer_t -.
static int helpbar_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int helpbar_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
static int helpbar_recalc(struct MuttWindow *win)
Recalculate the display of the Help Bar - Implements MuttWindow::recalc() -.
static int helpbar_repaint(struct MuttWindow *win)
Redraw the Help Bar - Implements MuttWindow::repaint() -.
void helpbar_wdata_free(struct MuttWindow *win, void **ptr)
Free Helpbar Window data - Implements MuttWindow::wdata_free() -.
Convenience wrapper for the gui headers.
struct HelpbarWindowData * helpbar_wdata_get(struct MuttWindow *win)
Get the Helpbar data for this window.
struct HelpbarWindowData * helpbar_wdata_new(void)
Create new Window data for the Helpbar.
static char * compile_help(char *buf, size_t buflen, enum MenuType menu, const struct Mapping *items)
Create the text for the help menu.
static bool make_help(char *buf, size_t buflen, const char *txt, enum MenuType menu, int op)
Create one entry for the Help Bar.
struct MuttWindow * helpbar_new(void)
Create the Help Bar Window.
struct Keymap * km_find_func(enum MenuType mtype, int func)
Find a function's mapping in a Menu.
int km_expand_key(char *s, size_t len, struct Keymap *map)
Get the key string bound to a Keymap.
@ NT_MACRO_ADD
Key macro has been added.
@ LL_DEBUG5
Log at debug level 5.
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.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
const struct AttrColor * mutt_curses_set_normal_backed_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
const struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
bool mutt_window_is_visible(struct MuttWindow *win)
Is the Window visible?
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
struct MuttWindow * window_get_focus(void)
Get the currently focused Window.
int mutt_window_move(struct MuttWindow *win, int col, int row)
Move the cursor in a Window.
#define WA_RECALC
Recalculate the contents of the Window.
@ WT_HELP_BAR
Help Bar containing list of useful key bindings.
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
@ NT_WINDOW_STATE
Window state has changed, e.g. WN_VISIBLE.
@ NT_WINDOW_DELETE
Window is about to be deleted.
@ NT_WINDOW_FOCUS
Window focus has changed.
#define WA_REPAINT
Redraw the contents of the Window.
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
@ NT_BINDING
Key binding has changed, NotifyBinding, EventBinding.
struct MuttWindow * RootWindow
Parent of all Windows.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
enum MenuType menu
Menu, e.g. MENU_PAGER.
An Event that happened to a Colour.
enum ColorId cid
Colour ID that has changed.
const char * name
Name of config item that changed.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
int help_menu
Menu for key bindings, e.g. MENU_PAGER.
Mapping between user-readable string and a constant.
const char * name
String value.
const struct Mapping * help_data
Data for the Help Bar.
int(* repaint)(struct MuttWindow *win)
struct WindowState state
Current state of the Window.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
int(* recalc)(struct MuttWindow *win)
void(* wdata_free)(struct MuttWindow *win, void **ptr)
int help_menu
Menu for key bindings, e.g. MENU_PAGER.
struct MuttWindow * parent
Parent Window.
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
Container for Accounts, Notifications.
struct Notify * notify
Notifications handler.
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()
bool visible
Window is visible.
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
MenuType
Types of GUI selections.
@ MENU_GENERIC
Generic selection list.