Maniplate Menus and SubMenus. More...
#include "config.h"#include <string.h>#include "mutt/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "menu.h"#include "get.h"#include "keymap.h"#include "module_data.h"Go to the source code of this file.
Functions | |
| enum CommandResult | km_bind (const struct MenuDefinition *md, const char *key_str, int op, char *macro, char *desc, struct Buffer *err) |
| Set up a key binding. | |
| struct Keymap * | km_find_func (const struct MenuDefinition *md, int func) |
| Find a function's mapping in a Menu. | |
| int | km_get_op (const char *func) |
| Get the OpCode for a Function. | |
| int | km_get_op_menu (int mtype, const char *func) |
| Get the OpCode for a Function from a Menu. | |
| struct MenuDefinition * | menu_find (int menu) |
| Find a Menu Definition by Menu type. | |
| struct MenuDefinition * | menu_find_by_name (const char *name) |
| Find a Menu Definition by its name. | |
| bool | is_bound (const struct MenuDefinition *md, int op) |
| Does a function have a keybinding? | |
Maniplate Menus and SubMenus.
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 menu.c.
| enum CommandResult km_bind | ( | const struct MenuDefinition * | md, |
| const char * | key_str, | ||
| int | op, | ||
| char * | macro, | ||
| char * | desc, | ||
| struct Buffer * | err ) |
Set up a key binding.
| md | Menu Definition |
| key_str | Key string |
| op | Operation, e.g. OP_DELETE |
| macro | Macro string |
| desc | Description of macro (OPTIONAL) |
| err | Buffer for error message |
| CommandResult | Result e.g. MUTT_CMD_SUCCESS |
Insert a key sequence into the specified map. The map is sorted by ASCII value (lowest to highest)
Definition at line 52 of file menu.c.
| struct Keymap * km_find_func | ( | const struct MenuDefinition * | md, |
| int | func ) |
Find a function's mapping in a Menu.
| md | Menu Definition |
| func | Function, e.g. OP_DELETE |
| ptr | Keymap for the function |
Definition at line 141 of file menu.c.
| int km_get_op | ( | const char * | func | ) |
Get the OpCode for a Function.
| func | Function name, e.g. "exit" |
| num | OpCode, e.g. OP_EXIT |
Definition at line 168 of file menu.c.
| int km_get_op_menu | ( | int | mtype, |
| const char * | func ) |
Get the OpCode for a Function from a Menu.
| mtype | Menu Type, e.g. MENU_INDEX |
| func | Function name, e.g. "exit" |
| num | OpCode, e.g. OP_EXIT |
Definition at line 198 of file menu.c.
| struct MenuDefinition * menu_find | ( | int | menu | ) |
| struct MenuDefinition * menu_find_by_name | ( | const char * | name | ) |
Find a Menu Definition by its name.
| name | Menu name, e.g. "index" |
| ptr | Menu Definition |
Definition at line 251 of file menu.c.
| bool is_bound | ( | const struct MenuDefinition * | md, |
| int | op ) |
Does a function have a keybinding?
| md | Menu Definition |
| op | Operation, e.g. OP_DELETE |
| true | A key is bound to that operation |
Definition at line 275 of file menu.c.