Class: Wx::AboutDialogInfo
- Inherits:
-
Object
- Object
- Wx::AboutDialogInfo
- Defined in:
- lib/wx/doc/gen/about_dialog_info.rb
Overview
This class is untracked and should not be derived from nor instances extended!
AboutDialogInfo contains information shown in the standard About dialog displayed by the about_box function.
This class contains the general information about the program, such as its name, version, copyright and so on, as well as lists of the program developers, documentation writers, artists and translators. The simple properties from the former group are represented as a string with the exception of the program icon and the program web site, while the lists from the latter group are stored as ArrayString and can be either set entirely at once using #set_developers and similar functions or built one by one using #add_developer etc. Please also notice that while all the main platforms have the native implementation of the about dialog, they are often more limited than the generic version provided by wxWidgets and so the generic version is used if AboutDialogInfo has any fields not supported by the native version. Currently GTK+ version supports all the possible fields natively but MSW and Mac versions don’t support URLs, licence text nor custom icons in the about dialog and if either of those is used, about_box will automatically use the generic version so you should avoid specifying these fields to achieve more native look and feel.
Example of usage:
def on_about(event)
info = Wx::AboutDialogInfo.new
info.name = 'MyApp'
info.version = MY_APP_VERSION_STRING
info.description = 'My wxWidgets-based application!'
info.copyright = '(C) 1992-2023'
info.add_developer('My Self')
Wx.about_box(info)
end
Category: Common Dialogs, Data Structures
Instance Method Summary collapse
-
#add_artist(artist) ⇒ void
Adds an artist name to be shown in the program credits.
-
#add_developer(developer) ⇒ void
Adds a developer name to be shown in the program credits.
-
#add_doc_writer(docwriter) ⇒ void
Adds a documentation writer name to be shown in the program credits.
-
#add_translator(translator) ⇒ void
Adds a translator name to be shown in the program credits.
-
#get_artists ⇒ Wx::ArrayString
(also: #artists)
Returns an array of the artist strings set in the dialog info.
-
#get_copyright ⇒ Wx::String
(also: #copyright)
Get the copyright string.
-
#get_description ⇒ Wx::String
(also: #description)
Get the description string.
-
#get_developers ⇒ Wx::ArrayString
(also: #developers)
Returns an array of the developer strings set in the dialog info.
-
#get_doc_writers ⇒ Wx::ArrayString
(also: #doc_writers)
Returns an array of the writer strings set in the dialog info.
-
#get_icon ⇒ Wx::Icon
(also: #icon)
Returns the icon set by #set_icon.
-
#get_licence ⇒ Wx::String
(also: #licence)
Returns the licence string.
-
#get_long_version ⇒ Wx::String
(also: #long_version)
Return the long version string if set.
-
#get_name ⇒ String
(also: #name)
Get the name of the program.
-
#get_translators ⇒ Wx::ArrayString
(also: #translators)
Returns an array of the translator strings set in the dialog info.
-
#get_version ⇒ Wx::String
(also: #version)
Return the short version string.
-
#get_web_site_description ⇒ Wx::String
(also: #web_site_description)
Returns the description of the website URL set for the dialog.
-
#get_web_site_url ⇒ Wx::String
(also: #web_site_url)
Returns the website URL set for the dialog.
-
#has_artists ⇒ Boolean
(also: #has_artists?)
Returns true if artists have been set in the dialog info.
-
#has_copyright ⇒ Boolean
(also: #has_copyright?)
Returns true if a copyright string has been specified.
-
#has_description ⇒ Boolean
(also: #has_description?)
Returns true if a description string has been specified.
-
#has_developers ⇒ Boolean
(also: #has_developers?)
Returns true if developers have been set in the dialog info.
-
#has_doc_writers ⇒ Boolean
(also: #has_doc_writers?)
Returns true if writers have been set in the dialog info.
-
#has_icon ⇒ Boolean
(also: #has_icon?)
Returns true if an icon has been set for the about dialog.
-
#has_licence ⇒ Boolean
(also: #has_licence?)
Returns true if the licence string has been set.
-
#has_translators ⇒ Boolean
(also: #has_translators?)
Returns true if translators have been set in the dialog info.
-
#has_web_site ⇒ Boolean
(also: #has_web_site?)
Returns true if the website info has been set.
-
#initialize ⇒ Wx::AboutDialogInfo
constructor
Default constructor leaves all fields are initially uninitialized, in general you should call at least #set_version, #set_copyright and #set_description.
-
#set_artists(artists) ⇒ void
(also: #artists=)
Sets the list of artists to be shown in the program credits.
-
#set_copyright(copyright) ⇒ void
(also: #copyright=)
Set the short string containing the program copyright information.
-
#set_description(desc) ⇒ void
(also: #description=)
Set brief, but possibly multiline, description of the program.
-
#set_developers(developers) ⇒ void
(also: #developers=)
Set the list of developers of the program.
-
#set_doc_writers(docwriters) ⇒ void
(also: #doc_writers=)
Set the list of documentation writers.
-
#set_icon(icon) ⇒ void
(also: #icon=)
Set the icon to be shown in the dialog.
-
#set_licence(licence) ⇒ void
(also: #licence=)
Set the long, multiline string containing the text of the program licence.
-
#set_license(licence) ⇒ void
(also: #license=)
This is the same as #set_licence.
-
#set_name(name) ⇒ void
(also: #name=)
Set the name of the program.
-
#set_translators(translators) ⇒ void
(also: #translators=)
Set the list of translators.
-
#set_version(version, longVersion = ('')) ⇒ void
(also: #version=)
Set the version of the program.
-
#set_web_site(url, desc = ('')) ⇒ void
(also: #web_site=)
Set the web site for the program and its description (which defaults to url itself if empty).
Constructor Details
#initialize ⇒ Wx::AboutDialogInfo
Default constructor leaves all fields are initially uninitialized, in general you should call at least #set_version, #set_copyright and #set_description.
72 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 72 def initialize; end |
Instance Method Details
#add_artist(artist) ⇒ void
This method returns an undefined value.
Adds an artist name to be shown in the program credits.
80 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 80 def add_artist(artist) end |
#add_developer(developer) ⇒ void
This method returns an undefined value.
Adds a developer name to be shown in the program credits.
88 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 88 def add_developer(developer) end |
#add_doc_writer(docwriter) ⇒ void
This method returns an undefined value.
Adds a documentation writer name to be shown in the program credits.
96 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 96 def add_doc_writer(docwriter) end |
#add_translator(translator) ⇒ void
This method returns an undefined value.
Adds a translator name to be shown in the program credits.
Notice that if no translator names are specified explicitly, Wx.about_box will try to use the translation of the string translator-credits
from the currently used message catalog this can be used to show just the name of the translator of the program in the current language.
104 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 104 def add_translator(translator) end |
#get_artists ⇒ Wx::ArrayString Also known as: artists
Returns an array of the artist strings set in the dialog info.
323 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 323 def get_artists; end |
#get_copyright ⇒ Wx::String Also known as: copyright
Get the copyright string.
The copyright string
141 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 141 def get_copyright; end |
#get_description ⇒ Wx::String Also known as: description
Get the description string.
The description string, free-form.
126 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 126 def get_description; end |
#get_developers ⇒ Wx::ArrayString Also known as: developers
Returns an array of the developer strings set in the dialog info.
303 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 303 def get_developers; end |
#get_doc_writers ⇒ Wx::ArrayString Also known as: doc_writers
Returns an array of the writer strings set in the dialog info.
313 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 313 def get_doc_writers; end |
#get_icon ⇒ Wx::Icon Also known as: icon
Returns the icon set by #set_icon.
192 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 192 def get_icon; end |
#get_licence ⇒ Wx::String Also known as: licence
Returns the licence string.
213 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 213 def get_licence; end |
#get_long_version ⇒ Wx::String Also known as: long_version
Return the long version string if set.
269 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 269 def get_long_version; end |
#get_name ⇒ String Also known as: name
Get the name of the program.
Name of the program
111 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 111 def get_name; end |
#get_translators ⇒ Wx::ArrayString Also known as: translators
Returns an array of the translator strings set in the dialog info.
333 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 333 def get_translators; end |
#get_version ⇒ Wx::String Also known as: version
Return the short version string.
261 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 261 def get_version; end |
#get_web_site_description ⇒ Wx::String Also known as: web_site_description
Returns the description of the website URL set for the dialog.
284 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 284 def get_web_site_description; end |
#get_web_site_url ⇒ Wx::String Also known as: web_site_url
Returns the website URL set for the dialog.
279 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 279 def get_web_site_url; end |
#has_artists ⇒ Boolean Also known as: has_artists?
Returns true if artists have been set in the dialog info.
318 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 318 def has_artists; end |
#has_copyright ⇒ Boolean Also known as: has_copyright?
Returns true if a copyright string has been specified.
134 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 134 def has_copyright; end |
#has_description ⇒ Boolean Also known as: has_description?
Returns true if a description string has been specified.
119 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 119 def has_description; end |
#has_developers ⇒ Boolean Also known as: has_developers?
Returns true if developers have been set in the dialog info.
298 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 298 def has_developers; end |
#has_doc_writers ⇒ Boolean Also known as: has_doc_writers?
Returns true if writers have been set in the dialog info.
308 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 308 def has_doc_writers; end |
#has_icon ⇒ Boolean Also known as: has_icon?
Returns true if an icon has been set for the about dialog.
187 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 187 def has_icon; end |
#has_licence ⇒ Boolean Also known as: has_licence?
Returns true if the licence string has been set.
205 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 205 def has_licence; end |
#has_translators ⇒ Boolean Also known as: has_translators?
Returns true if translators have been set in the dialog info.
328 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 328 def has_translators; end |
#has_web_site ⇒ Boolean Also known as: has_web_site?
Returns true if the website info has been set.
274 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 274 def has_web_site; end |
#set_artists(artists) ⇒ void Also known as: artists=
This method returns an undefined value.
Sets the list of artists to be shown in the program credits.
150 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 150 def set_artists(artists) end |
#set_copyright(copyright) ⇒ void Also known as: copyright=
This method returns an undefined value.
Set the short string containing the program copyright information.
Notice that any occurrences of "(C)"
in copyright will be replaced by the copyright symbol (circled C) automatically, which means that you can avoid using this symbol in the program source code which can be problematic,
158 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 158 def set_copyright(copyright) end |
#set_description(desc) ⇒ void Also known as: description=
This method returns an undefined value.
Set brief, but possibly multiline, description of the program.
164 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 164 def set_description(desc) end |
#set_developers(developers) ⇒ void Also known as: developers=
This method returns an undefined value.
Set the list of developers of the program.
173 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 173 def set_developers(developers) end |
#set_doc_writers(docwriters) ⇒ void Also known as: doc_writers=
This method returns an undefined value.
Set the list of documentation writers.
182 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 182 def set_doc_writers(docwriters) end |
#set_icon(icon) ⇒ void Also known as: icon=
This method returns an undefined value.
Set the icon to be shown in the dialog.
By default the icon of the main frame will be shown if the native about dialog supports custom icons. If it doesn’t but a valid icon is specified using this method, the generic about dialog is used instead so you should avoid calling this function for maximally native look and feel.
200 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 200 def set_icon(icon) end |
#set_licence(licence) ⇒ void Also known as: licence=
This method returns an undefined value.
Set the long, multiline string containing the text of the program licence.
Only GTK+ version supports showing the licence text in the native about dialog currently so the generic version will be used under all the other platforms if this method is called. To preserve the native look and feel it is advised that you do not call this method but provide a separate menu item in the "Help"
menu for displaying the text of your program licence.
221 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 221 def set_licence(licence) end |
#set_license(licence) ⇒ void Also known as: license=
This method returns an undefined value.
This is the same as #set_licence.
227 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 227 def set_license(licence) end |
#set_name(name) ⇒ void Also known as: name=
This method returns an undefined value.
Set the name of the program.
If this method is not called, the string returned by Wx::App::GetAppName will be shown in the dialog.
235 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 235 def set_name(name) end |
#set_translators(translators) ⇒ void Also known as: translators=
This method returns an undefined value.
Set the list of translators.
Please see #add_translator for additional discussion.
243 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 243 def set_translators(translators) end |
#set_version(version, longVersion = ('')) ⇒ void Also known as: version=
This method returns an undefined value.
Set the version of the program.
The word “version” shouldn’t be included in version. Example version values: “1.2” and “RC2”. In about dialogs with more space set aside for version information, longVersion is used. Example longVersion values: “Version 1.2” and “Release Candidate 2”. If version is non-empty but longVersion is empty, a long version is constructed automatically, using version (by simply prepending “Version ” to version). The generic about dialog and native GTK+ dialog use version only, as a suffix to the program name. The native MSW and macOS about dialogs use the long version.
253 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 253 def set_version(version, longVersion=('')) end |
#set_web_site(url, desc = ('')) ⇒ void Also known as: web_site=
This method returns an undefined value.
Set the web site for the program and its description (which defaults to url itself if empty).
Please notice that only GTK+ version currently supports showing the link in the native about dialog so if this method is called, the generic version will be used under all the other platforms.
293 |
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 293 def set_web_site(url, desc=('')) end |