xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::busy_dialog Class Referencefinal
Inheritance diagram for xtd::forms::busy_dialog:
xtd::forms::component xtd::object

Definition

Represents a dialog box that displays busy dialog.

Header
#include <xtd/forms/busy_dialog>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
 
 
 
 
 
Dark  
 
 
 
 
 
Examples
The following code example demonstrates the use of busy_dialog dialog.
#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) {
application::do_events();
thread::sleep(10);
}
};
}
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.h:473
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:404
static xtd::drawing::icon exclamation() noexcept
Gets an xtd::drawing::icon object that contains the system exclamation icon (WIN32: IDI_EXCLAMATION).
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.h:37
xtd::drawing::icon icon() const noexcept
Gets the product icon.
Represents a Windows button control.
Definition button.h:49
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
@ button1
The first button on the message box is the default button.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.h:11
Examples
busy_dialog.cpp.

Public Constructors

 busy_dialog ()
 Initializes a new instance of the busy_dialog class.
 

Public Properties

xtd::drawing::color back_color () const noexcept
 Gets the background color for the dialog.
 
busy_dialogback_color (const xtd::drawing::color &color)
 Sets the background color for the dialog.
 
xtd::forms::dialog_appearance dialog_appearance () const noexcept
 Gets the dialog appearance color for the dialog.
 
busy_dialogdialog_appearance (xtd::forms::dialog_appearance dialog_appearance)
 Sets the dialog appearance color for the dialog.
 
const xtd::stringdescription () const noexcept
 Gets the product description.
 
busy_dialogdescription (const xtd::string &description)
 Sets the product description.
 
xtd::drawing::color fore_color () const noexcept
 Gets the foreground color for the dialog.
 
busy_dialogfore_color (const xtd::drawing::color &color)
 Sets the foreground color for the dialog.
 
xtd::drawing::icon icon () const noexcept
 Gets the product icon.
 
busy_dialogicon (const xtd::drawing::icon &icon)
 Sets the product icon.
 
busy_dialogicon (const xtd::drawing::image &image)
 Sets the product icon.
 
busy_dialogicon (const xtd::drawing::bitmap &bitmap)
 Sets the product icon.
 
double opacity () const noexcept
 Gets the dialog opacity.
 
busy_dialogopacity (double opacity)
 Gets the dialog opacity.
 
const xtd::stringtext () const noexcept
 Gets the dialog title.
 
busy_dialogtext (const xtd::string &text)
 Sets the dialog title.
 

Public Methods

void hide ()
 Hides busy dialog box.
 
void reset ()
 Resets all properties to empty string.
 
void show ()
 Runs busy dialog box.
 
void show (const iwin32_window &owner)
 Runs busy dialog box.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 
- Protected Member Functions inherited from xtd::forms::component
 component ()
 Initialises a new instance of the component class.
 
virtual bool can_raise_events () const noexcept
 Gets a value indicating whether the component can raise an event.
 
bool design_mode () const noexcept
 Gets a value that indicates whether the component is currently in design mode.
 

Constructor & Destructor Documentation

◆ busy_dialog()

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

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
noexcept

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)

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.

◆ dialog_appearance() [1/2]

xtd::forms::dialog_appearance xtd::forms::busy_dialog::dialog_appearance ( ) const
noexcept

Gets the dialog appearance color for the dialog.

Returns
A xtd::forms::dialog_appearance that represents the dialog appearance of the dialog.

◆ dialog_appearance() [2/2]

busy_dialog & xtd::forms::busy_dialog::dialog_appearance ( xtd::forms::dialog_appearance  dialog_appearance)

Sets the dialog appearance color for the dialog.

Parameters
dialog_appearanceA xtd::forms::dialog_appearance that represents the dialog appearance of the dialog.
Returns
Current busy_dialog instance.

◆ description() [1/2]

const xtd::string & xtd::forms::busy_dialog::description ( ) const
noexcept

Gets the product description.

Returns
The product description.

◆ description() [2/2]

busy_dialog & xtd::forms::busy_dialog::description ( const xtd::string description)

Sets the product description.

Parameters
descriptionThe product description.
Returns
Current busy_dialog instance.

◆ fore_color() [1/2]

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

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)

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.

◆ icon() [1/4]

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

Gets the product icon.

Returns
The product icon.
Examples
busy_dialog.cpp.

◆ icon() [2/4]

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

Sets the product icon.

Parameters
iconThe product icon.
Returns
Current busy_dialog instance.

◆ icon() [3/4]

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

Sets the product icon.

Parameters
imageThe product icon.
Returns
Current busy_dialog instance.

◆ icon() [4/4]

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

Sets the product icon.

Parameters
bitmapThe product icon.
Returns
Current busy_dialog instance.

◆ opacity() [1/2]

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

Gets the dialog opacity.

Returns
The dialog opacity.
Remarks
0 full opacity; 1.0 no opacity. The lower the value, the more transparent.

◆ opacity() [2/2]

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

Gets the dialog opacity.

Parameters
opacityThe dialog opacity.
Returns
Current busy_dialog instance.
Remarks
0 full opacity; 1.0 no opacity. The lower the value, the more transparent.

◆ text() [1/2]

const xtd::string & xtd::forms::busy_dialog::text ( ) const
noexcept

Gets the dialog title.

Returns
The dialog title.

◆ text() [2/2]

busy_dialog & xtd::forms::busy_dialog::text ( const xtd::string text)

Sets the dialog title.

Parameters
textThe dialog title.
Returns
Current busy_dialog instance.

◆ hide()

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

Hides busy dialog box.

◆ 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.


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