xtd 0.2.0
find_dialog.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "component.hpp"
10#include "iwin32_window.hpp"
12#include <xtd/drawing/point>
13#include <xtd/event>
14#include <xtd/string>
15
17namespace xtd {
19 namespace forms {
38 class forms_export_ find_dialog final : public component {
39 struct data;
40
41 public:
43
48
52
54
58 const xtd::string& find_string() const noexcept;
62 find_dialog& find_string(const xtd::string& value);
63
66 xtd::drawing::point location() const noexcept;
70 find_dialog& location(const xtd::drawing::point& value);
71
74 bool match_case() const noexcept;
78 find_dialog& match_case(bool value);
79
87
90 bool show_match_case() const noexcept;
95
98 bool show_up_down() const noexcept;
103
106 bool show_whole_word() const noexcept;
111
114 const xtd::string& title() const noexcept;
118 find_dialog& title(const xtd::string& value);
119
122 bool whole_word() const noexcept;
128
130
135
141
143
147 void close();
148
161 void reset() noexcept;
162
165 void show(const iwin32_window& owner);
167
168 private:
169 void create_handle();
170 void destroy_handle();
171 void on_dialog_closed();
172 void on_dialog_find(const xtd::drawing::point& location, const string& find_string, bool downwards, bool whole_word, bool match_case);
173 void recreate_handle();
174
175 xtd::sptr<data> data_;
176 };
177 }
178}
Contains xtd::forms::layout::arranged_element_collection collection.
Represents an event.
Definition event.hpp:21
component()
Initialises a new instance of the component class.
xtd::forms::search_direction search_direction() const noexcept
Gets the search direction value.
void show(const iwin32_window &owner)
Runs find dialog box.
void reset() noexcept
Resets all properties to default values.
bool show_match_case() const noexcept
Gets a value that indicates whether match case option is shown.
find_dialog()
Initializes a new instance of the find_dialog class.
xtd::event< find_dialog, xtd::forms::dialog_closed_event_handler > dialog_closed
Occurs when the user close the find dialog box with dialog close button or cancel button.
Definition find_dialog.hpp:139
bool match_case() const noexcept
Gets the match case value.
void close()
Closes the find dialog box.
xtd::drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the dialog relative to the upper-left corner of the ...
bool show_up_down() const noexcept
Gets a value that indicates whether up down option is shown.
bool whole_word() const noexcept
Gets the whole word value.
xtd::event< find_dialog, xtd::forms::find_event_handler > find_next
Occurs when the user click the find button.
Definition find_dialog.hpp:134
const xtd::string & find_string() const noexcept
Gets the string to find.
bool show_whole_word() const noexcept
Gets a value that indicates whether whole word option is shown.
const xtd::string & title() const noexcept
Gets the find dialog title.
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.hpp:23
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(object &sender, const dialog_closed_event_args &e)> dialog_closed_event_handler
Provides handler for a dialog closed event.
Definition dialog_closed_event_handler.hpp:27
xtd::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.hpp:27
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
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 const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::forms::search_direction enum class.