xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
busy_dialog.cpp

The following code example demonstrate the use of busy_dialog dialog.

Windows

macOS

Gnome

#include <thread>
#include <xtd/xtd>
using namespace xtd::forms;
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 += [&] {
busy_dialog dialog;
dialog.icon(xtd::drawing::system_icons::exclamation({64, 64}));
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.25);
dialog.show(*this);
for (auto count = 0; count < 500; ++count) {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
};
}
private:
};
int main() {
}
static const xtd::drawing::color white
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
Definition: color.h:459
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition: color.h:390
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.
@ button1
The first button on the message box is the default button.
@ button
The appearance of a button.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13