JX Application Framework
|
#include <JVIKeyHandler.h>
Classes | |
struct | CutBuffer |
Public Types | |
enum | Mode { kTextEntryMode , kCommandMode , kCommandLineMode , kBufferNameMode } |
enum | { kNamedCutBufferOffset = '0' , kNamedCutBufferCount = 'z' - kNamedCutBufferOffset + 1 } |
Public Member Functions | |
JVIKeyHandler () | |
~JVIKeyHandler () override | |
void | Initialize (JTextEditor *te) override |
bool | HandleKeyPress (const JUtf8Character &key, const bool selectText, const JTextEditor::CaretMotion motion, const bool deleteToTabStop) override |
![]() | |
JTEKeyHandler () | |
virtual | ~JTEKeyHandler () |
Protected Member Functions | |
Mode | GetMode () const |
void | SetMode (const Mode mode) |
JSize | GetOperationCount () const |
bool | GetPrevCharacter (JUtf8Character *c) const |
const JString & | GetCommandLine () const |
void | AppendToCommandLine (const JUtf8Character &key) |
void | ClearKeyBuffers () |
bool | PrehandleKeyPress (const JUtf8Character &key, bool *result) |
void | YankLines (const JStringMatch &match, const bool del) |
void | YankToEndOfLine (const bool del, const bool ins) |
CutBuffer * | GetCutBuffer (const JRegex &r) const |
CutBuffer * | GetCutBuffer (const JRegex &r, const JStringMatch &match) const |
bool | IsEndCharacterInWord () const |
![]() | |
JTextEditor * | GetTE () const |
void | InsertKeyPress (const JUtf8Character &c) |
void | BackwardDelete (const bool deleteToTabStop, JString *text=nullptr) |
void | ForwardDelete (const bool deleteToTabStop, JString *text=nullptr) |
void | MoveCaretVert (const JInteger deltaLines) |
Implements vi keybindings. TODO dw delete to end of word db delete to beginning of word yw yank to end of word yb yank to beginning of word cc change line -- delete line and start insert mode s change character -- delete character and start insert mode md d'd mark starting line, cut to ending line my y'y mark starting line, copy to ending line
enum JVIKeyHandler::Mode |
JVIKeyHandler::JVIKeyHandler | ( | ) |
|
override |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
inlineprotected |
|
protected |
|
protected |
|
overridevirtual |
Implements JTEKeyHandler.
Reimplemented in JXVIKeyHandler.
|
overridevirtual |
This is necessary because the old key handler is deleted in JTextEditor::SetKeyHandler(), after the jnew one is constructed.
Reimplemented from JTEKeyHandler.
Reimplemented in JXVIKeyHandler.
|
protected |
|
protected |
|
protected |
|
protected |