xtd 0.2.0
busy_dialog.cpp

demonstrates the use of xtd::forms::busy_dialog dialog.

Windows

macOS

Gnome

#include <xtd/drawing/system_icons>
#include <xtd/forms/application>
#include <xtd/forms/busy_dialog>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/threading/thread>
using namespace xtd::forms;
using namespace xtd::threading;
class form1 : public form {
public:
form1() {
text("Busy dialog example");
button1.auto_size(true);
button1.location({10, 10});
button1.parent(*this);
button1.text("Do something...");
button1.click += [&] {
auto dialog = busy_dialog {};
dialog.text("Application busy");
dialog.description("Please wait while do something...");
dialog.back_color(xtd::drawing::color::red);
dialog.fore_color(xtd::drawing::color::white);
dialog.opacity(0.75);
dialog.show(*this);
for (auto count = 0; count < 500; ++count) {
}
};
}
private:
};
auto main() -> int {
}
static const xtd::drawing::color white
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
Definition color.hpp:470
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition color.hpp:401
static xtd::drawing::icon exclamation() noexcept
Gets an xtd::drawing::icon object that contains the system exclamation icon (WIN32: IDI_EXCLAMATION).
static void do_events()
Processes all Windows messages currently in the message queue.
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a dialog box that displays busy dialog.
Definition busy_dialog.hpp:37
xtd::drawing::icon icon() const noexcept
Gets the product icon.
Represents a Windows button control.
Definition button.hpp:49
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
static void sleep(int32 milliseconds_timeout)
Suspends the current thread for a specified time.
@ button1
The first button on the message box is the default button.
Definition message_dialog_default_button.hpp:24
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
Definition status_bar_panel_style.hpp:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:217
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:11