xtd 1.0.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/xtd>
class form1 : public form {
public:
form1() {
text("About dialog example");
controls().add_range({about_button, xtd_about_button});
about_button.location({10, 10});
about_button.text("About...");
about_button.click += delegate_ {
static auto dialog = about_dialog {};
dialog.icon(xtd::drawing::image::from_xpm_data(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.github.io");
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 += delegate_ {
static auto dialog = xtd_about_dialog {};
dialog.show();
};
}
private:
button about_button;
button xtd_about_button;
};
auto main() -> int {
application::run(form1 {});
}
static auto from_xpm_data(const char *const *bits) -> bitmap
Creates an xtd::drawing::image from the specified data pointer.
virtual auto text() const noexcept -> const xtd::string &
Gets the text associated with this control.
virtual auto controls() noexcept -> control_collection &
Gets the collection of controls contained within the control.
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
#define delegate_
The declaration of a delegate type is similar to a method signature. It has a return value and any nu...
Definition delegate.hpp:1018
xtd::forms::style_sheets::control button
The buttton data allows you to specify the box of a button control.
Definition button.hpp:25
Examples
The following code example demonstrates the use of about_dialog dialog with dialog_styledialog_style to system.
#include "../resources/gammasoft_64x64.xpm"
#include <xtd/xtd>
class form1 : public form {
public:
form1() {
text("About dialog system example");
controls().add(button1);
button1.location({10, 10});
button1.text("About...");
button1.click += delegate_ {
static about_dialog dialog;
dialog.dialog_appearance(dialog_appearance::system);
dialog.icon(xtd::drawing::image::from_xpm_data(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.github.io");
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 {});
}
Represents a dialog box that displays about dialog.
Definition about_dialog.hpp:41
auto documenters() const noexcept -> const documenter_collection &
Gets the documentation writers array.
auto icon() const noexcept -> xtd::drawing::icon
Gets the product icon.
auto long_version() const noexcept -> xtd::string
Gets the product long version.
auto show() -> void
Runs about dialog box.
auto authors() const noexcept -> const author_collection &
Gets the authors array.
auto description() const noexcept -> xtd::string
Gets the product description.
auto name() const noexcept -> xtd::string
Gets the product name.
auto copyright() const noexcept -> xtd::string
Gets the product copyright.
auto version() const noexcept -> xtd::string
Gets the product version.
auto license() const noexcept -> xtd::string
Gets the product license.
auto translators() const noexcept -> const translator_collection &
Gets the translators array.
auto website() const noexcept -> xtd::string
Gets the product website.
auto artists() const noexcept -> const artist_collection &
Gets the artists array.
auto website_label() const noexcept -> xtd::string
Gets the product website label.
auto dialog_appearance() const noexcept -> xtd::forms::dialog_appearance
Gets the dialog appearance.
@ button1
The first button on the message box is the default button.
Definition message_dialog_default_button.hpp:24

Public Aliases

using author_collection
 Represents an author collection.
using artist_collection
 Represents an artist collection.
using documenter_collection
 Represents a documenter collection.
using translator_collection
 Represents a translator collection.
using user_tab_page_collection
 Represents user tab page collection.

Public Constructors

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

Public Properties

auto artists () const noexcept -> const artist_collection &
 Gets the artists array.
auto artists () noexcept -> artist_collection &
 Gets the artists array.
auto artists (const artist_collection &value) -> about_dialog &
 Sets the artists array.
auto authors () const noexcept -> const author_collection &
 Gets the authors array.
auto authors () noexcept -> author_collection &
 Gets the authors array.
auto authors (const author_collection &value) -> about_dialog &
 Sets the authors array.
auto copyright () const noexcept -> xtd::string
 Gets the product copyright.
auto copyright (const xtd::string &value) -> about_dialog &
 Sets the product description.
auto description () const noexcept -> xtd::string
 Gets the product description.
auto description (const xtd::string &value) -> about_dialog &
 Sets the product description.
auto documenters () const noexcept -> const documenter_collection &
 Gets the documentation writers array.
auto documenters () noexcept -> documenter_collection &
 Gets the documentation writers array.
auto documenters (const documenter_collection &value) -> about_dialog &
 Sets the documentation writers array.
auto dialog_appearance () const noexcept -> xtd::forms::dialog_appearance
 Gets the dialog appearance.
auto dialog_appearance (xtd::forms::dialog_appearance value) -> about_dialog &
 Sets the dialog appearance.
auto icon () const noexcept -> xtd::drawing::icon
 Gets the product icon.
auto icon (const xtd::drawing::icon &value) -> about_dialog &
 Sets the product icon.
auto icon (const xtd::drawing::image &value) -> about_dialog &
 Sets the product icon.
auto icon (const xtd::drawing::bitmap &value) -> about_dialog &
 Sets the product icon.
auto license () const noexcept -> xtd::string
 Gets the product license.
auto license (const xtd::string &value) -> about_dialog &
 Sets the product license.
auto long_version () const noexcept -> xtd::string
 Gets the product long version.
auto long_version (const xtd::string &value) -> about_dialog &
 Sets the product long version.
auto name () const noexcept -> xtd::string
 Gets the product name.
auto name (const xtd::string &value) -> about_dialog &
 Sets the product name.
auto translators () const noexcept -> const translator_collection &
 Gets the translators array.
auto translators () noexcept -> translator_collection &
 Gets the translators array.
auto translators (const translator_collection &value) -> about_dialog &
 Sets the translators array.
auto user_tab_pages () noexcept -> user_tab_page_collection &
 Gets the collection of user tab pages in this about box.
auto user_tab_pages () const noexcept -> const user_tab_page_collection &
 Gets the collection of user tab pages in this about box.
auto version () const noexcept -> xtd::string
 Gets the product version.
auto version (const xtd::string &value) -> about_dialog &
 Sets the product version.
auto website () const noexcept -> xtd::string
 Gets the product website.
auto website (const xtd::string &value) -> about_dialog &
 Sets the product website.
auto website_label () const noexcept -> xtd::string
 Gets the product website label.
auto website_label (const xtd::string &value) -> about_dialog &
 Sets the product website label.

Public Methods

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

Public Static Methods

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

Additional Inherited Members

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

Member Typedef Documentation

◆ author_collection

Represents an author collection.

◆ artist_collection

Represents an artist collection.

◆ documenter_collection

Represents a documenter collection.

◆ translator_collection

Represents a translator collection.

◆ user_tab_page_collection

Represents 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]

auto xtd::forms::about_dialog::artists ( ) const -> const artist_collection &
nodiscardnoexcept

Gets the artists array.

Returns
The artists array.

◆ artists() [2/3]

auto xtd::forms::about_dialog::artists ( ) -> artist_collection &
nodiscardnoexcept

Gets the artists array.

Returns
The artists array.

◆ artists() [3/3]

auto xtd::forms::about_dialog::artists ( const artist_collection & value) -> about_dialog &

Sets the artists array.

Parameters
valueThe artists array.
Returns
Current about_dialog instance.

◆ authors() [1/3]

auto xtd::forms::about_dialog::authors ( ) const -> const author_collection &
nodiscardnoexcept

Gets the authors array.

Returns
The author array.

◆ authors() [2/3]

auto xtd::forms::about_dialog::authors ( ) -> author_collection &
nodiscardnoexcept

Gets the authors array.

Returns
The authors array.

◆ authors() [3/3]

auto xtd::forms::about_dialog::authors ( const author_collection & value) -> about_dialog &

Sets the authors array.

Parameters
valueThe authors array.
Returns
Current about_dialog instance.

◆ copyright() [1/2]

auto xtd::forms::about_dialog::copyright ( ) const -> xtd::string
nodiscardnoexcept

Gets the product copyright.

Returns
The product copyright.

◆ copyright() [2/2]

auto xtd::forms::about_dialog::copyright ( const xtd::string & value) -> about_dialog &

Sets the product description.

Parameters
valueThe description copyright.
Returns
Current about_dialog instance.

◆ description() [1/2]

auto xtd::forms::about_dialog::description ( ) const -> xtd::string
nodiscardnoexcept

Gets the product description.

Returns
The product description.

◆ description() [2/2]

auto xtd::forms::about_dialog::description ( const xtd::string & value) -> about_dialog &

Sets the product description.

Parameters
valueThe product description.
Returns
Current about_dialog instance.

◆ documenters() [1/3]

auto xtd::forms::about_dialog::documenters ( ) const -> const documenter_collection &
nodiscardnoexcept

Gets the documentation writers array.

Returns
The documentation writers array.

◆ documenters() [2/3]

auto xtd::forms::about_dialog::documenters ( ) -> documenter_collection &
nodiscardnoexcept

Gets the documentation writers array.

Returns
The documentation writers array.

◆ documenters() [3/3]

auto xtd::forms::about_dialog::documenters ( const documenter_collection & value) -> about_dialog &

Sets the documentation writers array.

Parameters
valueThe documentation writers array.
Returns
Current about_dialog instance.

◆ dialog_appearance() [1/2]

auto xtd::forms::about_dialog::dialog_appearance ( ) const -> xtd::forms::dialog_appearance
nodiscardnoexcept

Gets the dialog appearance.

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

◆ dialog_appearance() [2/2]

auto xtd::forms::about_dialog::dialog_appearance ( xtd::forms::dialog_appearance value) -> about_dialog &

Sets the dialog appearance.

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

◆ icon() [1/4]

auto xtd::forms::about_dialog::icon ( ) const -> xtd::drawing::icon
nodiscardnoexcept

Gets the product icon.

Returns
The product icon.

◆ icon() [2/4]

auto xtd::forms::about_dialog::icon ( const xtd::drawing::icon & value) -> about_dialog &

Sets the product icon.

Parameters
valueThe product icon.
Returns
Current about_dialog instance.

◆ icon() [3/4]

auto xtd::forms::about_dialog::icon ( const xtd::drawing::image & value) -> about_dialog &

Sets the product icon.

Parameters
valueThe product icon.
Returns
Current about_dialog instance.

◆ icon() [4/4]

auto xtd::forms::about_dialog::icon ( const xtd::drawing::bitmap & value) -> about_dialog &

Sets the product icon.

Parameters
valueThe product icon.
Returns
Current about_dialog instance.

◆ license() [1/2]

auto xtd::forms::about_dialog::license ( ) const -> xtd::string
nodiscardnoexcept

Gets the product license.

Returns
The product license.

◆ license() [2/2]

auto xtd::forms::about_dialog::license ( const xtd::string & value) -> about_dialog &

Sets the product license.

Parameters
valueThe product license.
Returns
Current about_dialog instance.

◆ long_version() [1/2]

auto xtd::forms::about_dialog::long_version ( ) const -> xtd::string
nodiscardnoexcept

Gets the product long version.

Returns
The product long version.

◆ long_version() [2/2]

auto xtd::forms::about_dialog::long_version ( const xtd::string & value) -> about_dialog &

Sets the product long version.

Parameters
valueThe version version.
Returns
Current about_dialog instance.

◆ name() [1/2]

auto xtd::forms::about_dialog::name ( ) const -> xtd::string
nodiscardnoexcept

Gets the product name.

Returns
The product name.

◆ name() [2/2]

auto xtd::forms::about_dialog::name ( const xtd::string & value) -> about_dialog &

Sets the product name.

Parameters
valueThe product name.
Returns
Current about_dialog instance.

◆ translators() [1/3]

auto xtd::forms::about_dialog::translators ( ) const -> const translator_collection &
nodiscardnoexcept

Gets the translators array.

Returns
The translators array.

◆ translators() [2/3]

auto xtd::forms::about_dialog::translators ( ) -> translator_collection &
nodiscardnoexcept

Gets the translators array.

Returns
The translators array.

◆ translators() [3/3]

auto xtd::forms::about_dialog::translators ( const translator_collection & value) -> about_dialog &

Sets the translators array.

Parameters
valueThe translators array.
Returns
Current about_dialog instance.

◆ user_tab_pages() [1/2]

auto xtd::forms::about_dialog::user_tab_pages ( ) -> user_tab_page_collection &
nodiscardnoexcept

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]

auto xtd::forms::about_dialog::user_tab_pages ( ) const -> const user_tab_page_collection &
nodiscardnoexcept

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]

auto xtd::forms::about_dialog::version ( ) const -> xtd::string
nodiscardnoexcept

Gets the product version.

Returns
The product version.

◆ version() [2/2]

auto xtd::forms::about_dialog::version ( const xtd::string & value) -> about_dialog &

Sets the product version.

Parameters
valueThe version version.
Returns
Current about_dialog instance.

◆ website() [1/2]

auto xtd::forms::about_dialog::website ( ) const -> xtd::string
nodiscardnoexcept

Gets the product website.

Returns
The website.

◆ website() [2/2]

auto xtd::forms::about_dialog::website ( const xtd::string & value) -> about_dialog &

Sets the product website.

Parameters
valueThe product website.
Returns
Current about_dialog instance.

◆ website_label() [1/2]

auto xtd::forms::about_dialog::website_label ( ) const -> xtd::string
nodiscardnoexcept

Gets the product website label.

Returns
The product website label.

◆ website_label() [2/2]

auto xtd::forms::about_dialog::website_label ( const xtd::string & value) -> about_dialog &

Sets the product website label.

Parameters
valueThe product website label.
Returns
Current about_dialog instance.

◆ reset()

auto xtd::forms::about_dialog::reset ( ) -> void
noexcept

Resets all properties to empty string.

◆ show() [1/2]

auto xtd::forms::about_dialog::show ( ) -> void

Runs about dialog box.

◆ show() [2/2]

auto xtd::forms::about_dialog::show ( const iwin32_window & owner) -> void

Runs about dialog box with specified owner.

Parameters
ownerThe owner of the about box dialog.

◆ from_assembly()

auto xtd::forms::about_dialog::from_assembly ( const xtd::reflection::assembly & assembly) -> about_dialog
staticnodiscard

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()

auto xtd::forms::about_dialog::from_executing_assembly_informations ( ) -> about_dialog
staticnodiscard

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