wxRuby Documentation Home

# Wx::AboutDialogInfo

The Wx module function `Wx::about_box` displays a platform-native
“About” dialog with information about the application. AboutDialogInfo
is a simple class for passing information to it. You construct an
AboutDialogInfo object, set the relevant fields, and then pass it to
the function. The only required field is version. For convenience, you
may also just pass Wx::about_box keyword arguments, and skip creating an
AboutDialogInfo object altogether:

Wx::about_box( :name => ‘A Tasty Application’, :version => ‘3.0.2’, :developers => [‘Joe Bloggs’] )

The information for the dialog includes general application details like
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 as an array of strings 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 Widgets 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,
AboutBox will automatically use the generic version so
you should avoid specifying these fields to achieve more native look and
feel.

## Derived from

No base class

## Methods

- AboutDialogInfo.new
- AboutDialogInfo#add_artist
- AboutDialogInfo#add_developer
- AboutDialogInfo#add_doc_writer
- AboutDialogInfo#add_translator
- AboutDialogInfo#set_artists
- AboutDialogInfo#set_copyright
- AboutDialogInfo#set_description
- AboutDialogInfo#set_developers
- AboutDialogInfo#set_doc_writers
- AboutDialogInfo#set_icon
- AboutDialogInfo#set_licence
- AboutDialogInfo#set_license
- AboutDialogInfo#set_name
- AboutDialogInfo#set_translators
- AboutDialogInfo#set_version
- AboutDialogInfo#set_web_site

### AboutDialogInfo.new

### AboutDialogInfo#add_artist

add_artist(%(arg-type)String% artist)

Adds an artist name to be shown in the program credits.

#### See also

set_artists

### AboutDialogInfo#add_developer

add_developer(%(arg-type)String% developer)

Adds a developer name to be shown in the program credits.

#### See also

set_developers

### AboutDialogInfo#add_doc_writer

add_doc_writer(%(arg-type)String% docwriter)

Adds a documentation writer name to be shown in the program credits.

#### See also

set_doc_writers

### AboutDialogInfo#add_translator

add_translator(%(arg-type)String% translator)

Adds a translator name to be shown in the program credits. Notice that if no
translator names are specified explicitely, AboutBox
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.

#### See also

set_translators

### AboutDialogInfo#set_artists

set_artists(%(arg-type)ArrayString% artists)

Sets the the list of artists to be shown in the program credits.

#### See also

add_artist

### AboutDialogInfo#set_copyright

set_copyright(%(arg-type)String% copyright)

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,

### AboutDialogInfo#set_description

set_description(%(arg-type)String% desc)

Set brief, but possibly multiline, description of the program.

### AboutDialogInfo#set_developers

set_developers(%(arg-type)ArrayString% developers)

Set the list of developers of the program.

#### See also

add_developer

### AboutDialogInfo#set_doc_writers

set_doc_writers(%(arg-type)ArrayString% docwriters)

Set the list of documentation writers.

#### See also

add_doc_writer

### AboutDialogInfo#set_icon

set_icon(%(arg-type)Icon% icon)

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.

### AboutDialogInfo#set_licence

set_licence(%(arg-type)String% licence)

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.

### AboutDialogInfo#set_license

set_license(%(arg-type)String% licence)

This is the same as set_licence.

### AboutDialogInfo#set_name

set_name(%(arg-type)String% name)

Set the name of the program. If this method is not called, the string returned
by App::GetAppName will be shown in the dialog.

### AboutDialogInfo#set_translators

set_translators(%(arg-type)ArrayString% translators)

Set the list of translators. Please see
add_translator for additional
discussion.

### AboutDialogInfo#set_version

set_version(%(arg-type)String% version)

Set the version of the program. The version is in free format, i.e. not
necessarily in the `x.y.z` form but it shouldn’t contain the “version”
word.

### AboutDialogInfo#set_web_site

set_web_site(%(arg-type)String% url, String desc = ’’)

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.

[This page automatically generated from the Textile source at 2023-06-09 00:45:31 +0000]