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>
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:
button button1;
speech_synthesizer speech_synthesizer1;
};
auto main() -> int {
application::run(form1 {});
}
Represents a Windows button control.
Definition button.h:49
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Provides access to the functionality of an installed speech synthesis engine.
Definition speech_synthesizer.h:35
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
Contains classes for initializing and configuring a speech synthesis engine, for creating prompts,...
Definition prompt.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10