wex v24.10.0
|
Offers a class holding info about a link. More...
#include <wex/factory/link.h>
Public Types | |
enum | { LINE_OPEN_URL = -2 , LINE_OPEN_MIME = -3 } |
line number to be used for line_data Afterwards line and col from data are filled in if possible. More... | |
Public Member Functions | |
link () | |
Default constructor, initializes paths from config. | |
virtual | ~link () |
Destructor. | |
bool | add_path (const path &p) |
Adds a search path. | |
void | config_get () |
Sets paths with info from config. | |
virtual const path | get_path (const std::string &text, line_data &data, factory::stc *stc=nullptr) |
Returns a path from text, using paths if necessary, returns empty path if no path could be found. | |
Protected Member Functions | |
virtual std::string | get_link_pairs (const std::string &text) const |
Returns text between link pairs, or empty string if none found. | |
Offers a class holding info about a link.
anonymous enum |
line number to be used for line_data Afterwards line and col from data are filled in if possible.
Enumerator | |
---|---|
LINE_OPEN_URL | open url |
LINE_OPEN_MIME | open mime |
bool wex::factory::link::add_path | ( | const path & | p | ) |
Adds a search path.
Returns false if path does not exist, or is already present.
void wex::factory::link::config_get | ( | ) |
Sets paths with info from config.
If there is no config, paths will be empty.
|
virtual |
Returns a path from text, using paths if necessary, returns empty path if no path could be found.
text | text containing a path somewhere |
data | data to be filled in |
stc | stc component |
Reimplemented in wex::link.