xtd - Reference Guide  0.2.0
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::use_wait_cursor Class Reference

#include <use_wait_cursor.h>

Definition

Creates a use wait cursor class.

Namespace
xtd::forms
Library
xtd.forms
Remarks
Displays a wai cursor as long as the object instance is not destroyed.
Examples
The following code example demonstrate the use of use_wait_cursor class.
#include <thread>
#include <xtd/xtd>
using namespace std::chrono;
using namespace std::this_thread;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Use wait cursor example");
button1.auto_size(true);
button1.location({10, 10});
button1.parent(*this);
button1.text("Do something...");
button1.click += [] {
for (auto count = 0; count < 500; ++count) {
sleep_for(milliseconds(10)); // Simulate work...
}
};
}
private:
};
int main() {
}
Examples:
use_wait_cursor.cpp.

Public Member Functions

 use_wait_cursor ()
 Initializes a new instance of use_wait_cursor class. 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...
 

Constructor & Destructor Documentation

◆ use_wait_cursor()

xtd::forms::use_wait_cursor::use_wait_cursor ( )
inline

Initializes a new instance of use_wait_cursor class.

Remarks
The xtd::forms::application::use_wait_cursor(true) is called in the constructor and xtd::forms::application::use_wait_cursor(false) is called in the destructor.

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