xtd 0.2.0
replace_box.h
Go to the documentation of this file.
1 #pragma once
5 #include "replace_dialog.h"
6 #include <xtd/static>
7 #include <memory>
8 
10 namespace xtd {
12  namespace forms {
29  class forms_export_ replace_box final static_ {
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 }
#define static_
This keyword is use to represent a static object. A static object can&#39;t be instantiated (constructors...
Definition: static.h:37
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
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
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
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Provides an interface to expose Win32 HWND handles.
Definition: iwin32_window.h:21
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
Represents a common dialog box that displays a replace dialog. This class cannot be inherited...
Definition: replace_box.h:29
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
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, 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
Contains xtd::forms::replace_dialog dialog.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
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
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