xtd 1.0.0
Loading...
Searching...
No Matches
common_dialog.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "application.hpp"
6#include "form.hpp"
7#include "component.hpp"
9#include "dialog_result.hpp"
11#include "iwin32_window.hpp"
12#include <xtd/any>
13#include <xtd/chrono>
14
16struct __xtd_forms_common_dialog_closed_caller__;
18
20namespace xtd {
22 namespace forms {
35 struct data;
36
37 public:
39
44
46
50 [[nodiscard]] auto dialog_result() const noexcept -> xtd::forms::dialog_result;
51
55 [[nodiscard]] auto tag() const noexcept -> const xtd::any_object&;
59 auto tag(const xtd::any_object& value) -> common_dialog&;
61
63
68 virtual auto reset() noexcept -> void = 0;
69
73 [[nodiscard]] auto show_dialog() -> xtd::forms::dialog_result;
74
79 [[nodiscard]] auto show_dialog(const iwin32_window& owner) -> xtd::forms::dialog_result;
80
84 auto show_sheet(const iwin32_window& owner) -> void;
85
89 [[nodiscard]] auto show_sheet_dialog(const iwin32_window& owner) -> xtd::forms::dialog_result;
91
93
98
103
104 protected:
105 friend struct ::__xtd_forms_common_dialog_closed_caller__;
106
108
113 virtual auto on_dialog_closed(const xtd::forms::dialog_closed_event_args& e) -> void;
114
118 virtual auto on_help_request(xtd::forms::help_event_args& e) -> void;
119
123 [[nodiscard]] virtual auto run_dialog(xtd::intptr hwnd_owner) -> bool = 0;
124
129 virtual auto run_sheet(xtd::intptr hwnd_owner) -> void = 0;
130
135
136 private:
137 xtd::sptr<data> data_;
138 };
139 }
140}
Contains xtd::forms::application class.
Represent a polymorphic wrapper capable of holding any type.
Definition any_object.hpp:29
Represents an event.
Definition event.hpp:23
virtual auto on_help_request(xtd::forms::help_event_args &e) -> void
Raises the common_dialog::help_request event.
auto set_dialog_result(xtd::forms::dialog_result value) -> void
Sets async dialog_result result after dialog box is closing.
xtd::event< common_dialog, xtd::forms::help_event_handler > help_request
Occurs when the user clicks the Help button on a common dialog box.
Definition common_dialog.hpp:97
common_dialog()
Initializes a new instance of the common_dialog class.
xtd::event< common_dialog, xtd::forms::dialog_closed_event_handler > dialog_closed
Occurs when the user close a common dialog box with dialog close button or other dialog buttons.
Definition common_dialog.hpp:101
auto dialog_result() const noexcept -> xtd::forms::dialog_result
Gets async dialog_result result after dialog box is closing.
auto tag() const noexcept -> const xtd::any_object &
Gets an object that contains data about the control.
auto show_sheet_dialog(const iwin32_window &owner) -> xtd::forms::dialog_result
Runs a common dialog box with the specified owner.
virtual auto run_sheet(xtd::intptr hwnd_owner) -> void=0
When overridden in a derived class, specifies a common dialog box.
virtual auto run_dialog(xtd::intptr hwnd_owner) -> bool=0
When overridden in a derived class, specifies a common dialog box.
virtual auto reset() noexcept -> void=0
When overridden in a derived class, resets the properties of a common dialog box to their default val...
auto show_sheet(const iwin32_window &owner) -> void
Runs a common dialog box with the specified owner.
auto show_dialog() -> xtd::forms::dialog_result
Runs a common dialog box with a default owner.
virtual auto on_dialog_closed(const xtd::forms::dialog_closed_event_args &e) -> void
Raises the common_dialog::dialog_close event.
Provides the base implementation and enables object sharing between applications.
Definition component.hpp:26
Provides data for a dialog closed event.
Definition dialog_closed_event_args.hpp:22
Provides data for the xtd::forms::control::control_added and xtd::forms::control::control_removed eve...
Definition help_event_args.hpp:26
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.hpp:23
Contains xtd::forms::component class.
Contains xtd::forms::dialog_closed_event_handler handler.
Contains xtd::forms::dialog_result enum class.
Contains xtd::forms::form container.
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
xtd::delegate< void(xtd::object &sender, xtd::forms::help_event_args &e)> help_event_handler
Represents the method that will handle the xtd::forms::control::help_requested event of a control.
Definition help_event_handler.hpp:28
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
@ e
The E key.
Definition keys.hpp:207
Contains xtd::forms::help_event_handler event handler.
Contains xtd::forms::iwin32_window interface.
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