xtd 0.2.0
Loading...
Searching...
No Matches
application_idle.cpp

demonstrates the use of idle event.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/form>
using namespace xtd;
using namespace xtd::forms;
namespace application_idle_example {
class form1 : public form {
public:
form1() {
application::idle += {*this, &form1::on_application_idle};
}
private:
void on_application_idle(const event_args& e) {
text(string::format("{}", ++counter));
}
int counter = 0;
};
}
auto main() -> int {
application::run(application_idle_example::form1 {});
}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10