xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::about_dialog Class Referencefinal
Inheritance diagram for xtd::forms::about_dialog:
xtd::forms::component xtd::object

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  
 
 
 
 
 
Dark  
 
 
 
 
 
Examples
The following code example demonstrates the use of about_dialog dialog.
#include "../resources/gammasoft_64x64.xpm"
#include <xtd/forms/about_dialog>
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/xtd_about_dialog>
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("About dialog example");
controls().push_back_range({about_button, xtd_about_button});
about_button.location({10, 10});
about_button.text("About...");
about_button.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) 2024 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) 2024 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();
};
xtd_about_button.location({100, 10});
xtd_about_button.auto_size(true);
xtd_about_button.text("xtd about...");
xtd_about_button.click += [&] {
static auto dialog = xtd_about_dialog {};
dialog.show();
};
}
private:
button about_button;
button xtd_about_button;
};
auto main()->int {
application::run(form1 {});
}
Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes....
Definition bitmap.h:26
Represents a dialog box that displays about dialog.
Definition about_dialog.h:38
xtd::drawing::icon icon() const noexcept
Gets the product icon.
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a Windows button control.
Definition button.h:47
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:52
Represents a dialog box that displays about dialog.
Definition xtd_about_dialog.h:28
void show()
Runs xtd about dialog box.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
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.dialog_appearance(dialog_appearance::system);
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) 2024 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) 2024 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 {});
}
const translator_collection & translators() const noexcept
Gets the translators array.
const documenter_collection & documenters() const noexcept
Gets the documentation writers array.
xtd::ustring copyright() const noexcept
Gets the product copyright.
xtd::ustring website_label() const noexcept
Gets the product website label.
xtd::ustring name() const noexcept
Gets the product name.
xtd::ustring website() const noexcept
Gets the product website.
const artist_collection & artists() const noexcept
Gets the artists array.
void show()
Runs about dialog box.
xtd::ustring license() const noexcept
Gets the product license.
xtd::ustring description() const noexcept
Gets the product description.
xtd::ustring version() const noexcept
Gets the product version.
const author_collection & authors() const noexcept
Gets the authors array.
xtd::forms::dialog_appearance dialog_appearance() const noexcept
Gets the dialog appearance.
xtd::ustring long_version() const noexcept
Gets the product long version.
@ button1
The first button on the message box is the default button.
Examples
about_dialog.cpp, about_dialog_system.cpp, about_dialog_with_user_pages.cpp, and minesweeper.cpp.

Public Aliases

using author_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents an author collection.
 
using artist_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents an artist collection.
 
using documenter_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents a documenter collection.
 
using translator_collection = xtd::forms::layout::arranged_element_collection< xtd::ustring >
 Represents a translator collection.
 
using user_tab_page_collection = tab_control::tab_page_collection
 Represents user tab page collection.
 

Public Constructors

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

Public Properties

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

Public Methods

void reset () noexcept
 Resets all properties to empty string.
 
void show ()
 Runs about dialog box.
 
void show (const iwin32_window &owner)
 Runs about dialog box with specified owner.
 

Public Static Methods

static about_dialog from_assembly (const xtd::reflection::assembly &assembly)
 Create a new xtd::forms::about_dialog from specified assembly.
 
static about_dialog from_executing_assembly_informations ()
 Create a new xtd::forms::about_dialog from executing xtd::reflection::assembly informations.
 

Additional Inherited Members

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

Member Typedef Documentation

◆ artist_collection

◆ author_collection

◆ documenter_collection

◆ translator_collection

◆ user_tab_page_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 documentation writers array.

Returns
The documentation writers array.

◆ documenters() [3/3]

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

Sets the documentation writers array.

Parameters
documentersThe documentation writers array.
Returns
Current about_dialog instance.

◆ from_assembly()

static about_dialog xtd::forms::about_dialog::from_assembly ( const xtd::reflection::assembly assembly)
static

Create a new xtd::forms::about_dialog from specified assembly.

Parameters
assemblyThe xtd::reflection::assembly object containing the information for filling in the dialog.
Returns
New xtd::forms::about_dialog with xtd::reflection::assembly informations.

◆ 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::reflection::assembly informations.

Returns
New xtd::forms::about_dialog with executing xtd::reflection::assembly informations.

◆ 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::bitmap bitmap)

Sets the product icon.

Parameters
bitmapThe product icon.
Returns
Current about_dialog instance.

◆ icon() [3/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() [4/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.

◆ 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 with specified owner.

Parameters
ownerThe owner of the about box dialog.

◆ 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.

◆ user_tab_pages() [1/2]

const user_tab_page_collection & xtd::forms::about_dialog::user_tab_pages ( ) const
noexcept

Gets the collection of user tab pages in this about box.

Returns
A xtd::forms::about_dialog::user_tab_page_collection that contains the control objects in this about box.
Remarks
This property is used to add user tab pages in this about dialog.

◆ user_tab_pages() [2/2]

user_tab_page_collection & xtd::forms::about_dialog::user_tab_pages ( )
noexcept

Gets the collection of user tab pages in this about box.

Returns
A xtd::forms::about_dialog::user_tab_page_collection that contains the control objects in this about box.
Remarks
This property is used to add user tab pages in this about dialog.

◆ 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: