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_box.cpp

The following code example demonstrate the use of xtd::forms::busy_box dialog.

Windows

macOS

Gnome

#include <thread>
#include <xtd/xtd>
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Busy box example");
button1.auto_size(true);
button1.location({10, 10});
button1.parent(*this);
button1.text("Do something...");
button1.click += [] {
busy_box::show("Please wait while do something...", "Application busy");
for (auto count = 0; count < 500; ++count) {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
};
}
private:
};
int main() {
}
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.
static void hide()
Hides a busy box in front.
Definition: busy_box.h:25
static void show()
Displays a busy box.
Definition: busy_box.h:74
@ 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