wex
v21.04.0
|
Offers a class that adds ex editor to wex::stc. More...
#include <wex/ex.h>
Public Member Functions | |
ex (stc *stc) | |
Constructor. More... | |
virtual | ~ex () |
Destructor. | |
int | calculator (const std::string &text) |
Returns calculated value of text. | |
virtual bool | command (const std::string &command) |
Executes ex: command that was entered on the command line, or present as modeline command inside a file. More... | |
void | copy (const ex *ex) |
Copies data from other component. | |
auto & | ctags () |
Returns the ctags. | |
void | cut () |
Cuts selected text to yank register, and updates delete registers. | |
auto * | frame () |
Returns the frame. | |
const auto & | get_command () const |
Returns command. | |
auto * | get_stc () const |
Returns stc component. | |
auto | is_active () const |
Returns whether ex is active. | |
bool | marker_add (char marker, int line=-1) |
Adds marker at the specified line. More... | |
bool | marker_delete (char marker) |
Deletes specified marker. More... | |
bool | marker_goto (char marker) |
Goes to specified marker. More... | |
int | marker_line (char marker) const |
Returns line for specified marker. More... | |
void | print (const std::string &text) |
Prints text in the dialog. | |
const std::string | register_insert () const |
Returns text to be inserted. | |
auto | register_name () const |
Returns current register name. | |
const std::string | register_text () const |
Returns text from current register (or yank register if no register active). | |
void | reset_search_flags () |
Resets search flags. | |
auto | search_flags () const |
Returns search flags. | |
void | set_registers_delete (const std::string &value) const |
Sets delete registers 1 - 9 (if value not empty). | |
void | set_register_insert (const std::string &value) const |
Sets insert register (if value not empty). | |
void | set_register_yank (const std::string &value) const |
Sets yank register (if value not empty). | |
void | use (bool mode) |
Set using ex mode. | |
bool | yank (char name='0') const |
Yanks selected text to yank register, default to yank register. More... | |
Static Public Member Functions | |
static void | on_init () |
Initializes static data. | |
static auto & | get_macros () |
Returns the macros. | |
Protected Member Functions | |
bool | auto_write () |
If autowrite is on and document is modified, save the document. | |
void | set_register (char name) |
Sets register name. More... | |
Offers a class that adds ex editor to wex::stc.
wex::ex::ex | ( | stc * | stc | ) |
Constructor.
Sets ex mode.
|
virtual |
Executes ex: command that was entered on the command line, or present as modeline command inside a file.
Returns true if the command was executed.
Reimplemented in wex::vi.
bool wex::ex::marker_add | ( | char | marker, |
int | line = -1 |
||
) |
Adds marker at the specified line.
Returns true if marker could be added.
marker | marker |
line | line to add marker, default current line |
bool wex::ex::marker_delete | ( | char | marker | ) |
Deletes specified marker.
Returns true if marker was deleted.
bool wex::ex::marker_goto | ( | char | marker | ) |
Goes to specified marker.
Returns true if marker exists.
int wex::ex::marker_line | ( | char | marker | ) | const |
Returns line for specified marker.
Returns -1 if marker does not exist.
|
inlineprotected |
Sets register name.
Setting register 0 results in disabling current register.
bool wex::ex::yank | ( | char | name = '0' | ) | const |
Yanks selected text to yank register, default to yank register.
Returns false if no text was selected.