xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::forms::busy_dialog Class Referencefinal

Represents a common dialog box that displays busy box. More...

#include <busy_dialog.h>

Inheritance diagram for xtd::forms::busy_dialog:
xtd::forms::component

Public Member Functions

 busy_dialog ()=default
 Initializes a new instance of the busy_dialog class. More...
 
xtd::drawing::color back_color () const
 
busy_dialogback_color (const xtd::drawing::color &color)
 
const std::string & description () const
 Gets the product description. More...
 
busy_dialogdescription (const std::string &description)
 Sets the product description. More...
 
xtd::forms::dialog_style dialog_style () const
 
busy_dialogdialog_style (xtd::forms::dialog_style dialog_style)
 
xtd::drawing::color fore_color () const
 
busy_dialogfore_color (const xtd::drawing::color &color)
 
void hide ()
 
xtd::drawing::icon icon () const
 Gets the product icon. More...
 
busy_dialogicon (const xtd::drawing::icon &icon)
 Sets the product icon. More...
 
busy_dialogicon (const xtd::drawing::image &image)
 Sets the product icon. More...
 
busy_dialogicon (const xtd::drawing::bitmap &bitmap)
 Sets the product icon. More...
 
void reset ()
 Resets all properties to empty string. More...
 
void show ()
 Runs busy dialog box. More...
 
void show (const iwin32_window &owner)
 Runs busy dialog box. More...
 
const std::string & text () const
 Gets the dialog title. More...
 
busy_dialogtext (const std::string &text)
 Sets the dialog title. More...
 
double transparency () const
 
busy_dialogtransparency (double transparency)
 

Protected Member Functions

virtual bool can_raise_events () const
 Gets a value indicating whether the component can raise an event. More...
 
bool design_mode () const
 Gets a value that indicates whether the component is currently in design mode. More...
 

Detailed Description

Represents a common dialog box that displays busy box.

Example
The following code example demonstrate the use of busy_dialog dialog.
#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.transparency(0.75);
dialog.show();
for (auto count = 0; count < 500; ++count) {
application::yield();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
};
}
private:
};
int main() {
xtd::forms::application::run(form1());
}

The documentation for this class was generated from the following file: