xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
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) {
application::do_events();
sleep_for(milliseconds(10)); // Simulate work...
}
};
}
private:
};
int main() {
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a Windows button control.
Definition: button.h:54
Represents a window or dialog box that makes up an application's user interface.
Definition: form.h:40
Creates a use wait cursor class.
Definition: use_wait_cursor.h:22
@ button1
The first button on the message box is the default button.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Examples
use_wait_cursor.cpp.

Inherits xtd::object.

Public Member Functions

 use_wait_cursor ()
 Initializes a new instance of use_wait_cursor class.
 
- 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.
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance.
 
virtual xtd::ustring to_string () const noexcept
 Returns a std::string that represents the current object.
 

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.
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

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: