/* Copyright (C) 2004 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
_CONFIGINCLUDE(gtkmmconfig.h)
#include
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/dialog_p.h)
namespace Gtk
{
_WRAP_ENUM(License, GtkLicense, decl_prefix GTKMM_API)
/** The AboutDialog offers a simple way to display information about a program like its logo, name, copyright,
* website and license. It is also possible to give credits to the authors, documenters, translators and artists
* who have worked on the program. An about dialog is typically opened when the user selects the About option
* from the Help menu. All parts of the dialog are optional.
*
* About dialogs often contain links and email addresses. Gtk::AboutDialog displays these as clickable links.
* By default, it calls gtk_show_uri() when a user clicks one. The behaviour can be overridden with the activate_link signal.
* Email addresses in the authors, documenters and artists properties are recognized by looking
* for \, URLs are recognized by looking for http://url, with the URL extending to the next space,
* tab or line break.
*
* An AboutDialog looks like this:
* @image html aboutdialog1.png
*
* @ingroup Dialogs
*/
class GTKMM_API AboutDialog : public Dialog
{
_CLASS_GTKOBJECT(AboutDialog, GtkAboutDialog, GTK_ABOUT_DIALOG, Gtk::Dialog, GtkDialog, , , GTKMM_API)
_UNMANAGEABLE
public:
_CTOR_DEFAULT()
/** Constructor.
*
* @param use_header_bar true if the dialog shall use a HeaderBar
* for action buttons instead of the action-area.
*
* @newin{3,24}
*/
explicit AboutDialog(bool use_header_bar);
_WRAP_METHOD(Glib::ustring get_program_name() const, gtk_about_dialog_get_program_name)
_WRAP_METHOD(void set_program_name(const Glib::ustring& name), gtk_about_dialog_set_program_name)
_WRAP_METHOD(Glib::ustring get_version() const, gtk_about_dialog_get_version)
_WRAP_METHOD(void set_version(const Glib::ustring& version), gtk_about_dialog_set_version)
_WRAP_METHOD(Glib::ustring get_copyright() const, gtk_about_dialog_get_copyright)
_WRAP_METHOD(void set_copyright(const Glib::ustring& copyright), gtk_about_dialog_set_copyright)
_WRAP_METHOD(Glib::ustring get_comments() const, gtk_about_dialog_get_comments)
_WRAP_METHOD(void set_comments(const Glib::ustring& comments), gtk_about_dialog_set_comments)
_WRAP_METHOD(Glib::ustring get_license() const, gtk_about_dialog_get_license)
_WRAP_METHOD(void set_license(const Glib::ustring& license), gtk_about_dialog_set_license)
/** Hides the license button.
*
* @newin{3,4}
*/
void unset_license();
_WRAP_METHOD(License get_license_type() const, gtk_about_dialog_get_license_type)
_WRAP_METHOD(void set_license_type(License license_type), gtk_about_dialog_set_license_type)
_WRAP_METHOD(Glib::ustring get_website() const, gtk_about_dialog_get_website)
_WRAP_METHOD(void set_website(const Glib::ustring& website), gtk_about_dialog_set_website)
_WRAP_METHOD(Glib::ustring get_website_label() const, gtk_about_dialog_get_website_label)
_WRAP_METHOD(void set_website_label(const Glib::ustring& website_label), gtk_about_dialog_set_website_label)
#m4 _CONVERSION(`const gchar* const*',`std::vector',`Glib::ArrayHandler::array_to_vector($3, Glib::OWNERSHIP_NONE)')
_WRAP_METHOD(std::vector get_authors() const, gtk_about_dialog_get_authors)
#m4 _CONVERSION(`const std::vector&',`const gchar**',`Glib::ArrayHandler::vector_to_array($3).data ()')
_WRAP_METHOD(void set_authors(const std::vector& authors) const, gtk_about_dialog_set_authors)
_WRAP_METHOD(std::vector get_documenters() const, gtk_about_dialog_get_documenters)
_WRAP_METHOD(void set_documenters(const std::vector& documenters), gtk_about_dialog_set_documenters)
_WRAP_METHOD(std::vector get_artists() const, gtk_about_dialog_get_artists)
_WRAP_METHOD(void set_artists(const std::vector& artists), gtk_about_dialog_set_artists)
_WRAP_METHOD(Glib::ustring get_translator_credits() const, gtk_about_dialog_get_translator_credits)
_WRAP_METHOD(void set_translator_credits(const Glib::ustring& translator_credits), gtk_about_dialog_set_translator_credits)
_WRAP_METHOD(Glib::RefPtr get_logo(), gtk_about_dialog_get_logo, refreturn)
_WRAP_METHOD(Glib::RefPtr get_logo() const, gtk_about_dialog_get_logo, refreturn, constversion)
_WRAP_METHOD(void set_logo(const Glib::RefPtr& logo), gtk_about_dialog_set_logo)
/** Sets the pixbuf to be displayed as logo in the about dialog.
* The logo is set to the default window icon set with
* Gtk::Window::set_default_icon() or Gtk::Window::set_default_icon_list().
*
* @newin{3,4}
*/
void set_logo_default();
_WRAP_METHOD(Glib::ustring get_logo_icon_name() const, gtk_about_dialog_get_logo_icon_name)
_WRAP_METHOD(void set_logo_icon_name(const Glib::ustring& icon_name), gtk_about_dialog_set_logo_icon_name)
_WRAP_METHOD(bool get_wrap_license() const, gtk_about_dialog_get_wrap_license)
_WRAP_METHOD(void set_wrap_license(bool wrap_license), gtk_about_dialog_set_wrap_license)
_WRAP_METHOD(void add_credit_section(const Glib::ustring& section_name, const std::vector& people), gtk_about_dialog_add_credit_section)
_WRAP_PROPERTY("program-name", Glib::ustring)
_WRAP_PROPERTY("version", Glib::ustring)
_WRAP_PROPERTY("copyright", Glib::ustring)
_WRAP_PROPERTY("comments", Glib::ustring)
_WRAP_PROPERTY("website", Glib::ustring)
_WRAP_PROPERTY("website_label", Glib::ustring)
_WRAP_PROPERTY("license", Glib::ustring)
_WRAP_PROPERTY("license-type", License)
_WRAP_PROPERTY("authors", std::vector)
_WRAP_PROPERTY("documenters", std::vector)
_WRAP_PROPERTY("translator_credits", std::vector)
_WRAP_PROPERTY("artists", std::vector)
_WRAP_PROPERTY("logo", Glib::RefPtr)
_WRAP_PROPERTY("logo_icon_name", Glib::ustring)
_WRAP_PROPERTY("wrap_license", bool)
_WRAP_SIGNAL(bool activate_link(const std::string& uri), "activate-link")
};
} // namespace Gtk