xtd 0.2.0
Loading...
Searching...
No Matches
common_dialog.h
Go to the documentation of this file.
1
4#pragma once
5#include "application.h"
6#include "form.h"
7#include "component.h"
9#include "dialog_result.h"
10#include "help_event_handler.h"
11#include "iwin32_window.h"
12#include <xtd/any>
13#include <xtd/chrono>
14
16struct __xtd_forms_common_dialog_closed_caller__;
18
20namespace xtd {
22 namespace forms {
32 class common_dialog : public component {
33 struct data;
34
35 public:
37
42
44
49
53 std::any tag() const noexcept;
57 common_dialog& tag(const std::any& tag);
59
61
66 virtual void reset() noexcept = 0;
67
72
78
82 void show_sheet(const iwin32_window& owner);
83
89
91
96
101
102 protected:
103 friend struct ::__xtd_forms_common_dialog_closed_caller__;
104
106
112
117
121 virtual bool run_dialog(intptr hwnd_owner) = 0;
122
127 virtual void run_sheet(intptr hwnd_owner) = 0;
128
133
134 private:
135 std::shared_ptr<data> data_;
136 };
137 }
138}
Contains xtd::forms::application class.
Represents an event.
Definition event.h:21
Specifies the base class used for displaying dialog boxes on the screen.
Definition common_dialog.h:32
void set_dialog_result(xtd::forms::dialog_result value)
Sets async dialog_result result after dialog box is closing.
virtual void on_help_request(help_event_args &e)
Raises the common_dialog::help_request event.
common_dialog()
Initializes a new instance of the common_dialog class.
xtd::forms::dialog_result show_dialog()
Runs a common dialog box with a default owner.
event< common_dialog, 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.h:99
event< common_dialog, help_event_handler > help_request
Occurs when the user clicks the Help button on a common dialog box.
Definition common_dialog.h:95
virtual void run_sheet(intptr hwnd_owner)=0
When overridden in a derived class, specifies a common dialog box.
xtd::forms::dialog_result show_sheet_dialog(const iwin32_window &owner)
Runs a common dialog box with the specified owner.
void show_sheet(const iwin32_window &owner)
Runs a common dialog box with the specified owner.
xtd::forms::dialog_result dialog_result() const noexcept
Gets async dialog_result result after dialog box is closing.
std::any tag() const noexcept
Gets an object that contains data about the control.
virtual bool run_dialog(intptr hwnd_owner)=0
When overridden in a derived class, specifies a common dialog box.
virtual void on_dialog_closed(const dialog_closed_event_args &e)
Raises the common_dialog::dialog_close event.
virtual void reset() noexcept=0
When overridden in a derived class, resets the properties of a common dialog box to their default val...
Provides the base implementation and enables object sharing between applications.
Definition component.h:23
Provides data for a dialog closed event.
Definition dialog_closed_event_args.h:20
Provides data for the xtd::forms::control::control_added and xtd::forms::control::control_removed eve...
Definition help_event_args.h:24
Provides an interface to expose Win32 HWND handles.
Definition iwin32_window.h:21
Contains xtd::forms::component class.
Contains xtd::forms::dialog_closed_event_handler dialog.
Contains xtd::forms::dialog_result enum class.
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.h:22
delegate< void(object &sender, 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.h:23
intmax_t intptr
Represent a pointer or a handle.
Definition types.h:153
@ any
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
dialog_result
Specifies identifiers to indicate the return value of a dialog box.
Definition dialog_result.h:41
@ e
The E key.
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 xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::style_sheets::form alias.