diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-10-23 12:30:30 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-10-23 23:01:56 +0200 |
| commit | afb87c6d29275e18faec6a8b96e7d5ab57bcb0f9 (patch) | |
| tree | 1cd7e0ab6a3a10347547a232e187838a6ca5957f /editor.h | |
| parent | 5ae02ee68bd4df690d7ebcd6c8a0eb36fcf71835 (diff) | |
| download | vis-afb87c6d29275e18faec6a8b96e7d5ab57bcb0f9.tar.gz vis-afb87c6d29275e18faec6a8b96e7d5ab57bcb0f9.tar.xz | |
vis: begin librarization of core vis primitives
Diffstat (limited to 'editor.h')
| -rw-r--r-- | editor.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -44,6 +44,16 @@ typedef struct { const char *alias; } KeyBinding; +/* a mode contains a set of key bindings which are currently valid. + * + * each mode can specify one parent mode which is consultated if a given key + * is not found in the current mode. hence the modes form a tree which is + * searched from the current mode up towards the root mode until a valid binding + * is found. + * + * if no binding is found, mode->input(...) is called and the user entered + * keys are passed as argument. this is used to change the document content. + */ typedef struct Mode Mode; struct Mode { Mode *parent; /* if no match is found in this mode, search will continue there */ |
