xtd 0.2.0
hello_world_say.cpp

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

Windows
hello_world_say_w.png

hello_world_say_wd.png
macOS
hello_world_say_m.png

hello_world_say_md.png
Gnome
hello_world_say_g.png

hello_world_say_gd.png
#include <xtd/speech/synthesis/speech_synthesizer>
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
using namespace xtd;
using namespace xtd::forms;
using namespace xtd::speech::synthesis;
class form1 : public form {
public:
form1() {
text("Hello world (say)");
button1.location({10, 10});
button1.parent(*this);
button1.text("Say...");
button1.click += [&] {
speech_synthesizer1.speak_async("Hello, world!");
};
}
private:
speech_synthesizer speech_synthesizer1;
};
auto main()->int {
application::run(form1 {});
}