xtd 1.0.0
Loading...
Searching...
No Matches
replace_dialog.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "component.hpp"
11#include "iwin32_window.hpp"
12#include <xtd/drawing/point>
13#include <xtd/event>
14#include <xtd/string>
15
17namespace xtd {
19 namespace forms {
39 struct data;
40
41 public:
43
48
52
54
58 [[nodiscard]] auto find_string() const noexcept -> const xtd::string&;
62 auto find_string(const xtd::string& value) -> replace_dialog&;
63
66 [[nodiscard]] auto replace_string() const noexcept -> const xtd::string&;
70 auto replace_string(const xtd::string& value) -> replace_dialog&;
71
74 [[nodiscard]] auto location() const noexcept -> xtd::drawing::point;
78 auto location(const xtd::drawing::point& value) -> replace_dialog&;
79
82 [[nodiscard]] auto match_case() const noexcept -> bool;
86 auto match_case(bool value) -> replace_dialog&;
87
90 [[nodiscard]] auto show_match_case() const noexcept -> bool;
94 auto show_match_case(bool value) -> replace_dialog&;
95
98 [[nodiscard]] auto show_whole_word() const noexcept -> bool;
102 auto show_whole_word(bool value) -> replace_dialog&;
103
106 [[nodiscard]] auto title() const noexcept -> const xtd::string&;
110 auto title(const xtd::string& value) -> replace_dialog&;
111
114 [[nodiscard]] auto whole_word() const noexcept -> bool;
118 auto whole_word(bool value) -> replace_dialog&;
120
122
127
131
135
141
143
147 auto close() -> void;
148
160 auto reset() noexcept -> void;
161
164 auto show(const iwin32_window& owner) -> void;
166
167 private:
168 auto create_handle() -> void;
169 auto destroy_handle() -> void;
170 auto recreate_handle() -> void;
171 auto on_dialog_closed() -> void;
172 auto on_dialog_find(const xtd::drawing::point& location, const xtd::string& find_string, const xtd::string& replace_string, bool whole_word, bool match_case) -> void;
173 auto on_dialog_replace(const xtd::drawing::point& location, const xtd::string& find_string, const xtd::string& replace_string, bool replace_all, bool whole_word, bool match_case) -> void;
174
175 xtd::sptr<data> data_;
176 };
177 }
178}
Contains xtd::forms::layout::arranged_element_collection collection.
Represents an event.
Definition event.hpp:23
Provides the base implementation and enables object sharing between applications.
Definition component.hpp:26
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.hpp:23
auto location() const noexcept -> xtd::drawing::point
Gets the coordinates of the upper-left corner of the dialog relative to the upper-left corner of the ...
auto replace_string() const noexcept -> const xtd::string &
Gets the replaced string.
auto close() -> void
Closes the find dialog box.
auto reset() noexcept -> void
Resets all properties to default values.
xtd::event< replace_dialog, xtd::forms::replace_event_handler > replace
Occurs when the user click the replace button.
Definition replace_dialog.hpp:130
auto find_string() const noexcept -> const xtd::string &
Gets the string to find.
auto show(const iwin32_window &owner) -> void
Runs find dialog box.
auto show_match_case() const noexcept -> bool
Gets a value that indicates whether match case option is shown.
auto whole_word() const noexcept -> bool
Gets the whole word value.
auto title() const noexcept -> const xtd::string &
Gets the find dialog title.
xtd::event< replace_dialog, xtd::forms::replace_event_handler > replace_all
Occurs when the user click the replace all button.
Definition replace_dialog.hpp:134
xtd::event< replace_dialog, xtd::forms::dialog_closed_event_handler > dialog_closed
Occurs when the user close the replace dialog box with dialog close button or cancel button.
Definition replace_dialog.hpp:139
auto show_whole_word() const noexcept -> bool
Gets a value that indicates whether whole word option is shown.
replace_dialog()
Initializes a new instance of the replace_dialog class.
xtd::event< replace_dialog, xtd::forms::find_event_handler > find_next
Occurs when the user click the find button.
Definition replace_dialog.hpp:126
auto match_case() const noexcept -> bool
Gets the match case value.
Contains xtd::forms::component class.
Contains xtd::forms::dialog_appearance enum class.
Contains xtd::forms::dialog_closed_event_handler handler.
Contains xtd::forms::find_event_handler event handler.
xtd::delegate< void(xtd::object &sender, const xtd::forms::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.hpp:27
xtd::delegate< void(xtd::object &sender, const xtd::forms::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.hpp:27
xtd::delegate< void(xtd::object &sender, const xtd::forms::dialog_closed_event_args &e)> dialog_closed_event_handler
Provides handler for a dialog closed event.
Definition dialog_closed_event_handler.hpp:27
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
Contains xtd::forms::iwin32_window interface.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Contains xtd::forms::replace_event_handler handler.