xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
about_dialog_system.cpp

The following code example demonstrate the use of xtd::forms::about_dialog dialog with dialog_style to system.

Windows

macOS

Gnome

#include <xtd/xtd>
#include "../resources/gammasoft_64x64.xpm"
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("About dialog system example");
controls().push_back(button1);
button1.location({10, 10});
button1.text("About...");
button1.click += [&] {
about_dialog about_dialog;
about_dialog.dialog_style(xtd::forms::dialog_style::system);
about_dialog.icon(xtd::drawing::bitmap(gammasoft_64x64_xpm));
about_dialog.name("About dialog system");
about_dialog.version("1.0");
about_dialog.long_version("1.0.0");
about_dialog.description("About dialog description.");
about_dialog.copyright("Copyright (c) 2021 Gammasoft.\nAll rights reserved.");
about_dialog.website("https://gammasoft71.wixsite.com/gammasoft");
about_dialog.website_label("gammasoft website");
about_dialog.authors({"Gammasoft", "Contributors"});
about_dialog.documenters({"Gammasoft"});
about_dialog.translators({"Gammasoft", "Contributors"});
about_dialog.artists({"Gammasoft"});
about_dialog.license("MIT License\n"
"\n"
"Copyright (c) 2021 Gammasoft.\n"
"\n"
"Permission is hereby granted, free of charge, to any person obtaining\n"
"a copy of this software and associated documentation files (the\n"
"\"Software\"), to deal in the Software without restriction, including\n"
"without limitation the rights to use, copy, modify, merge, publish,\n"
"distribute, sublicense, and/or sell copies of the Software, and to\n"
"permit persons to whom the Software is furnished to do so, subject\n"
"to the following conditions:\n"
"\n"
"The above copyright notice and this permission notice shall be\n"
"included in all copies or substantial portions of the Software.\n"
"\n"
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF\n"
"ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n"
"THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n"
"PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT\n"
"SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n"
"ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n"
"ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n"
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE\n"
"OR OTHER DEALINGS IN THE SOFTWARE.\n");
about_dialog.show(*this);
};
}
private:
};
int main() {
application::run(form1());
}
Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes....
Definition: bitmap.h:19
static void run()
Begins running a standard application message loop on the current thread, without a form.
@ button1
The first button on the message box is the default button.
@ system
System style dialog.
@ button
The appearance of a button.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17