xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
about_dialog.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/delegate.h>
6 #include <xtd/ustring.h>
7 #include <xtd/drawing/icon.h>
8 #include "component.h"
9 #include "dialog_style.h"
10 #include "iwin32_window.h"
12 
14 namespace xtd {
16  namespace forms {
50  class forms_export_ about_dialog final : public component {
51  public:
60 
62  about_dialog() = default;
63 
66  const artist_collection& artists() const {return artists_;}
69  artist_collection& artists() {return artists_;}
74  artists_ = artists;
75  return *this;
76  }
77 
80  const author_collection& authors() const {return authors_;}
83  author_collection& authors() {return authors_;}
88  authors_ = authors;
89  return *this;
90  }
91 
94  xtd::ustring copyright() const {return copyright_;}
98  about_dialog& copyright(const xtd::ustring& copyright) {
99  copyright_ = copyright;
100  return *this;
101  }
102 
105  xtd::ustring description() const {return description_;}
109  about_dialog& description(const xtd::ustring& description) {
110  description_ = description;
111  return *this;
112  }
113 
116  const documenter_collection& documenters() const {return documenters_;}
119  documenter_collection& documenters() {return documenters_;}
124  documenters_ = documenters;
125  return *this;
126  }
127 
130  xtd::forms::dialog_style dialog_style() const {return dialog_style_;}
135  dialog_style_ = dialog_style;
136  return *this;
137  }
138 
141  xtd::drawing::icon icon() const {return xtd::drawing::icon::from_bitmap(xtd::drawing::bitmap(icon_));}
146  icon_ = icon.to_bitmap();
147  return *this;
148  }
153  icon_ = image;
154  return *this;
155  }
160  icon_ = bitmap;
161  return *this;
162  }
163 
166  xtd::ustring license() const {return license_;}
170  about_dialog& license(const xtd::ustring& license) {
171  license_ = license;
172  return *this;
173  }
174 
177  xtd::ustring long_version() const {return long_version_;}
181  about_dialog& long_version(const xtd::ustring& long_version) {
182  long_version_ = long_version;
183  return *this;
184  }
185 
188  xtd::ustring name() const {return name_;}
193  name_ = name;
194  return *this;
195  }
196 
199  const translator_collection& translators() const {return translators_;}
202  translator_collection& translators() {return translators_;}
207  translators_ = translators;
208  return *this;
209  }
210 
213  xtd::ustring version() const {return version_;}
218  version_ = version;
219  return *this;
220  }
221 
224  xtd::ustring website() const {return website_;}
228  about_dialog& website(const xtd::ustring& website) {
229  website_ = website;
230  return *this;
231  }
232 
235  xtd::ustring website_label() const {return website_label_;}
239  about_dialog& website_label(const xtd::ustring& website_label) {
240  website_label_ = website_label;
241  return *this;
242  }
243 
245  void reset();
246 
248  void show();
250  void show(const iwin32_window& owner);
251 
252  private:
254  xtd::drawing::image icon_;
255  xtd::ustring name_;
256  xtd::ustring version_;
257  xtd::ustring long_version_;
258  xtd::ustring description_;
259  xtd::ustring copyright_;
260  xtd::ustring website_;
261  xtd::ustring website_label_;
262  author_collection authors_;
263  documenter_collection documenters_;
264  translator_collection translators_;
265  artist_collection artists_;
266  xtd::ustring license_;
267  };
268  }
269 }
about_dialog & version(const xtd::ustring &version)
Sets the product version.
Definition: about_dialog.h:217
about_dialog & name(const xtd::ustring &name)
Sets the product name.
Definition: about_dialog.h:192
about_dialog & copyright(const xtd::ustring &copyright)
Sets the product description.
Definition: about_dialog.h:98
Contains xtd::drawing::icon class.
Contains xtd::delegate delegate.
about_dialog & website(const xtd::ustring &website)
Sets the product website.
Definition: about_dialog.h:228
xtd::ustring copyright() const
Gets the product copyright.
Definition: about_dialog.h:94
about_dialog & icon(const xtd::drawing::icon &icon)
Sets the product icon.
Definition: about_dialog.h:145
dialog_style
Specifies the style of a dialog.
Definition: dialog_style.h:17
xtd::drawing::icon icon() const
Gets the product icon.
Definition: about_dialog.h:141
documenter_collection & documenters()
Gets the artists array.
Definition: about_dialog.h:119
Contains xtd::forms::arranged_element_collection collection.
about_dialog & documenters(const documenter_collection &documenters)
Sets the documenters array.
Definition: about_dialog.h:123
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
artist_collection & artists()
Gets the artists array.
Definition: about_dialog.h:69
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition: version.h:93
xtd::ustring name() const
Gets the product name.
Definition: about_dialog.h:188
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
Contains xtd::forms::iwin32_window interface.
Represents a dialog box that displays about dialog.
Definition: about_dialog.h:50
const author_collection & authors() const
Gets the authors array.
Definition: about_dialog.h:80
Provides an interface to expose Win32 HWND handles.
Definition: iwin32_window.h:19
const documenter_collection & documenters() const
Gets the documentation writers array.
Definition: about_dialog.h:116
Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes...
Definition: bitmap.h:19
about_dialog & icon(const xtd::drawing::image &image)
Sets the product icon.
Definition: about_dialog.h:152
about_dialog & long_version(const xtd::ustring &long_version)
Sets the product long version.
Definition: about_dialog.h:181
author_collection & authors()
Gets the authors array.
Definition: about_dialog.h:83
translator_collection & translators()
Gets the translators array.
Definition: about_dialog.h:202
const artist_collection & artists() const
Gets the artists array.
Definition: about_dialog.h:66
about_dialog & authors(const author_collection &authors)
Sets the authors array.
Definition: about_dialog.h:87
const translator_collection & translators() const
Gets the translators array.
Definition: about_dialog.h:199
about_dialog & license(const xtd::ustring &license)
Sets the product license.
Definition: about_dialog.h:170
xtd::ustring description() const
Gets the product description.
Definition: about_dialog.h:105
xtd::ustring long_version() const
Gets the product long version.
Definition: about_dialog.h:177
Standard style dialog.
Contains xtd::ustring class.
xtd::forms::dialog_style dialog_style() const
Gets the dialog style.
Definition: about_dialog.h:130
An abstract base class that provides functionality for the bitmap and metafile descended classes...
Definition: image.h:34
xtd::ustring license() const
Gets the product license.
Definition: about_dialog.h:166
Contains xtd::forms::dialog_style enum class.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
about_dialog & icon(const xtd::drawing::bitmap &bitmap)
Sets the product icon.
Definition: about_dialog.h:159
Contains xtd::forms::component class.
about_dialog & artists(const artist_collection &artists)
Sets the artists array.
Definition: about_dialog.h:73
about_dialog & translators(const translator_collection &translators)
Sets the translators array.
Definition: about_dialog.h:206
xtd::ustring website_label() const
Gets the product website label.
Definition: about_dialog.h:235
about_dialog & dialog_style(xtd::forms::dialog_style dialog_style)
Sets the dialog style.
Definition: about_dialog.h:134
Represents a Windows icon, which is a small bitmap image that is used to represent an object...
Definition: icon.h:22
about_dialog & description(const xtd::ustring &description)
Sets the product description.
Definition: about_dialog.h:109
Provides the base implementation and enables object sharing between applications. ...
Definition: component.h:21
about_dialog & website_label(const xtd::ustring &website_label)
Sets the product website label.
Definition: about_dialog.h:239