Generate the help-page and GUI display it. More...
#include "config.h"
#include <stddef.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "menu/lib.h"
#include "pager/lib.h"
#include "functions.h"
#include "keymap.h"
#include "muttlib.h"
#include "opcodes.h"
#include "protos.h"
Go to the source code of this file.
Functions | |
static const struct MenuFuncOp * | help_lookup_function (int op, enum MenuType menu) |
Find a keybinding for an operation. More... | |
static int | print_macro (FILE *fp, int maxwidth, const char **macro) |
Print a macro string to a file. More... | |
static int | get_wrapped_width (const char *t, size_t wid) |
Wrap a string at a sensible place. More... | |
static int | pad (FILE *fp, int col, int i) |
Write some padding to a file. More... | |
static void | format_line (FILE *fp, int ismacro, const char *t1, const char *t2, const char *t3, int wraplen) |
Write a formatted line to a file. More... | |
static void | dump_menu (FILE *fp, enum MenuType menu, int wraplen) |
Write all the key bindings to a file. More... | |
static bool | is_bound (struct KeymapList *km_list, int op) |
Does a function have a keybinding? More... | |
static void | dump_unbound (FILE *fp, const struct MenuFuncOp *funcs, struct KeymapList *km_list, struct KeymapList *aux, int wraplen) |
Write out all the operations with no key bindings. More... | |
void | mutt_help (enum MenuType menu) |
Display the help menu. More... | |
Generate the help-page and GUI display it.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file help.c.
|
static |
Find a keybinding for an operation.
op | Operation, e.g. OP_DELETE |
menu | Current Menu, e.g. MENU_PAGER |
ptr | Key binding |
NULL | No key binding found |
Definition at line 55 of file help.c.
|
static |
Print a macro string to a file.
[in] | fp | File to write to |
[in] | maxwidth | Maximum width in screen columns |
[out] | macro | Macro string |
num | Number of screen columns used |
The macro
pointer is move past the string we've printed
Definition at line 85 of file help.c.
|
static |
Wrap a string at a sensible place.
t | String to wrap |
wid | Maximum width |
num | Break after this many characters |
If the string's too long, look for some whitespace to break at.
Definition at line 155 of file help.c.
|
static |
Write some padding to a file.
fp | File to write to |
col | Current screen column |
i | Screen column to pad until |
num |
|
Definition at line 196 of file help.c.
|
static |
Write a formatted line to a file.
fp | File to write to |
ismacro | Layout mode, see below |
t1 | Text part 1 |
t2 | Text part 2 |
t3 | Text part 3 |
wraplen | Width to wrap to |
Assemble the three columns of text.
ismacro
can be:
Definition at line 225 of file help.c.
|
static |
Write all the key bindings to a file.
fp | File to write to |
menu | Current Menu, e.g. MENU_PAGER |
wraplen | Width to wrap to |
Definition at line 317 of file help.c.
|
static |
Does a function have a keybinding?
km_list | Keymap to examine |
op | Operation, e.g. OP_DELETE |
true | A key is bound to that operation |
Definition at line 353 of file help.c.
|
static |
Write out all the operations with no key bindings.
fp | File to write to |
funcs | All the bindings for the current menu |
km_list | First key map to consider |
aux | Second key map to consider |
wraplen | Width to wrap to |
Definition at line 372 of file help.c.
void mutt_help | ( | enum MenuType | menu | ) |
Display the help menu.
menu | Current Menu |
Definition at line 386 of file help.c.