xtd 0.2.0
find_box.h
Go to the documentation of this file.
1 #pragma once
5 #include "find_dialog.h"
6 #include <xtd/static>
7 #include <memory>
8 
10 namespace xtd {
12  namespace forms {
29  class forms_export_ find_box final static_ {
30  public:
32 
37  template<typename find_next_callback_t>
38  static void show(const iwin32_window& owner, find_next_callback_t find_next) {show_find_box(owner, xtd::forms::find_event_handler(find_next));}
43  template<typename find_next_callback_t>
44  static void show(const iwin32_window& owner, const xtd::ustring& find_string, find_next_callback_t find_next) {show_find_box(owner, xtd::forms::find_event_handler(find_next), find_string);}
50  template<typename find_next_callback_t>
51  static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& title, find_next_callback_t find_next) {show_find_box(owner, xtd::forms::find_event_handler(find_next), find_string, title);}
58  template<typename find_next_callback_t>
59  static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& title, bool match_case, find_next_callback_t find_next) {show_find_box(owner, xtd::forms::find_event_handler(find_next), find_string, title, match_case);}
67  template<typename find_next_callback_t>
68  static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& title, bool match_case, xtd::forms::search_direction search_direction, find_next_callback_t find_next) {show_find_box(owner, xtd::forms::find_event_handler(find_next), find_string, title, match_case, search_direction);}
77  template<typename find_next_callback_t>
78  static void show(const iwin32_window& owner, const xtd::ustring& find_string, const xtd::ustring& title, bool match_case, xtd::forms::search_direction search_direction, bool whole_word, find_next_callback_t find_next) {show_find_box(owner, xtd::forms::find_event_handler(find_next), find_string, title, match_case, search_direction, whole_word);}
80 
81  private:
82  static void show_find_box(const iwin32_window& owner, xtd::forms::find_event_handler find_next, const xtd::ustring& find_string = "", const xtd::ustring& title = "", bool match_case = false, xtd::forms::search_direction search_direction = xtd::forms::search_direction::down, bool whole_word = false);
83 
84  static std::unique_ptr<xtd::forms::find_dialog> dialog_;
85  };
86  }
87 }
Contains xtd::forms::find_dialog dialog.
static void show(const iwin32_window &owner, const xtd::ustring &find_string, const xtd::ustring &title, bool match_case, find_next_callback_t find_next)
Displays a find dialog box.
Definition: find_box.h:59
static void show(const iwin32_window &owner, find_next_callback_t find_next)
Displays a find dialog box.
Definition: find_box.h:38
#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, const xtd::ustring &find_string, const xtd::ustring &title, bool match_case, xtd::forms::search_direction search_direction, find_next_callback_t find_next)
Displays a find dialog box.
Definition: find_box.h:68
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Search direction down.
Provides an interface to expose Win32 HWND handles.
Definition: iwin32_window.h:21
Represents a common dialog box that displays a find dialog. This class cannot be inherited.
Definition: find_box.h:29
static void show(const iwin32_window &owner, const xtd::ustring &find_string, find_next_callback_t find_next)
Displays a find dialog box.
Definition: find_box.h:44
static void show(const iwin32_window &owner, const xtd::ustring &find_string, const xtd::ustring &title, bool match_case, xtd::forms::search_direction search_direction, bool whole_word, find_next_callback_t find_next)
Displays a find dialog box.
Definition: find_box.h:78
search_direction
Specifies the search direction for xtd::forms::find_dialog dialog.
Definition: search_direction.h:19
static void show(const iwin32_window &owner, const xtd::ustring &find_string, const xtd::ustring &title, find_next_callback_t find_next)
Displays a find dialog box.
Definition: find_box.h:51
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13