|
teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
#include <mode.h>
Inheritance diagram for teditor::Mode:Classes | |
| struct | Registrar |
Public Member Functions | |
| Mode (const std::string &n, const std::string &w) | |
| ctor More... | |
| virtual | ~Mode () |
| virtual const std::string & | name () const |
| virtual const std::string & | word () const |
| virtual int | indent (Buffer &buf, int line)=0 |
| virtual KeyCmdMap & | getKeyCmdMap ()=0 |
| virtual ColorMap & | getColorMap ()=0 |
| virtual void | getColorFor (AttrColor &fg, AttrColor &bg, int lineNum, int pos, const Buffer &b, bool isHighlighted)=0 |
| virtual Strings | cmdNames () const |
Static Public Member Functions | |
| static ModePtr | createMode (const std::string &mode) |
| Helper to create mode object of the named mode. More... | |
| static std::string | inferMode (const std::string &file, bool isDir) |
| Helper to infer mode name from the file. More... | |
Mode attached with a buffer
|
inline |
ctor
| n | name of the mode |
| w | list of chars that define a word in this mode |
|
inlinevirtual |
dtor
|
virtual |
list of all command names that are registered under this mode
Reimplemented in teditor::watch::WatchMode, and teditor::ledger::LedgerMode.
|
static |
Helper to create mode object of the named mode.
| mode | name of the mode |
|
pure virtual |
get color for the given line
Implemented in teditor::cmbar::CmBarMode, teditor::readonly::ReadOnlyMode, teditor::dir::DirMode, and teditor::grep::GrepMode.
|
pure virtual |
get color map for the buffer this mode applies to
Implemented in teditor::cmbar::CmBarMode, and teditor::readonly::ReadOnlyMode.
|
pure virtual |
get key-cmd map for the buffer this mode applies to
Implemented in teditor::cmbar::CmBarMode, and teditor::readonly::ReadOnlyMode.
|
pure virtual |
function to compute indentation of the line in the input buffer
Implemented in teditor::cmbar::CmBarMode, teditor::readonly::ReadOnlyMode, teditor::text::TextMode, and teditor::cpp::CppMode.
|
static |
Helper to infer mode name from the file.
| file | the file |
| isDir | is the input file a directory |
|
inlinevirtual |
mode's name
|
inlinevirtual |
list of chars that define a word
1.8.17