xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
about_dialog.cpp

The following code example demonstrate the use of xtd::forms::about_dialog dialog.

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 example");
controls().push_back(button1);
button1.location({10, 10});
button1.text("About...");
button1.click += [&] {
about_dialog.icon(xtd::drawing::bitmap(gammasoft_64x64_xpm));
about_dialog.name("About dialog");
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");
};
}
private:
button button1;
};
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
Represents a dialog box that displays about dialog.
Definition: about_dialog.h:50
const artist_collection & artists() const
Gets the artists array.
Definition: about_dialog.h:66
const translator_collection & translators() const
Gets the translators array.
Definition: about_dialog.h:199
xtd::drawing::icon icon() const
Gets the product icon.
Definition: about_dialog.h:141
xtd::ustring long_version() const
Gets the product long version.
Definition: about_dialog.h:177
xtd::ustring copyright() const
Gets the product copyright.
Definition: about_dialog.h:94
xtd::ustring name() const
Gets the product name.
Definition: about_dialog.h:188
xtd::ustring description() const
Gets the product description.
Definition: about_dialog.h:105
xtd::ustring license() const
Gets the product license.
Definition: about_dialog.h:166
void show()
Runs about dialog box.
const author_collection & authors() const
Gets the authors array.
Definition: about_dialog.h:80
const documenter_collection & documenters() const
Gets the documentation writers array.
Definition: about_dialog.h:116
xtd::ustring website_label() const
Gets the product website label.
Definition: about_dialog.h:235
xtd::ustring website() const
Gets the product website.
Definition: about_dialog.h:224
xtd::ustring version() const
Gets the product version.
Definition: about_dialog.h:213
Represents a Windows button control.
Definition: button.h:54
Represents a window or dialog box that makes up an application's user interface.
Definition: form.h:40
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