xtd 0.2.0
Loading...
Searching...
No Matches
replace_box.h
Go to the documentation of this file.
1
4#pragma once
5#include "replace_dialog.h"
6#include <xtd/static>
7#include <memory>
8
10namespace xtd {
12 namespace forms {
32 public:
34
41 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
42 static void show(const iwin32_window& owner, find_next_callback_t find_next, replace_callback_t replace, replace_all_callback_t replace_all) {show_replace_box(owner, xtd::forms::find_event_handler(find_next), xtd::forms::replace_event_handler(replace), xtd::forms::replace_event_handler(replace_all));}
43
50 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
51 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) {show_replace_box(owner, xtd::forms::find_event_handler(find_next), xtd::forms::replace_event_handler(replace), xtd::forms::replace_event_handler(replace_all), find_string);}
52
60 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
61 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) {show_replace_box(owner, xtd::forms::find_event_handler(find_next), xtd::forms::replace_event_handler(replace), xtd::forms::replace_event_handler(replace_all), find_string, replace_string);}
62
71 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
72 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) {show_replace_box(owner, xtd::forms::find_event_handler(find_next), xtd::forms::replace_event_handler(replace), xtd::forms::replace_event_handler(replace_all), find_string, replace_string, title);}
73
83 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
84 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) {show_replace_box(owner, xtd::forms::find_event_handler(find_next), xtd::forms::replace_event_handler(replace), xtd::forms::replace_event_handler(replace_all), find_string, replace_string, title, match_case);}
85
96 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
97 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) {show_replace_box(owner, xtd::forms::find_event_handler(find_next), xtd::forms::replace_event_handler(replace), xtd::forms::replace_event_handler(replace_all), find_string, replace_string, title, match_case, whole_word);}
99
100 private:
101 static void show_replace_box(const iwin32_window& owner, xtd::forms::find_event_handler find_next, xtd::forms::replace_event_handler replace, xtd::forms::replace_event_handler replace_all, const xtd::string& find_string = xtd::string::empty_string, const xtd::string& replace_string = xtd::string::empty_string, const xtd::string& title = xtd::string::empty_string, bool match_case = false, bool whole_word = false);
102
104 };
105 }
106}
Represents text as a sequence of character units.
Definition basic_string.h:79
static const basic_string empty_string
Represents the empty basic_string.
Definition basic_string.h:124
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.h:23
Represents a common dialog box that displays a replace dialog. This class cannot be inherited.
Definition replace_box.h:31
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.h:42
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.
Definition replace_box.h:97
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.
Definition replace_box.h:61
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.
Definition replace_box.h:51
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.
Definition replace_box.h:84
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.
Definition replace_box.h:72
delegate< void(object &sender, const replace_event_args &e)> replace_event_handler
Represents the method that will handle the xtd::forms::replace_dialog::replace event and the xtd::for...
Definition replace_event_handler.h:24
delegate< void(object &sender, const find_event_args &e)> find_event_handler
Represents the method that will handle the xtd::forms::find_dialog::find_next event of the xtd::forms...
Definition find_event_handler.h:24
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.h:37
#define forms_export_
Define shared library export.
Definition forms_export.h:13
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.h:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::replace_dialog dialog.