wex v24.10.0
|
Offers a command to be used by ex command. More...
#include <wex/factory/ex-command.h>
Public Types | |
enum class | type_t { COMMAND , COMMAND_RANGE , CALC , COMMAND_EX , ESCAPE , ESCAPE_RANGE , FIND_MARGIN , NONE , FIND , REPLACE , VI } |
The type of ex command. More... | |
Public Member Functions | |
ex_command (factory::stc *stc=nullptr) | |
Default constructor, sets stc component. | |
ex_command (const std::string &text) | |
Constructor, sets command text. | |
ex_command & | append (char c) |
Appends a char. | |
ex_command & | append (const std::string &s) |
Appends a string. | |
bool | append_exec (char c) |
Appends a char and tries to execute. | |
bool | append_exec (const std::string &s) |
Appends a string and tries to execute. | |
auto | back () const |
Returns last char of command. | |
void | clear () |
Clears command text. | |
const auto & | command () const |
Returns the command text. | |
auto | empty () const |
Returns true if command text is empty. | |
bool | exec () const |
Executes the command on the stc component if available. | |
bool | exec_finish (bool user_input) const |
Finishes the execute. | |
auto | front () const |
Returns front of command text. | |
auto * | get_stc () const |
Returns stc component. | |
void | no_type () |
Sets to no type. | |
void | pop_back () |
Removes last char of command text. | |
ex_command & | reset (const std::string &text=std::string()) |
Resets command to text (but keeps type). | |
ex_command & | set (const std::string &text) |
Sets command text. | |
void | set_stc (wex::factory::stc *stc) |
Sets stc component. | |
auto | size () const |
Returns size of command. | |
std::string | str () const |
Returns string type of command. | |
type_t | type () const |
Returns type of command. | |
Static Public Member Functions | |
static const std::string | selection_range () |
Returns string used to retrieve addressrange for selection. | |
Offers a command to be used by ex command.
|
strong |
The type of ex command.
ex_command & wex::ex_command::set | ( | const std::string & | text | ) |
Sets command text.
The text should start with a command prefix, like ':' to return the command type.