|
wex v26.04.0
|
Offers the macro mode, like playing back or recording, and the current macro that is recorded or was played back. More...
#include <wex/ex/macro-mode.h>
Public Member Functions | |
| macro_mode (macros *macros) | |
| Constructor. | |
| ~macro_mode () | |
| Destructor. | |
| bool | expand (ex *ex, const variable &variable, std::string &expanded) const |
| Expands template variable. | |
| const std::string | get_macro () const |
| Returns current macro. | |
| macros * | get_macros () |
| Returns the macros collection. | |
| bool | is_playback () const |
| Are we playing back? | |
| bool | is_recording () const |
| Are we recording? | |
| const std::string | str () const |
| Returns the mode as a string. | |
| size_t | transition (const std::string &command, ex *ex=nullptr, bool complete=false, size_t repeat=1) |
| transitions between modes. | |
Offers the macro mode, like playing back or recording, and the current macro that is recorded or was played back.
| wex::macro_mode::macro_mode | ( | macros * | macros | ) |
Constructor.
The macros specified is the collection of macros used for replay or record. This collection might be changed depending on the mode.
| size_t wex::macro_mode::transition | ( | const std::string & | command, |
| ex * | ex = nullptr, | ||
| bool | complete = false, | ||
| size_t | repeat = 1 ) |
transitions between modes.
If command starts with: q: Starts recording a macro (appends to existing macro if macro is single upper case character). @: Playsback the macro. Returns number of characters processed from command.
| command | macro name after first character |
| ex | ex component to use, required in case of playback |
| complete | is the command complete |
| repeat | number of times this macro should be executed, in case of playback |