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.
Public Member Functions | List of all members
xtd::forms::busy_dialog Class Referencefinal

#include <busy_dialog.h>

Definition

Represents a dialog box that displays busy dialog.

Namespace
xtd::forms
Library
xtd.forms
Examples
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.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.
const xtd::ustring & text() const
Gets the dialog title.
Definition: busy_dialog.h:71
busy_dialog()=default
Initializes a new instance of the busy_dialog class.
@ 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

Inherits 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
 Gets the background color for the dialog. More...
 
busy_dialogback_color (const xtd::drawing::color &color)
 Sets the background color for the dialog. More...
 
const xtd::ustringdescription () const
 Gets the product description. More...
 
busy_dialogdescription (const xtd::ustring &description)
 Sets the product description. More...
 
xtd::forms::dialog_style dialog_style () const
 Gets the dialog style color for the dialog. More...
 
busy_dialogdialog_style (xtd::forms::dialog_style dialog_style)
 Sets the dialog style color for the dialog. More...
 
xtd::drawing::color fore_color () const
 Gets the foreground color for the dialog. More...
 
busy_dialogfore_color (const xtd::drawing::color &color)
 Sets the foreground color for the dialog. More...
 
void hide ()
 Hides busy dialog box. More...
 
xtd::drawing::icon icon () const
 Gets the product icon. More...
 
busy_dialogicon (const xtd::drawing::bitmap &bitmap)
 Sets 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...
 
double opacity () const
 Gets the dialog opacity. More...
 
busy_dialogopacity (double opacity)
 Gets the dialog opacity. 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 xtd::ustringtext () const
 Gets the dialog title. More...
 
busy_dialogtext (const xtd::ustring &text)
 Sets the dialog title. More...
 
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a std::string that represents the current object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 
- Protected Member Functions inherited from xtd::forms::component
 component ()=default
 Initialises a new instance of the component class. More...
 
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...
 

Constructor & Destructor Documentation

◆ busy_dialog()

xtd::forms::busy_dialog::busy_dialog ( )
default

Initializes a new instance of the busy_dialog class.

Member Function Documentation

◆ back_color() [1/2]

xtd::drawing::color xtd::forms::busy_dialog::back_color ( ) const
inline

Gets the background color for the dialog.

Returns
A xtd::drawing::color that represents the background color of the dialog.

◆ back_color() [2/2]

busy_dialog& xtd::forms::busy_dialog::back_color ( const xtd::drawing::color color)
inline

Sets the background color for the dialog.

Parameters
colorA xtd::drawing::color that represents the background color of the dialog.
Returns
Current busy_dialog instance.

◆ description() [1/2]

const xtd::ustring& xtd::forms::busy_dialog::description ( ) const
inline

Gets the product description.

Returns
The product description.

◆ description() [2/2]

busy_dialog& xtd::forms::busy_dialog::description ( const xtd::ustring description)
inline

Sets the product description.

Parameters
descriptionThe product description.
Returns
Current busy_dialog instance.

◆ dialog_style() [1/2]

xtd::forms::dialog_style xtd::forms::busy_dialog::dialog_style ( ) const
inline

Gets the dialog style color for the dialog.

Returns
A xtd::forms::dialog_style that represents the dialog style of the dialog.

◆ dialog_style() [2/2]

busy_dialog& xtd::forms::busy_dialog::dialog_style ( xtd::forms::dialog_style  dialog_style)
inline

Sets the dialog style color for the dialog.

Parameters
dialog_styleA xtd::forms::dialog_style that represents the dialog style of the dialog.
Returns
Current busy_dialog instance.

◆ fore_color() [1/2]

xtd::drawing::color xtd::forms::busy_dialog::fore_color ( ) const
inline

Gets the foreground color for the dialog.

Returns
A xtd::drawing::color that represents the foreground color of the dialog.

◆ fore_color() [2/2]

busy_dialog& xtd::forms::busy_dialog::fore_color ( const xtd::drawing::color color)
inline

Sets the foreground color for the dialog.

Parameters
colorA xtd::drawing::color that represents the foreground color of the dialog.
Returns
Current busy_dialog instance.

◆ hide()

void xtd::forms::busy_dialog::hide ( )

Hides busy dialog box.

◆ icon() [1/4]

xtd::drawing::icon xtd::forms::busy_dialog::icon ( ) const
inline

Gets the product icon.

Returns
The product icon.

◆ icon() [2/4]

busy_dialog& xtd::forms::busy_dialog::icon ( const xtd::drawing::bitmap bitmap)
inline

Sets the product icon.

Parameters
bitmapThe product icon.
Returns
Current busy_dialog instance.

◆ icon() [3/4]

busy_dialog& xtd::forms::busy_dialog::icon ( const xtd::drawing::icon icon)
inline

Sets the product icon.

Parameters
iconThe product icon.
Returns
Current busy_dialog instance.

◆ icon() [4/4]

busy_dialog& xtd::forms::busy_dialog::icon ( const xtd::drawing::image image)
inline

Sets the product icon.

Parameters
imageThe product icon.
Returns
Current busy_dialog instance.

◆ opacity() [1/2]

double xtd::forms::busy_dialog::opacity ( ) const
inline

Gets the dialog opacity.

Returns
The dialog opacity.
Remarks
0 full opacity; 1.0 full opacity.

◆ opacity() [2/2]

busy_dialog& xtd::forms::busy_dialog::opacity ( double  opacity)
inline

Gets the dialog opacity.

Parameters
opacityThe dialog opacity.
Returns
Current busy_dialog instance.
Remarks
0 full opacity; 1.0 full opacity.

◆ reset()

void xtd::forms::busy_dialog::reset ( )

Resets all properties to empty string.

◆ show() [1/2]

void xtd::forms::busy_dialog::show ( )

Runs busy dialog box.

◆ show() [2/2]

void xtd::forms::busy_dialog::show ( const iwin32_window owner)

Runs busy dialog box.

◆ text() [1/2]

const xtd::ustring& xtd::forms::busy_dialog::text ( ) const
inline

Gets the dialog title.

Returns
The dialog title.

◆ text() [2/2]

busy_dialog& xtd::forms::busy_dialog::text ( const xtd::ustring text)
inline

Sets the dialog title.

Parameters
textThe dialog title.
Returns
Current busy_dialog instance.

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