Generate the help-page and GUI display it. More...
#include "config.h"
#include <limits.h>
#include <stdbool.h>
#include <stddef.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 "index/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "pager/lib.h"
#include "protos.h"
Go to the source code of this file.
Data Structures | |
struct | HelpLine |
One line of Help text. More... | |
Functions | |
ARRAY_HEAD (HelpLineArray, struct HelpLine) | |
static const struct MenuFuncOp * | help_lookup_function (int op, enum MenuType menu) |
Find a keybinding for an operation. | |
static int | help_sort_alpha (const void *a, const void *b, void *sdata) |
Compare two Help Lines by their first entry - Implements sort_t -. | |
static void | escape_macro (const char *macro, struct Buffer *buf) |
Escape any special characters in a macro. | |
static void | dump_menu (enum MenuType menu, struct HelpLineArray *hla_menu, struct HelpLineArray *hla_macro) |
Write all the key bindings to a HelpLine Array. | |
static void | dump_bound (enum MenuType menu, FILE *fp) |
Dump the bound keys to a file. | |
static bool | is_bound (struct KeymapList *km_list, int op) |
Does a function have a keybinding? | |
static void | dump_unbound_menu (const struct MenuFuncOp *funcs, struct KeymapList *km_list, struct KeymapList *aux, struct HelpLineArray *hla) |
Write the operations with no key bindings to a HelpLine Array. | |
static void | dump_unbound (enum MenuType menu, FILE *fp) |
Dump the unbound keys to a file. | |
static void | show_flag_if_present (FILE *fp, const struct MbTable *table, int index, char *desc) |
Write out a message flag if exists. | |
static void | dump_message_flags (enum MenuType menu, FILE *fp) |
Write out all the message flags. | |
void | mutt_help (enum MenuType menu) |
Display the help menu. | |
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.
ARRAY_HEAD | ( | HelpLineArray | , |
struct HelpLine | |||
) |
|
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 69 of file help.c.
|
static |
Escape any special characters in a macro.
[in] | macro | Macro string |
[out] | buf | Buffer for the result |
Replace characters, such as <Enter>
with the literal "\n"
Definition at line 108 of file help.c.
|
static |
Write all the key bindings to a HelpLine Array.
For bind: { key-string, function-name, description } For macro: { key-string, macro-text, optional-description }
Definition at line 164 of file help.c.
|
static |
Dump the bound keys to a file.
menu | Menu type |
fp | File to write to |
Collect all the function bindings and write them to a file.
The output will be in three columns: binding, function, description.
Definition at line 210 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 313 of file help.c.
|
static |
Write the operations with no key bindings to a HelpLine Array.
[in] | funcs | All the bindings for the current menu |
[in] | km_list | First key map to consider |
[in] | aux | Second key map to consider |
[out] | hla | HelpLine Array |
The output will be in two columns: { function-name, description }
Definition at line 333 of file help.c.
|
static |
Dump the unbound keys to a file.
menu | Menu type |
fp | File to write to |
The output will be in two columns: { function-name, description }
Definition at line 355 of file help.c.
|
static |
Write out a message flag if exists.
fp | File to write to |
table | Table containing the flag characters |
index | Index of flag character int the table |
desc | Description of flag |
Definition at line 391 of file help.c.
|
static |
Write out all the message flags.
menu | Menu type |
fp | File to write to |
Display a quick reminder of all the flags in the config options:
Definition at line 412 of file help.c.
void mutt_help | ( | enum MenuType | menu | ) |
Display the help menu.
menu | Current Menu |
Definition at line 469 of file help.c.