Class: Wx::AboutDialogInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/about_dialog_info.rb

Overview

Note:

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

See Also:

Requires:

  • USE_ABOUTDLG

Instance Method Summary collapse

Constructor Details

#initializeWx::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.

Parameters:

  • artist (String)

See Also:



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.

Parameters:

  • developer (String)

See Also:



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.

Parameters:

  • docwriter (String)

See Also:



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.

Parameters:

  • translator (String)

See Also:



104
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 104

def add_translator(translator) end

#get_artistsWx::ArrayString Also known as: artists

Returns an array of the artist strings set in the dialog info.

Returns:

  • (Wx::ArrayString)


323
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 323

def get_artists; end

Get the copyright string.

The copyright string

Returns:

  • (Wx::String)


141
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 141

def get_copyright; end

#get_descriptionWx::String Also known as: description

Get the description string.

The description string, free-form.

Returns:

  • (Wx::String)


126
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 126

def get_description; end

#get_developersWx::ArrayString Also known as: developers

Returns an array of the developer strings set in the dialog info.

Returns:

  • (Wx::ArrayString)


303
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 303

def get_developers; end

#get_doc_writersWx::ArrayString Also known as: doc_writers

Returns an array of the writer strings set in the dialog info.

Returns:

  • (Wx::ArrayString)


313
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 313

def get_doc_writers; end

#get_iconWx::Icon Also known as: icon

Returns the icon set by #set_icon.

Returns:



192
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 192

def get_icon; end

#get_licenceWx::String Also known as: licence

Returns the licence string.

Returns:

  • (Wx::String)

See Also:



213
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 213

def get_licence; end

#get_long_versionWx::String Also known as: long_version

Return the long version string if set.

Returns:

  • (Wx::String)

See Also:



269
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 269

def get_long_version; end

#get_nameString Also known as: name

Get the name of the program.

Name of the program

Returns:

  • (String)

See Also:



111
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 111

def get_name; end

#get_translatorsWx::ArrayString Also known as: translators

Returns an array of the translator strings set in the dialog info.

Returns:

  • (Wx::ArrayString)


333
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 333

def get_translators; end

#get_versionWx::String Also known as: version

Return the short version string.

Returns:

  • (Wx::String)

See Also:



261
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 261

def get_version; end

#get_web_site_descriptionWx::String Also known as: web_site_description

Returns the description of the website URL set for the dialog.

Returns:

  • (Wx::String)


284
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 284

def get_web_site_description; end

#get_web_site_urlWx::String Also known as: web_site_url

Returns the website URL set for the dialog.

Returns:

  • (Wx::String)


279
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 279

def get_web_site_url; end

#has_artistsBoolean Also known as: has_artists?

Returns true if artists have been set in the dialog info.

Returns:

  • (Boolean)


318
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 318

def has_artists; end

Returns true if a copyright string has been specified.

Returns:

  • (Boolean)

See Also:



134
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 134

def has_copyright; end

#has_descriptionBoolean Also known as: has_description?

Returns true if a description string has been specified.

Returns:

  • (Boolean)

See Also:



119
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 119

def has_description; end

#has_developersBoolean Also known as: has_developers?

Returns true if developers have been set in the dialog info.

Returns:

  • (Boolean)


298
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 298

def has_developers; end

#has_doc_writersBoolean Also known as: has_doc_writers?

Returns true if writers have been set in the dialog info.

Returns:

  • (Boolean)


308
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 308

def has_doc_writers; end

#has_iconBoolean Also known as: has_icon?

Returns true if an icon has been set for the about dialog.

Returns:

  • (Boolean)


187
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 187

def has_icon; end

#has_licenceBoolean Also known as: has_licence?

Returns true if the licence string has been set.

Returns:

  • (Boolean)


205
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 205

def has_licence; end

#has_translatorsBoolean Also known as: has_translators?

Returns true if translators have been set in the dialog info.

Returns:

  • (Boolean)


328
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 328

def has_translators; end

#has_web_siteBoolean Also known as: has_web_site?

Returns true if the website info has been set.

Returns:

  • (Boolean)


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.

Parameters:

  • artists (Array<String>)

See Also:



150
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 150

def set_artists(artists) end

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,

Parameters:

  • copyright (String)


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.

Parameters:

  • desc (String)


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.

Parameters:

  • developers (Array<String>)

See Also:



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.

Parameters:

  • docwriters (Array<String>)

See Also:



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.

Parameters:



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.

Parameters:

  • licence (String)


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.

Parameters:

  • licence (String)


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.

Parameters:

  • name (String)


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.

Parameters:

  • translators (Array<String>)


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.

Parameters:

  • version (String)
  • longVersion (String) (defaults to: (''))


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.

Parameters:

  • url (String)
  • desc (String) (defaults to: (''))


293
# File 'lib/wx/doc/gen/about_dialog_info.rb', line 293

def set_web_site(url, desc=('')) end