xtd.forms - Reference Guide  0.1.0
Modern c++17 library containing classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows, Apple macOS and Linux like Ubuntu operating system.
xtd::forms::about_dialog Class Reference

Represents a common dialog box that displays about box. More...

#include <about_dialog.h>

Inheritance diagram for xtd::forms::about_dialog:
xtd::forms::common_dialog xtd::forms::component

Public Member Functions

 about_dialog ()=default
 Initializes a new instance of the about_dialog class. More...
 
std::string copyright () const
 Gets the product copyright. More...
 
about_dialogcopyright (const std::string &copyright)
 Sets the product description. More...
 
std::string description () const
 Gets the product description. More...
 
about_dialogdescription (const std::string &description)
 Sets the product description. More...
 
std::string long_version () const
 Gets the product long version. More...
 
about_dialoglong_version (const std::string &long_version)
 Sets the product long version. More...
 
std::string name () const
 Gets the product name. More...
 
about_dialogname (const std::string &name)
 Sets the product name. More...
 
void reset () override
 Resets all properties to empty string. More...
 
void show ()
 Runs about dialog box. More...
 
std::string version () const
 Gets the product version. More...
 
about_dialogversion (const std::string &version)
 Sets the product version. More...
 
- Public Member Functions inherited from xtd::forms::common_dialog
 common_dialog ()=default
 Initializes a new instance of the common_dialog class. More...
 
xtd::forms::dialog_result show_dialog ()
 Runs a common dialog box with a default owner. More...
 
xtd::forms::dialog_result show_dialog (const iwin32_window &owner)
 Runs a common dialog box with the specified owner. More...
 
std::any tag () const
 Gets an object that contains data about the control. More...
 
common_dialogtag (const std::any &tag)
 Sets an object that contains data about the control. More...
 

Protected Member Functions

bool run_dialog (intptr_t owner) override
 When overridden in a derived class, specifies a common dialog box. More...
 
dialog_result show_dialog ()
 
dialog_result show_dialog (const iwin32_window &owner)
 
- Protected Member Functions inherited from xtd::forms::common_dialog
virtual void on_help_request (help_event_args &e)
 Raises the help_request event. More...
 
- Protected Member Functions inherited from xtd::forms::component
virtual bool can_raise_events () const
 Gets a value indicating whether the component can raise an event. More...
 
bool design_mode () const
 Gets a value that indicates whether the component is currently in design mode. More...
 

Protected Attributes

std::string copyright_
 
std::string description_
 
std::string long_version_
 
std::string name_
 
std::string version_
 

Additional Inherited Members

- Public Attributes inherited from xtd::forms::common_dialog
event< common_dialog, help_event_handler< component & > > help_request
 Occurs when the user clicks the Help button on a common dialog box. More...
 

Detailed Description

Represents a common dialog box that displays about box.

Example
The following code example demonstrate the use of about_dialog dialog.
#include <xtd/xtd.forms>
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.name("About dialog");
about_dialog.version("1.0");
about_dialog.long_version("1.0.0");
about_dialog.description("About dialog description.");
about_dialog.copyright(u8"Copyright \u00A9 2019 Gammasoft.\nAll rights reserved.");
about_dialog.show();
};
}
private:
};
int main() {
application::run(form1());
}

Constructor & Destructor Documentation

§ about_dialog()

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

Initializes a new instance of the about_dialog class.

Member Function Documentation

§ copyright() [1/2]

std::string xtd::forms::about_dialog::copyright ( ) const
inline

Gets the product copyright.

Returns
The product copyright.

§ copyright() [2/2]

about_dialog& xtd::forms::about_dialog::copyright ( const std::string &  copyright)
inline

Sets the product description.

Parameters
copyrightThe description copyright.
Returns
Current about_box instance.

§ description() [1/2]

std::string xtd::forms::about_dialog::description ( ) const
inline

Gets the product description.

Returns
The product description.

§ description() [2/2]

about_dialog& xtd::forms::about_dialog::description ( const std::string &  description)
inline

Sets the product description.

Parameters
descriptionThe description description.
Returns
Current about_box instance.

§ long_version() [1/2]

std::string xtd::forms::about_dialog::long_version ( ) const
inline

Gets the product long version.

Returns
The product long version.

§ long_version() [2/2]

about_dialog& xtd::forms::about_dialog::long_version ( const std::string &  long_version)
inline

Sets the product long version.

Parameters
versionThe version version.
Returns
Current about_box instance.

§ name() [1/2]

std::string xtd::forms::about_dialog::name ( ) const
inline

Gets the product name.

Returns
The product name.

§ name() [2/2]

about_dialog& xtd::forms::about_dialog::name ( const std::string &  name)
inline

Sets the product name.

Parameters
nameThe product name.
Returns
Current about_box instance.

§ reset()

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

Resets all properties to empty string.

Implements xtd::forms::common_dialog.

§ run_dialog()

bool xtd::forms::about_dialog::run_dialog ( intptr_t  owner)
overrideprotectedvirtual

When overridden in a derived class, specifies a common dialog box.

Parameters
ownerA value that represents the window handle of the owner window for the common dialog box.
Returns
true if the dialog box was successfully run; otherwise, false.

Implements xtd::forms::common_dialog.

§ show()

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

Runs about dialog box.

§ version() [1/2]

std::string xtd::forms::about_dialog::version ( ) const
inline

Gets the product version.

Returns
The product version.

§ version() [2/2]

about_dialog& xtd::forms::about_dialog::version ( const std::string &  version)
inline

Sets the product version.

Parameters
versionThe version version.
Returns
Current about_box instance.

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