wex  v21.10.0
Public Member Functions | Static Public Member Functions | List of all members
wex::find_replace_data Class Reference

Offers a class to hold data for find replace functionality. More...

#include <wex/frd.h>

Inheritance diagram for wex::find_replace_data:
Inheritance graph
[legend]

Public Member Functions

const auto & get_find_strings () const
 Other methods. More...
 
const auto & get_replace_strings () const
 Returns the replace strings.
 
void set_find_strings (const textctrl_input::values_t &v)
 Sets the find strings. More...
 
void set_replace_strings (const textctrl_input::values_t &v)
 Sets the replace strings. More...
 
void set_find_string (const std::string &value) override
 Virtual overrides.
 
void set_replace_string (const std::string &value) override
 Sets the replace string. More...
 
- Public Member Functions inherited from wex::factory::find_replace_data
 find_replace_data ()
 Other methods. More...
 
 ~find_replace_data ()
 Destructor, writes data to config.
 
wxFindReplaceData * data ()
 Other methods. More...
 
const std::string get_find_string () const
 Returns the find string.
 
const std::string get_replace_string () const
 Returns the replace string.
 
bool is_regex () const
 Returns true if find text is used as a regular expression.
 
bool match_case () const
 Returns true if the flags have match case set.
 
bool match_word () const
 Returns true if the flags have whole word set.
 
int regex_replace (std::string &text) const
 Replaces all occurrences of the find string as regular expression in text by the replace string. More...
 
int regex_search (const std::string &text) const
 Finds the find string in text. More...
 
bool search_down () const
 Returns true if the flags have search down set.
 
void set_match_case (bool value)
 Sets flags for match case.
 
void set_match_word (bool value)
 Sets flags for match word.
 
void set_regex (bool value)
 Sets using regular expression for find text. More...
 
void set_search_down (bool value)
 Sets flags for search down.
 
auto * wx () const
 Returns wx frd.
 

Static Public Member Functions

static find_replace_dataget (bool createOnDemand=true)
 Static interface. More...
 
static find_replace_dataset (find_replace_data *frd)
 Sets the object as the current one, returns the pointer to the previous current object (both the parameter and returned value may be nullptr).
 
- Static Public Member Functions inherited from wex::factory::find_replace_data
static const auto & text_find ()
 Static interface. More...
 
static const auto & text_match_case ()
 Returns text.
 
static const auto & text_match_word ()
 Returns text.
 
static const auto & text_regex ()
 Returns text.
 
static const auto & text_replace_with ()
 Returns text.
 
static const auto & text_search_down ()
 Returns text.
 

Detailed Description

Offers a class to hold data for find replace functionality.

Member Function Documentation

◆ get()

static find_replace_data* wex::find_replace_data::get ( bool  createOnDemand = true)
static

Static interface.

Returns the find replace data.

◆ get_find_strings()

const auto& wex::find_replace_data::get_find_strings ( ) const
inline

Other methods.

Returns the find strings.

◆ set_find_strings()

void wex::find_replace_data::set_find_strings ( const textctrl_input::values_t v)

Sets the find strings.

Also moves the find string to the beginning of the find strings list.

◆ set_replace_string()

void wex::find_replace_data::set_replace_string ( const std::string &  value)
overridevirtual

Sets the replace string.

Also moves the replace string to the beginning of the replace strings list.

Reimplemented from wex::factory::find_replace_data.

◆ set_replace_strings()

void wex::find_replace_data::set_replace_strings ( const textctrl_input::values_t v)

Sets the replace strings.

Also moves the replace string to the beginning of the replace strings list.