1 // -*- c++ -*- 2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY! 3 #ifndef _GTKMM_ABOUTDIALOG_H 4 #define _GTKMM_ABOUTDIALOG_H 5 6 #include <gtkmmconfig.h> 7 8 9 #include <glibmm/ustring.h> 10 #include <sigc++/sigc++.h> 11 12 /* 13 * Copyright (C) 2004 The gtkmm Development Team 14 * 15 * This library is free software; you can redistribute it and/or 16 * modify it under the terms of the GNU Lesser General Public 17 * License as published by the Free Software Foundation; either 18 * version 2.1 of the License, or (at your option) any later version. 19 * 20 * This library is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 * Lesser General Public License for more details. 24 * 25 * You should have received a copy of the GNU Lesser General Public 26 * License along with this library; if not, write to the Free 27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 28 */ 29 30 31 #include <gtkmm/dialog.h> 32 //#include <glibmm/listhandle.h> 33 34 35 #ifndef DOXYGEN_SHOULD_SKIP_THIS 36 typedef struct _GtkAboutDialog GtkAboutDialog; 37 typedef struct _GtkAboutDialogClass GtkAboutDialogClass; 38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 39 40 41 namespace Gtk 42 { class AboutDialog_Class; } // namespace Gtk 43 namespace Gtk 44 { 45 46 /** The AboutDialog offers a simple way to display information about a program like its logo, name, copyright, 47 * website and license. It is also possible to give credits to the authors, documenters, translators and artists 48 * who have worked on the program. An about dialog is typically opened when the user selects the About option 49 * from the Help menu. All parts of the dialog are optional. 50 * 51 * About dialogs often contain links and email addresses. Gtk::AboutDialog supports this by offering global 52 * hooks, which are called when the user clicks on a link or email address, see set_email_hook() and 53 * set_url_hook(). Email addresses in the authors, documenters and artists properties are recognized by looking 54 * for <user@host>, URLs are recognized by looking for http://url, with the URL extending to the next space, 55 * tab or line break. 56 * 57 * An AboutDialog looks like this: 58 * @image html aboutdialog1.png 59 * 60 * @ingroup Dialogs 61 */ 62 63 class AboutDialog : public Dialog 64 { 65 public: 66 #ifndef DOXYGEN_SHOULD_SKIP_THIS 67 typedef AboutDialog CppObjectType; 68 typedef AboutDialog_Class CppClassType; 69 typedef GtkAboutDialog BaseObjectType; 70 typedef GtkAboutDialogClass BaseClassType; 71 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 72 73 virtual ~AboutDialog(); 74 75 #ifndef DOXYGEN_SHOULD_SKIP_THIS 76 77 private: 78 friend class AboutDialog_Class; 79 static CppClassType aboutdialog_class_; 80 81 // noncopyable 82 AboutDialog(const AboutDialog&); 83 AboutDialog& operator=(const AboutDialog&); 84 85 protected: 86 explicit AboutDialog(const Glib::ConstructParams& construct_params); 87 explicit AboutDialog(GtkAboutDialog* castitem); 88 89 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 90 91 public: 92 #ifndef DOXYGEN_SHOULD_SKIP_THIS 93 static GType get_type() G_GNUC_CONST; 94 95 96 static GType get_base_type() G_GNUC_CONST; 97 #endif 98 99 ///Provides access to the underlying C GtkObject. gobj()100 GtkAboutDialog* gobj() { return reinterpret_cast<GtkAboutDialog*>(gobject_); } 101 102 ///Provides access to the underlying C GtkObject. gobj()103 const GtkAboutDialog* gobj() const { return reinterpret_cast<GtkAboutDialog*>(gobject_); } 104 105 106 public: 107 //C++ methods used to invoke GTK+ virtual functions: 108 109 protected: 110 //GTK+ Virtual Functions (override these to change behaviour): 111 112 //Default Signal Handlers:: 113 114 115 private: 116 117 118 public: 119 AboutDialog(); 120 121 122 #ifndef GTKMM_DISABLE_DEPRECATED 123 124 /** Returns the program name displayed in the about dialog. 125 * 126 * @newin{2,6} 127 * 128 * Deprecated: 2.12: Use get_program_name() instead. 129 * 130 * @return The program name. The string is owned by the about 131 * dialog and must not be modified. 132 */ 133 Glib::ustring get_name() const; 134 #endif // GTKMM_DISABLE_DEPRECATED 135 136 137 #ifndef GTKMM_DISABLE_DEPRECATED 138 139 /** Sets the name to display in the about dialog. 140 * If this is not set, it defaults to Glib::get_application_name(). 141 * 142 * @newin{2,6} 143 * 144 * Deprecated: 2.12: Use set_program_name() instead. 145 * 146 * @param name The program name. 147 */ 148 void set_name(const Glib::ustring& name); 149 #endif // GTKMM_DISABLE_DEPRECATED 150 151 152 /** Return value: The program name. 153 * 154 * @return The program name. 155 * 156 * @newin{2,12}. 157 */ 158 Glib::ustring get_program_name() const; 159 160 /** Sets the name to display in the about dialog. 161 * If this is not set, it defaults to Glib::get_application_name(). 162 * 163 * @newin{2,12} 164 * 165 * @param name The program name. 166 */ 167 void set_program_name(const Glib::ustring& name); 168 169 170 /** Returns the version string. 171 * 172 * @newin{2,6} 173 * 174 * @return The version string. The string is owned by the about 175 * dialog and must not be modified. 176 */ 177 Glib::ustring get_version() const; 178 179 /** Sets the version string to display in the about dialog. 180 * 181 * @newin{2,6} 182 * 183 * @param version The version string. 184 */ 185 void set_version(const Glib::ustring& version); 186 187 /** Returns the copyright string. 188 * 189 * @newin{2,6} 190 * 191 * @return The copyright string. The string is owned by the about 192 * dialog and must not be modified. 193 */ 194 Glib::ustring get_copyright() const; 195 196 /** Sets the copyright string to display in the about dialog. 197 * This should be a short string of one or two lines. 198 * 199 * @newin{2,6} 200 * 201 * @param copyright (allow-none) the copyright string. 202 */ 203 void set_copyright(const Glib::ustring& copyright); 204 205 /** Returns the comments string. 206 * 207 * @newin{2,6} 208 * 209 * @return The comments. The string is owned by the about 210 * dialog and must not be modified. 211 */ 212 Glib::ustring get_comments() const; 213 214 /** Sets the comments string to display in the about dialog. 215 * This should be a short string of one or two lines. 216 * 217 * @newin{2,6} 218 * 219 * @param comments A comments string. 220 */ 221 void set_comments(const Glib::ustring& comments); 222 223 /** Returns the license information. 224 * 225 * @newin{2,6} 226 * 227 * @return The license information. The string is owned by the about 228 * dialog and must not be modified. 229 */ 230 Glib::ustring get_license() const; 231 232 /** Sets the license information to be displayed in the secondary 233 * license dialog. If @a license is <tt>0</tt>, the license button is 234 * hidden. 235 * 236 * @newin{2,6} 237 * 238 * @param license The license information or <tt>0</tt>. 239 */ 240 void set_license(const Glib::ustring& license); 241 242 /** Returns the website URL. 243 * 244 * @newin{2,6} 245 * 246 * @return The website URL. The string is owned by the about 247 * dialog and must not be modified. 248 */ 249 Glib::ustring get_website() const; 250 251 /** Sets the URL to use for the website link. 252 * 253 * Note that that the hook functions need to be set up 254 * before calling this function. 255 * 256 * @newin{2,6} 257 * 258 * @param website A URL string starting with "http://". 259 */ 260 void set_website(const Glib::ustring& website); 261 262 /** Return value: The label used for the website link. 263 * 264 * @return The label used for the website link. 265 * 266 * @newin{2,6}. 267 */ 268 Glib::ustring get_website_label() const; 269 270 /** Sets the label to be used for the website link. 271 * It defaults to the website URL. 272 * 273 * @newin{2,6} 274 * 275 * @param website_label The label used for the website link. 276 */ 277 void set_website_label(const Glib::ustring& website_label); 278 279 280 /** Returns the string which are displayed in the authors tab 281 * of the secondary credits dialog. 282 * 283 * @newin{2,6} 284 * 285 * @return A <tt>0</tt>-terminated string array containing 286 * the authors. The array is owned by the about dialog 287 * and must not be modified. 288 */ 289 Glib::StringArrayHandle get_authors() const; 290 291 292 /** Sets the strings which are displayed in the authors tab 293 * of the secondary credits dialog. 294 * 295 * @newin{2,6} 296 * 297 * @param authors A <tt>0</tt>-terminated array of strings. 298 */ 299 void set_authors(const Glib::StringArrayHandle& authors) const; 300 301 302 /** Returns the string which are displayed in the documenters 303 * tab of the secondary credits dialog. 304 * 305 * @newin{2,6} 306 * 307 * @return A <tt>0</tt>-terminated string array containing 308 * the documenters. The array is owned by the about dialog 309 * and must not be modified. 310 */ 311 Glib::StringArrayHandle get_documenters() const; 312 313 314 /** Sets the strings which are displayed in the documenters tab 315 * of the secondary credits dialog. 316 * 317 * @newin{2,6} 318 * 319 * @param documenters A <tt>0</tt>-terminated array of strings. 320 */ 321 void set_documenters(const Glib::StringArrayHandle& documenters); 322 323 /** Returns the string which are displayed in the artists tab 324 * of the secondary credits dialog. 325 * 326 * @newin{2,6} 327 * 328 * @return A <tt>0</tt>-terminated string array containing 329 * the artists. The array is owned by the about dialog 330 * and must not be modified. 331 */ 332 Glib::StringArrayHandle get_artists() const; 333 334 /** Sets the strings which are displayed in the artists tab 335 * of the secondary credits dialog. 336 * 337 * @newin{2,6} 338 * 339 * @param artists A <tt>0</tt>-terminated array of strings. 340 */ 341 void set_artists(const Glib::StringArrayHandle& artists); 342 343 /** Returns the translator credits string which is displayed 344 * in the translators tab of the secondary credits dialog. 345 * 346 * @newin{2,6} 347 * 348 * @return The translator credits string. The string is 349 * owned by the about dialog and must not be modified. 350 */ 351 Glib::ustring get_translator_credits() const; 352 353 /** Sets the translator credits string which is displayed in 354 * the translators tab of the secondary credits dialog. 355 * 356 * The intended use for this string is to display the translator 357 * of the language which is currently used in the user interface. 358 * Using gettext(), a simple way to achieve that is to mark the 359 * string for translation: 360 * 361 * [C example ellipted] 362 * It is a good idea to use the customary msgid "translator-credits" for this 363 * purpose, since translators will already know the purpose of that msgid, and 364 * since Gtk::AboutDialog will detect if "translator-credits" is untranslated 365 * and hide the tab. 366 * 367 * @newin{2,6} 368 * 369 * @param translator_credits The translator credits. 370 */ 371 void set_translator_credits(const Glib::ustring& translator_credits); 372 373 374 /** Returns the pixbuf displayed as logo in the about dialog. 375 * 376 * @newin{2,6} 377 * 378 * @return The pixbuf displayed as logo. The 379 * pixbuf is owned by the about dialog. If you want to keep a 380 * reference to it, you have to call Glib::object_ref() on it. 381 */ 382 Glib::RefPtr<Gdk::Pixbuf> get_logo(); 383 384 /** Returns the pixbuf displayed as logo in the about dialog. 385 * 386 * @newin{2,6} 387 * 388 * @return The pixbuf displayed as logo. The 389 * pixbuf is owned by the about dialog. If you want to keep a 390 * reference to it, you have to call Glib::object_ref() on it. 391 */ 392 Glib::RefPtr<const Gdk::Pixbuf> get_logo() const; 393 394 395 /** Sets the pixbuf to be displayed as logo in the about dialog. 396 * If it is <tt>0</tt>, the default window icon set with 397 * Gtk::Window::set_default_icon() will be used. 398 * 399 * @newin{2,6} 400 * 401 * @param logo A Gdk::Pixbuf, or <tt>0</tt>. 402 */ 403 void set_logo(const Glib::RefPtr<Gdk::Pixbuf>& logo); 404 405 406 /** Returns the icon name displayed as logo in the about dialog. 407 * 408 * @newin{2,6} 409 * 410 * @return The icon name displayed as logo. The string is 411 * owned by the dialog. If you want to keep a reference 412 * to it, you have to call Glib::strdup() on it. 413 */ 414 Glib::ustring get_logo_icon_name() const; 415 416 /** Sets the pixbuf to be displayed as logo in the about dialog. 417 * If it is <tt>0</tt>, the default window icon set with 418 * Gtk::Window::set_default_icon() will be used. 419 * 420 * @newin{2,6} 421 * 422 * @param icon_name An icon name, or <tt>0</tt>. 423 */ 424 void set_logo_icon_name(const Glib::ustring& icon_name); 425 426 427 /** Returns whether the license text in @a about is 428 * automatically wrapped. 429 * 430 * @newin{2,8} 431 * 432 * @return <tt>true</tt> if the license text is wrapped. 433 */ 434 bool get_wrap_license() const; 435 436 /** Sets whether the license text in @a about is 437 * automatically wrapped. 438 * 439 * @newin{2,8} 440 * 441 * @param wrap_license Whether to wrap the license. 442 */ 443 void set_wrap_license(bool wrap_license); 444 445 #ifndef GTKMM_DISABLE_DEPRECATED 446 447 /** For instance, 448 * void on_activate_link_url(AboutDialog& about_dialog, const Glib::ustring& link); 449 * 450 * @deprecated Use signal_activate_link() instead. 451 */ 452 typedef sigc::slot<void, AboutDialog& /* about_dialog */, const Glib::ustring& /* link */> SlotActivateLink; 453 454 /** Installs a global callback to be called whenever the user activates an email link in an about dialog. 455 * @param slot A function or method to call when an email link is activated. 456 * 457 * @deprecated Use signal_activate_link() instead. 458 */ 459 static void set_email_hook(const SlotActivateLink& slot); 460 461 462 /** Installs a global callback to be called whenever the user activates a URL link in an about dialog. 463 * @param slot A function or method to call when a URL link is activated. 464 * 465 * @deprecated Use signal_activate_link() instead. 466 */ 467 static void set_url_hook(const SlotActivateLink& slot); 468 469 #endif // GTKMM_DISABLE_DEPRECATED 470 471 472 //gtkmmproc error: activate-link : signal defs lookup failed 473 474 //TODO: Deprecate this, because it conflicts with the property in GtkWidget, and has been removed in GTK+ 2.12. 475 //If this could not have been used without an error, then remove it: 476 /** The name of the widget. 477 * 478 * @return A PropertyProxy that allows you to get or set the value of the property, 479 * or receive notification when the value of the property changes. 480 */ 481 Glib::PropertyProxy< Glib::ustring > property_name() ; 482 483 /** The name of the widget. 484 * 485 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 486 * or receive notification when the value of the property changes. 487 */ 488 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_name() const; 489 490 491 /** The name of the program. If this is not set, it defaults to g_get_application_name(). 492 * 493 * @return A PropertyProxy that allows you to get or set the value of the property, 494 * or receive notification when the value of the property changes. 495 */ 496 Glib::PropertyProxy< Glib::ustring > property_program_name() ; 497 498 /** The name of the program. If this is not set, it defaults to g_get_application_name(). 499 * 500 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 501 * or receive notification when the value of the property changes. 502 */ 503 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_program_name() const; 504 505 506 /** The version of the program. 507 * 508 * @return A PropertyProxy that allows you to get or set the value of the property, 509 * or receive notification when the value of the property changes. 510 */ 511 Glib::PropertyProxy< Glib::ustring > property_version() ; 512 513 /** The version of the program. 514 * 515 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 516 * or receive notification when the value of the property changes. 517 */ 518 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_version() const; 519 520 /** Copyright information for the program. 521 * 522 * @return A PropertyProxy that allows you to get or set the value of the property, 523 * or receive notification when the value of the property changes. 524 */ 525 Glib::PropertyProxy< Glib::ustring > property_copyright() ; 526 527 /** Copyright information for the program. 528 * 529 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 530 * or receive notification when the value of the property changes. 531 */ 532 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_copyright() const; 533 534 /** Comments about the program. 535 * 536 * @return A PropertyProxy that allows you to get or set the value of the property, 537 * or receive notification when the value of the property changes. 538 */ 539 Glib::PropertyProxy< Glib::ustring > property_comments() ; 540 541 /** Comments about the program. 542 * 543 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 544 * or receive notification when the value of the property changes. 545 */ 546 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_comments() const; 547 548 /** The URL for the link to the website of the program. 549 * 550 * @return A PropertyProxy that allows you to get or set the value of the property, 551 * or receive notification when the value of the property changes. 552 */ 553 Glib::PropertyProxy< Glib::ustring > property_website() ; 554 555 /** The URL for the link to the website of the program. 556 * 557 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 558 * or receive notification when the value of the property changes. 559 */ 560 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_website() const; 561 562 /** The label for the link to the website of the program. If this is not set, it defaults to the URL. 563 * 564 * @return A PropertyProxy that allows you to get or set the value of the property, 565 * or receive notification when the value of the property changes. 566 */ 567 Glib::PropertyProxy< Glib::ustring > property_website_label() ; 568 569 /** The label for the link to the website of the program. If this is not set, it defaults to the URL. 570 * 571 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 572 * or receive notification when the value of the property changes. 573 */ 574 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_website_label() const; 575 576 /** The license of the program. 577 * 578 * @return A PropertyProxy that allows you to get or set the value of the property, 579 * or receive notification when the value of the property changes. 580 */ 581 Glib::PropertyProxy< Glib::ustring > property_license() ; 582 583 /** The license of the program. 584 * 585 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 586 * or receive notification when the value of the property changes. 587 */ 588 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_license() const; 589 590 /** List of authors of the program. 591 * 592 * @return A PropertyProxy that allows you to get or set the value of the property, 593 * or receive notification when the value of the property changes. 594 */ 595 Glib::PropertyProxy< Glib::StringArrayHandle > property_authors() ; 596 597 /** List of authors of the program. 598 * 599 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 600 * or receive notification when the value of the property changes. 601 */ 602 Glib::PropertyProxy_ReadOnly< Glib::StringArrayHandle > property_authors() const; 603 604 /** List of people documenting the program. 605 * 606 * @return A PropertyProxy that allows you to get or set the value of the property, 607 * or receive notification when the value of the property changes. 608 */ 609 Glib::PropertyProxy< Glib::StringArrayHandle > property_documenters() ; 610 611 /** List of people documenting the program. 612 * 613 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 614 * or receive notification when the value of the property changes. 615 */ 616 Glib::PropertyProxy_ReadOnly< Glib::StringArrayHandle > property_documenters() const; 617 618 /** Credits to the translators. This string should be marked as translatable. 619 * 620 * @return A PropertyProxy that allows you to get or set the value of the property, 621 * or receive notification when the value of the property changes. 622 */ 623 Glib::PropertyProxy< Glib::StringArrayHandle > property_translator_credits() ; 624 625 /** Credits to the translators. This string should be marked as translatable. 626 * 627 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 628 * or receive notification when the value of the property changes. 629 */ 630 Glib::PropertyProxy_ReadOnly< Glib::StringArrayHandle > property_translator_credits() const; 631 632 /** List of people who have contributed artwork to the program. 633 * 634 * @return A PropertyProxy that allows you to get or set the value of the property, 635 * or receive notification when the value of the property changes. 636 */ 637 Glib::PropertyProxy< Glib::StringArrayHandle > property_artists() ; 638 639 /** List of people who have contributed artwork to the program. 640 * 641 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 642 * or receive notification when the value of the property changes. 643 */ 644 Glib::PropertyProxy_ReadOnly< Glib::StringArrayHandle > property_artists() const; 645 646 /** A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list(). 647 * 648 * @return A PropertyProxy that allows you to get or set the value of the property, 649 * or receive notification when the value of the property changes. 650 */ 651 Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_logo() ; 652 653 /** A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list(). 654 * 655 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 656 * or receive notification when the value of the property changes. 657 */ 658 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_logo() const; 659 660 /** A named icon to use as the logo for the about box. 661 * 662 * @return A PropertyProxy that allows you to get or set the value of the property, 663 * or receive notification when the value of the property changes. 664 */ 665 Glib::PropertyProxy< Glib::ustring > property_logo_icon_name() ; 666 667 /** A named icon to use as the logo for the about box. 668 * 669 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 670 * or receive notification when the value of the property changes. 671 */ 672 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_logo_icon_name() const; 673 674 /** Whether to wrap the license text. 675 * 676 * @return A PropertyProxy that allows you to get or set the value of the property, 677 * or receive notification when the value of the property changes. 678 */ 679 Glib::PropertyProxy< bool > property_wrap_license() ; 680 681 /** Whether to wrap the license text. 682 * 683 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 684 * or receive notification when the value of the property changes. 685 */ 686 Glib::PropertyProxy_ReadOnly< bool > property_wrap_license() const; 687 688 689 }; 690 691 } // namespace Gtk 692 693 694 namespace Glib 695 { 696 /** A Glib::wrap() method for this object. 697 * 698 * @param object The C instance. 699 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 700 * @result A C++ instance that wraps this C instance. 701 * 702 * @relates Gtk::AboutDialog 703 */ 704 Gtk::AboutDialog* wrap(GtkAboutDialog* object, bool take_copy = false); 705 } //namespace Glib 706 707 708 #endif /* _GTKMM_ABOUTDIALOG_H */ 709 710