xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::replace_box Class Referencefinal
Inheritance diagram for xtd::forms::replace_box:
xtd::static_object

Definition

Represents a common dialog box that displays a replace dialog. This class cannot be inherited.

Header
#include <xtd/forms/replace_box>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light
Dark
Examples
The following code example demonstrates the use of xtd::forms::replace_box dialog.
#include <xtd/xtd>
class form1 : public form {
public:
form1() {
text("Replace box example");
find_button.parent(*this);
find_button.text("replace...");
find_button.location({10, 10});
find_button.click += delegate_ {
replace_box::show(*this, "Gammasoft", "xtd", "Replace", [&](object& sender, const find_event_args& e) {
diagnostics::debug::write_line(string::format("Find next : find string [{}], match case [{}], whole word [{}]", e.find_string(), e.match_case(), e.whole_word()));
}, [&](object& sender, const replace_event_args& e) {
diagnostics::debug::write_line(string::format("Replace : find string [{}], replace string [{}], match case [{}], whole word [{}]", e.find_string(), e.replace_string(), e.match_case(), e.whole_word()));
}, [&](object& sender, const replace_event_args& e) {
diagnostics::debug::write_line(string::format("Replace all : find string [{}], replace string [{}], match case [{}], whole word [{}]", e.find_string(), e.replace_string(), e.match_case(), e.whole_word()));
});
};
}
private:
button find_button;
};
auto main() -> int {
auto df = debug_form {};
application::run(form1 {});
}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition debug.hpp:361
Provides data for the xtd::forms::find_dialog::find_next and xtd::forms::replace_dialog::find_next ev...
Definition find_event_args.hpp:25
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
static void show(const iwin32_window &owner, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all)
Displays a replace dialog box.
Definition replace_box.hpp:42
#define delegate_
The declaration of a delegate type is similar to a method signature. It has a return value and any nu...
Definition delegate.hpp:900
xtd::forms::style_sheets::control button
The buttton data allows you to specify the box of a button control.
Definition button.hpp:25
@ e
The E key.
Definition console_key.hpp:96
@ e
The E key.
Definition keys.hpp:207
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
Definition status_bar_panel_style.hpp:25

Public Static Methods

template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void show (const iwin32_window &owner, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all)
 Displays a replace dialog box.
 
template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void show (const iwin32_window &owner, const xtd::string &find_string, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all)
 Displays a replace dialog box.
 
template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void show (const iwin32_window &owner, const xtd::string &find_string, const xtd::string &replace_string, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all)
 Displays a replace dialog box.
 
template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void show (const iwin32_window &owner, const xtd::string &find_string, const xtd::string &replace_string, const xtd::string &title, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all)
 Displays a replace dialog box.
 
template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void show (const iwin32_window &owner, const xtd::string &find_string, const xtd::string &replace_string, const xtd::string &title, bool match_case, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all)
 Displays a replace dialog box.
 
template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void show (const iwin32_window &owner, const xtd::string &find_string, const xtd::string &replace_string, const xtd::string &title, bool match_case, bool whole_word, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all)
 Displays a replace dialog box.
 

Member Function Documentation

◆ show() [1/6]

template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void xtd::forms::replace_box::show ( const iwin32_window & owner,
find_next_callback_t find_next,
replace_callback_t replace,
replace_all_callback_t replace_all )
inlinestatic

Displays a replace dialog box.

Parameters
ownerAn xtd::forms::iwin32_window that represents the owner window of the replace dialog box.
find_nextThe callback called when the user click the find button.
replaceThe callback called when the user click the replace button.
replace_allThe callback called when the user click the replace all button.

◆ show() [2/6]

template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void xtd::forms::replace_box::show ( const iwin32_window & owner,
const xtd::string & find_string,
find_next_callback_t find_next,
replace_callback_t replace,
replace_all_callback_t replace_all )
inlinestatic

Displays a replace dialog box.

Parameters
ownerAn xtd::forms::iwin32_window that represents the owner window of the replace dialog box.
find_stringThe string to find.
find_nextThe callback called when the user click the find button.
replaceThe callback called when the user click the replace button.
replace_allThe callback called when the user click the replace all button.

◆ show() [3/6]

template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void xtd::forms::replace_box::show ( const iwin32_window & owner,
const xtd::string & find_string,
const xtd::string & replace_string,
find_next_callback_t find_next,
replace_callback_t replace,
replace_all_callback_t replace_all )
inlinestatic

Displays a replace dialog box.

Parameters
ownerAn xtd::forms::iwin32_window that represents the owner window of the replace dialog box.
find_stringThe string to find.
replace_stringThe replaced string.
find_nextThe callback called when the user click the find button.
replaceThe callback called when the user click the replace button.
replace_allThe callback called when the user click the replace all button.

◆ show() [4/6]

template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void xtd::forms::replace_box::show ( const iwin32_window & owner,
const xtd::string & find_string,
const xtd::string & replace_string,
const xtd::string & title,
find_next_callback_t find_next,
replace_callback_t replace,
replace_all_callback_t replace_all )
inlinestatic

Displays a replace dialog box.

Parameters
ownerAn xtd::forms::iwin32_window that represents the owner window of the replace dialog box.
find_stringThe string to find.
replace_stringThe replaced string.
titleThe find dialog title.
find_nextThe callback called when the user click the find button.
replaceThe callback called when the user click the replace button.
replace_allThe callback called when the user click the replace all button.

◆ show() [5/6]

template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void xtd::forms::replace_box::show ( const iwin32_window & owner,
const xtd::string & find_string,
const xtd::string & replace_string,
const xtd::string & title,
bool match_case,
find_next_callback_t find_next,
replace_callback_t replace,
replace_all_callback_t replace_all )
inlinestatic

Displays a replace dialog box.

Parameters
ownerAn xtd::forms::iwin32_window that represents the owner window of the replace dialog box.
find_stringThe string to find.
replace_stringThe replaced string.
titleThe find dialog title.
match_casetrue if match case option selected; otherwise false.
find_nextThe callback called when the user click the find button.
replaceThe callback called when the user click the replace button.
replace_allThe callback called when the user click the replace all button.

◆ show() [6/6]

template<class find_next_callback_t, class replace_callback_t, class replace_all_callback_t>
static void xtd::forms::replace_box::show ( const iwin32_window & owner,
const xtd::string & find_string,
const xtd::string & replace_string,
const xtd::string & title,
bool match_case,
bool whole_word,
find_next_callback_t find_next,
replace_callback_t replace,
replace_all_callback_t replace_all )
inlinestatic

Displays a replace dialog box.

Parameters
ownerAn xtd::forms::iwin32_window that represents the owner window of the replace dialog box.
find_stringThe string to find.
replace_stringThe replaced string.
titleThe find dialog title.
match_casetrue if match case option selected; otherwise false.
whole_wordtrue if whole word option selected; otherwise false.
find_nextThe callback called when the user click the find button.
replaceThe callback called when the user click the replace button.
replace_allThe callback called when the user click the replace all button.

The documentation for this class was generated from the following file: