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

The classic first application "Hello, World!" with xtd::forms::button control and xtd::speech::synthesis::speech_synthesizer class.

Windows

macOS

Gnome

#include <xtd/xtd>
class form1 : public form {
public:
form1() {
text("Hello world (say)");
button1.location({10, 10});
button1.parent(*this);
button1.text("Say...");
button1.click += delegate_ {
speech_synthesizer1.speak_async("Hello, World!");
};
}
private:
button button1;
speech::synthesis::speech_synthesizer speech_synthesizer1;
};
auto main() -> int {
application::run(form1 {});
}
#define delegate_
The declaration of a delegate type is similar to a method signature. It has a return value and any nu...
Definition delegate.hpp:900