wex v24.10.0
|
Offers a class to relate ex_commandline to values with iterators. More...
#include <wex/ui/ex-commandline-input.h>
Public Types | |
typedef wex::strings_t | values_t |
Type for keeping the values. | |
Public Member Functions | |
ex_commandline_input (ex_command::type_t type, const std::string &name="ex-cmd.other") | |
Constructor, fills values from config. | |
~ex_commandline_input () | |
Destructor, writes values (with a max for integers on the list) to config. | |
const std::string | get () const |
Returns value on the list pointed to by iterator, or empty string, if iterator is at end. | |
void | set (const std::string &value) |
Sets first value on the list, and removes it at other positions if present. | |
void | set (const ex_commandline *cl) |
Sets first value on the list from specified commandline. | |
bool | set (int key, wxTextEntryBase *te=nullptr) |
Sets iterator according to specified key, and then sets value of text control (if not nullptr) to the list value related to iterator. | |
void | set (const values_t &values) |
Sets all values (values might be empty). | |
auto | type () const |
Returns type. | |
const auto & | values () const |
Returns the values. | |
Offers a class to relate ex_commandline to values with iterators.
wex::ex_commandline_input::ex_commandline_input | ( | ex_command::type_t | type, |
const std::string & | name = "ex-cmd.other" ) |
Constructor, fills values from config.
The specified type determines which key to use to retrieve the values.
type | the ex_command type used to get config values |
name | the name, as used in config to store values |
void wex::ex_commandline_input::set | ( | const std::string & | value | ) |
Sets first value on the list, and removes it at other positions if present.
Sets iterator to begin of list.
void wex::ex_commandline_input::set | ( | const values_t & | values | ) |
Sets all values (values might be empty).
Sets iterator to begin of list.
bool wex::ex_commandline_input::set | ( | int | key, |
wxTextEntryBase * | te = nullptr ) |
Sets iterator according to specified key, and then sets value of text control (if not nullptr) to the list value related to iterator.
Returns false if current list is empty, or key not ok.
key | the key:
|
te | the text entry |