xtd 0.2.0
xtd::forms::about_dialog Class Referencefinal

Definition

Represents a dialog box that displays about dialog.

Header
#include <xtd/forms/about_dialog>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
dialog_about_dialog_w.png
    html dialog_about_dialog_m.png    html dialog_about_dialog_g.png 
Dark  
dialog_about_dialog_wd.png
    html dialog_about_dialog_md.png    html dialog_about_dialog_gd.png 
Examples
The following code example demonstrates the use of about_dialog dialog.
#include <xtd/forms/about_dialog>
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include "../resources/gammasoft_64x64.xpm"
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 += [&] {
static auto dialog = about_dialog {};
dialog.icon(xtd::drawing::bitmap {gammasoft_64x64_xpm});
dialog.name("About dialog");
dialog.version("1.0");
dialog.long_version("1.0.0");
dialog.description("About dialog description.");
dialog.website("https://gammasoft71.wixsite.com/gammasoft");
dialog.website_label("gammasoft website");
dialog.copyright("Copyright (c) 2023 Gammasoft.\nAll rights reserved.");
dialog.authors({"Gammasoft", "Contributors"});
dialog.documenters({"Gammasoft"});
dialog.translators({"Gammasoft", "Contributors"});
dialog.artists({"Gammasoft"});
dialog.license("MIT License\n"
"\n"
"Copyright (c) 2023 Gammasoft.\n"
"\n"
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n"
"\n"
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n"
"\n"
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n");
dialog.show();
};
}
private:
};
auto main()->int {
application::run(form1 {});
}
Examples
The following code example demonstrates the use of about_dialog dialog with dialog_styledialog_style to system.
#include <xtd/forms/about_dialog>
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include "../resources/gammasoft_64x64.xpm"
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 += [&] {
static about_dialog dialog;
dialog.icon(xtd::drawing::bitmap {gammasoft_64x64_xpm});
dialog.name("About dialog system");
dialog.version("1.0");
dialog.long_version("1.0.0");
dialog.description("About dialog description.");
dialog.copyright("Copyright (c) 2023 Gammasoft.\nAll rights reserved.");
dialog.website("https://gammasoft71.wixsite.com/gammasoft");
dialog.website_label("gammasoft website");
dialog.authors({"Gammasoft", "Contributors"});
dialog.documenters({"Gammasoft"});
dialog.translators({"Gammasoft", "Contributors"});
dialog.artists({"Gammasoft"});
dialog.license("MIT License\n"
"\n"
"Copyright (c) 2023 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");
dialog.show(*this);
};
}
private:
};
auto main()->int {
application::run(form1 {});
}
Examples:
about_dialog.cpp, about_dialog_system.cpp, and minesweeper.cpp.

Alias

using author_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents a author collection. More...
 
using artist_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents a artist collection. More...
 
using documenter_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents a documenter collection. More...
 
using translator_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents a translator collection. More...
 

Constructors

 about_dialog ()
 Initializes a new instance of the about_dialog class. More...
 

Properties

const artist_collectionartists () const noexcept
 Gets the artists array. More...
 
artist_collectionartists () noexcept
 Gets the artists array. More...
 
about_dialogartists (const artist_collection &artists)
 Sets the artists array. More...
 
const author_collectionauthors () const noexcept
 Gets the authors array. More...
 
author_collectionauthors () noexcept
 Gets the authors array. More...
 
about_dialogauthors (const author_collection &authors)
 Sets the authors array. More...
 
xtd::ustring copyright () const noexcept
 Gets the product copyright. More...
 
about_dialogcopyright (const xtd::ustring &copyright)
 Sets the product description. More...
 
xtd::ustring description () const noexcept
 Gets the product description. More...
 
about_dialogdescription (const xtd::ustring &description)
 Sets the product description. More...
 
const documenter_collectiondocumenters () const noexcept
 Gets the documentation writers array. More...
 
documenter_collectiondocumenters () noexcept
 Gets the artists array. More...
 
about_dialogdocumenters (const documenter_collection &documenters)
 Sets the documenters array. More...
 
xtd::forms::dialog_appearance dialog_appearance () const noexcept
 Gets the dialog appearance. More...
 
about_dialogdialog_appearance (xtd::forms::dialog_appearance dialog_appearance)
 Sets the dialog appearance. More...
 
xtd::drawing::icon icon () const noexcept
 Gets the product icon. More...
 
about_dialogicon (const xtd::drawing::icon &icon)
 Sets the product icon. More...
 
about_dialogicon (const xtd::drawing::image &image)
 Sets the product icon. More...
 
about_dialogicon (const xtd::drawing::bitmap &bitmap)
 Sets the product icon. More...
 
xtd::ustring license () const noexcept
 Gets the product license. More...
 
about_dialoglicense (const xtd::ustring &license)
 Sets the product license. More...
 
xtd::ustring long_version () const noexcept
 Gets the product long version. More...
 
about_dialoglong_version (const xtd::ustring &long_version)
 Sets the product long version. More...
 
xtd::ustring name () const noexcept
 Gets the product name. More...
 
about_dialogname (const xtd::ustring &name)
 Sets the product name. More...
 
const translator_collectiontranslators () const noexcept
 Gets the translators array. More...
 
translator_collectiontranslators () noexcept
 Gets the translators array. More...
 
about_dialogtranslators (const translator_collection &translators)
 Sets the translators array. More...
 
xtd::ustring version () const noexcept
 Gets the product version. More...
 
about_dialogversion (const xtd::ustring &version)
 Sets the product version. More...
 
xtd::ustring website () const noexcept
 Gets the product website. More...
 
about_dialogwebsite (const xtd::ustring &website)
 Sets the product website. More...
 
xtd::ustring website_label () const noexcept
 Gets the product website label. More...
 
about_dialogwebsite_label (const xtd::ustring &website_label)
 Sets the product website label. More...
 

Methods

void reset () noexcept
 Resets all properties to empty string. More...
 
void show ()
 Runs about dialog box. More...
 
void show (const iwin32_window &owner)
 Runs about dialog box. More...
 
static about_dialog from_executing_assembly_informations ()
 Create a new xtd::forms::about_dialog from executing xtd::reflecction::assembly informations. More...
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 
- Protected Member Functions inherited from xtd::forms::component
 component ()
 Initialises a new instance of the component class. More...
 
virtual bool can_raise_events () const noexcept
 Gets a value indicating whether the component can raise an event. More...
 
bool design_mode () const noexcept
 Gets a value that indicates whether the component is currently in design mode. More...
 

Member Typedef Documentation

◆ artist_collection

◆ author_collection

◆ documenter_collection

◆ translator_collection

Constructor & Destructor Documentation

◆ about_dialog()

xtd::forms::about_dialog::about_dialog ( )

Initializes a new instance of the about_dialog class.

Member Function Documentation

◆ artists() [1/3]

const artist_collection& xtd::forms::about_dialog::artists ( ) const
noexcept

Gets the artists array.

Returns
The artists array.
Examples:
about_dialog_system.cpp.

◆ artists() [2/3]

artist_collection& xtd::forms::about_dialog::artists ( )
noexcept

Gets the artists array.

Returns
The artists array.

◆ artists() [3/3]

about_dialog& xtd::forms::about_dialog::artists ( const artist_collection artists)

Sets the artists array.

Parameters
artistsThe artists array.
Returns
Current about_dialog instance.

◆ authors() [1/3]

const author_collection& xtd::forms::about_dialog::authors ( ) const
noexcept

Gets the authors array.

Returns
The author array.
Examples:
about_dialog_system.cpp.

◆ authors() [2/3]

author_collection& xtd::forms::about_dialog::authors ( )
noexcept

Gets the authors array.

Returns
The authors array.

◆ authors() [3/3]

about_dialog& xtd::forms::about_dialog::authors ( const author_collection authors)

Sets the authors array.

Parameters
authorsThe authors array.
Returns
Current about_dialog instance.

◆ copyright() [1/2]

xtd::ustring xtd::forms::about_dialog::copyright ( ) const
noexcept

Gets the product copyright.

Returns
The product copyright.
Examples:
about_dialog_system.cpp.

◆ copyright() [2/2]

about_dialog& xtd::forms::about_dialog::copyright ( const xtd::ustring copyright)

Sets the product description.

Parameters
copyrightThe description copyright.
Returns
Current about_dialog instance.

◆ description() [1/2]

xtd::ustring xtd::forms::about_dialog::description ( ) const
noexcept

Gets the product description.

Returns
The product description.
Examples:
about_dialog_system.cpp.

◆ description() [2/2]

about_dialog& xtd::forms::about_dialog::description ( const xtd::ustring description)

Sets the product description.

Parameters
descriptionThe product description.
Returns
Current about_dialog instance.

◆ dialog_appearance() [1/2]

xtd::forms::dialog_appearance xtd::forms::about_dialog::dialog_appearance ( ) const
noexcept

Gets the dialog appearance.

Returns
One of the xtd::forms::dialog_appearance values. The default value is xtd::forms::dialog_appearance::standard.
Examples:
about_dialog_system.cpp.

◆ dialog_appearance() [2/2]

about_dialog& xtd::forms::about_dialog::dialog_appearance ( xtd::forms::dialog_appearance  dialog_appearance)

Sets the dialog appearance.

Parameters
dialog_appearanceOne of the xtd::forms::dialog_appearance values. The default value is xtd::forms::dialog_appearance::standard.
Returns
Current about_dialog instance.

◆ documenters() [1/3]

const documenter_collection& xtd::forms::about_dialog::documenters ( ) const
noexcept

Gets the documentation writers array.

Returns
The documentation writers array.
Examples:
about_dialog_system.cpp.

◆ documenters() [2/3]

documenter_collection& xtd::forms::about_dialog::documenters ( )
noexcept

Gets the artists array.

Returns
The artists array.

◆ documenters() [3/3]

about_dialog& xtd::forms::about_dialog::documenters ( const documenter_collection documenters)

Sets the documenters array.

Parameters
documentersThe documenters array.
Returns
Current about_dialog instance.

◆ from_executing_assembly_informations()

static about_dialog xtd::forms::about_dialog::from_executing_assembly_informations ( )
static

Create a new xtd::forms::about_dialog from executing xtd::reflecction::assembly informations.

Returns
New xtd::forms::about_dialog with executing xtd::reflecction::assembly informations.
Examples:
about_dialog_from_executing_assembly_informations.cpp.

◆ icon() [1/4]

xtd::drawing::icon xtd::forms::about_dialog::icon ( ) const
noexcept

Gets the product icon.

Returns
The product icon.
Examples:
about_dialog.cpp, about_dialog_system.cpp, and minesweeper.cpp.

◆ icon() [2/4]

about_dialog& xtd::forms::about_dialog::icon ( const xtd::drawing::icon icon)

Sets the product icon.

Parameters
iconThe product icon.
Returns
Current about_dialog instance.

◆ icon() [3/4]

about_dialog& xtd::forms::about_dialog::icon ( const xtd::drawing::image image)

Sets the product icon.

Parameters
imageThe product icon.
Returns
Current about_dialog instance.

◆ icon() [4/4]

about_dialog& xtd::forms::about_dialog::icon ( const xtd::drawing::bitmap bitmap)

Sets the product icon.

Parameters
bitmapThe product icon.
Returns
Current about_dialog instance.

◆ license() [1/2]

xtd::ustring xtd::forms::about_dialog::license ( ) const
noexcept

Gets the product license.

Returns
The product license.
Examples:
about_dialog_system.cpp.

◆ license() [2/2]

about_dialog& xtd::forms::about_dialog::license ( const xtd::ustring license)

Sets the product license.

Parameters
nameThe product license.
Returns
Current about_dialog instance.

◆ long_version() [1/2]

xtd::ustring xtd::forms::about_dialog::long_version ( ) const
noexcept

Gets the product long version.

Returns
The product long version.
Examples:
about_dialog_system.cpp.

◆ long_version() [2/2]

about_dialog& xtd::forms::about_dialog::long_version ( const xtd::ustring long_version)

Sets the product long version.

Parameters
versionThe version version.
Returns
Current about_dialog instance.

◆ name() [1/2]

xtd::ustring xtd::forms::about_dialog::name ( ) const
noexcept

Gets the product name.

Returns
The product name.
Examples:
about_dialog_system.cpp.

◆ name() [2/2]

about_dialog& xtd::forms::about_dialog::name ( const xtd::ustring name)

Sets the product name.

Parameters
nameThe product name.
Returns
Current about_dialog instance.

◆ reset()

void xtd::forms::about_dialog::reset ( )
noexcept

Resets all properties to empty string.

◆ show() [1/2]

void xtd::forms::about_dialog::show ( )

Runs about dialog box.

Examples:
about_dialog_system.cpp.

◆ show() [2/2]

void xtd::forms::about_dialog::show ( const iwin32_window owner)

Runs about dialog box.

◆ translators() [1/3]

const translator_collection& xtd::forms::about_dialog::translators ( ) const
noexcept

Gets the translators array.

Returns
The translators array.
Examples:
about_dialog_system.cpp.

◆ translators() [2/3]

translator_collection& xtd::forms::about_dialog::translators ( )
noexcept

Gets the translators array.

Returns
The translators array.

◆ translators() [3/3]

about_dialog& xtd::forms::about_dialog::translators ( const translator_collection translators)

Sets the translators array.

Parameters
translatorsThe translators array.
Returns
Current about_dialog instance.

◆ version() [1/2]

xtd::ustring xtd::forms::about_dialog::version ( ) const
noexcept

Gets the product version.

Returns
The product version.
Examples:
about_dialog_system.cpp.

◆ version() [2/2]

about_dialog& xtd::forms::about_dialog::version ( const xtd::ustring version)

Sets the product version.

Parameters
versionThe version version.
Returns
Current about_dialog instance.

◆ website() [1/2]

xtd::ustring xtd::forms::about_dialog::website ( ) const
noexcept

Gets the product website.

Returns
The website.
Examples:
about_dialog_system.cpp.

◆ website() [2/2]

about_dialog& xtd::forms::about_dialog::website ( const xtd::ustring website)

Sets the product website.

Parameters
websiteThe product website.
Returns
Current about_dialog instance.

◆ website_label() [1/2]

xtd::ustring xtd::forms::about_dialog::website_label ( ) const
noexcept

Gets the product website label.

Returns
The product website label.
Examples:
about_dialog_system.cpp.

◆ website_label() [2/2]

about_dialog& xtd::forms::about_dialog::website_label ( const xtd::ustring website_label)

Sets the product website label.

Parameters
website_labelThe product website label.
Returns
Current about_dialog instance.

The documentation for this class was generated from the following file: