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 {
30 public:
32
39 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
40 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));}
41
48 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
49 static void show(const iwin32_window& owner, const xtd::ustring& 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);}
50
58 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
59 static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& 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);}
60
69 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
70 static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& replace_string, const xtd::ustring& 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);}
71
81 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
82 static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& replace_string, const xtd::ustring& 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);}
83
94 template<typename find_next_callback_t, typename replace_callback_t, typename replace_all_callback_t>
95 static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& replace_string, const xtd::ustring& 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);}
97
98 private:
99 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::ustring& find_string = "", const xtd::ustring& replace_string = "", const xtd::ustring& title = "", bool match_case = false, bool whole_word = false);
100
101 static std::unique_ptr<xtd::forms::replace_dialog> dialog_;
102 };
103 }
104}
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.h:21
Represents a common dialog box that displays a replace dialog. This class cannot be inherited.
Definition replace_box.h:29
static void show(const iwin32_window &owner, const xtd::ustring &find_string, const xtd::ustring &replace_string, const xtd::ustring &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:70
static void show(const iwin32_window &owner, const xtd::ustring &find_string, const xtd::ustring &replace_string, const xtd::ustring &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:95
static void show(const iwin32_window &owner, const xtd::ustring &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:49
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:40
static void show(const iwin32_window &owner, const xtd::ustring &find_string, const xtd::ustring &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:59
static void show(const iwin32_window &owner, const xtd::ustring &find_string, const xtd::ustring &replace_string, const xtd::ustring &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:82
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
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:22
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:22
#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
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.