1 // -*- c++ -*- 2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY! 3 #ifndef _GTKMM_STATUSICON_H 4 #define _GTKMM_STATUSICON_H 5 6 #include <gtkmmconfig.h> 7 8 9 #include <glibmm/ustring.h> 10 #include <sigc++/sigc++.h> 11 12 /* Copyright (C) 2005 The gtkmm Development Team 13 * 14 * This library is free software; you can redistribute it and/or 15 * modify it under the terms of the GNU Lesser General Public 16 * License as published by the Free Software Foundation; either 17 * version 2.1 of the License, or (at your option) any later version. 18 * 19 * This library is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 * Lesser General Public License for more details. 23 * 24 * You should have received a copy of the GNU Lesser General Public 25 * License along with this library; if not, write to the Free 26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 */ 28 29 30 #include <gtkmm/image.h> 31 #include <gtkmm/stockid.h> 32 #include <gtkmm/menu.h> 33 #include <gdkmm/pixbuf.h> 34 #include <gdkmm/types.h> 35 #include <gtkmm/object.h> 36 #include <gtkmm/tooltip.h> 37 38 #ifndef DOXYGEN_SHOULD_SKIP_THIS 39 typedef struct _GtkStatusIcon GtkStatusIcon; 40 typedef struct _GtkStatusIconClass GtkStatusIconClass; 41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 42 43 44 #ifndef DOXYGEN_SHOULD_SKIP_THIS 45 namespace Gtk 46 { class StatusIcon_Class; } // namespace Gtk 47 #endif //DOXYGEN_SHOULD_SKIP_THIS 48 49 namespace Gtk 50 { 51 52 /** The "system tray" or notification area is normally used for transient icons that indicate some 53 * special state. For example, a system tray icon might appear to tell the user that they have new 54 * mail, or have an incoming instant message, or something along those lines. The basic idea is 55 * that creating an icon in the notification area is less annoying than popping up a dialog. 56 * 57 * A StatusIcon object can be used to display an icon in a "system tray". The icon can have a 58 * tooltip, and the user can interact with it by activating it or popping up a context menu. 59 * Critical information should not solely be displayed in a StatusIcon, since it may not be 60 * visible (e.g. when the user doesn't have a notification area on his panel). This can be checked 61 * with is_embedded(). 62 * 63 * On X11, the implementation follows the freedesktop.org "System Tray" specification. 64 * Implementations of the "tray" side of this specification can be found e.g. in the GNOME and KDE 65 * panel applications. 66 * 67 * @newin{2,10} 68 */ 69 70 class StatusIcon : public Glib::Object 71 { 72 73 #ifndef DOXYGEN_SHOULD_SKIP_THIS 74 75 public: 76 typedef StatusIcon CppObjectType; 77 typedef StatusIcon_Class CppClassType; 78 typedef GtkStatusIcon BaseObjectType; 79 typedef GtkStatusIconClass BaseClassType; 80 81 private: friend class StatusIcon_Class; 82 static CppClassType statusicon_class_; 83 84 private: 85 // noncopyable 86 StatusIcon(const StatusIcon&); 87 StatusIcon& operator=(const StatusIcon&); 88 89 protected: 90 explicit StatusIcon(const Glib::ConstructParams& construct_params); 91 explicit StatusIcon(GtkStatusIcon* castitem); 92 93 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 94 95 public: 96 virtual ~StatusIcon(); 97 98 /** Get the GType for this class, for use with the underlying GObject type system. 99 */ 100 static GType get_type() G_GNUC_CONST; 101 102 #ifndef DOXYGEN_SHOULD_SKIP_THIS 103 104 105 static GType get_base_type() G_GNUC_CONST; 106 #endif 107 108 ///Provides access to the underlying C GObject. gobj()109 GtkStatusIcon* gobj() { return reinterpret_cast<GtkStatusIcon*>(gobject_); } 110 111 ///Provides access to the underlying C GObject. gobj()112 const GtkStatusIcon* gobj() const { return reinterpret_cast<GtkStatusIcon*>(gobject_); } 113 114 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 115 GtkStatusIcon* gobj_copy(); 116 117 private: 118 119 protected: 120 StatusIcon(); 121 122 explicit StatusIcon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf); 123 124 explicit StatusIcon(const StockID& stock); 125 126 explicit StatusIcon(const Glib::ustring& icon_name); 127 128 explicit StatusIcon(const Glib::RefPtr<const Gio::Icon>& icon); 129 130 131 public: 132 /** Creates a new Gtk::StatusIcon object. 133 * @return A Glib::RefPtr<> to a newly created Gtk::StatusIcon object. 134 */ 135 136 static Glib::RefPtr<StatusIcon> create(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf); 137 138 139 static Glib::RefPtr<StatusIcon> create(const StockID& stock_id); 140 141 142 static Glib::RefPtr<StatusIcon> create(const Glib::ustring& icon_name); 143 144 145 /** Creates a status icon displaying the file @a filename. 146 * The image will be scaled down to fit in the available 147 * space in the notification area, if necessary. 148 * 149 * @param filename A filename. 150 * @result A new StatusIcon 151 * 152 * @newin{2,10} 153 */ 154 static Glib::RefPtr<StatusIcon> create_from_file(const std::string& filename); 155 156 157 /** Makes @a status_icon display @a pixbuf. 158 * See new_from_pixbuf() for details. 159 * 160 * @newin{2,10} 161 * 162 * @param pixbuf A Gdk::Pixbuf or <tt>0</tt>. 163 */ 164 void set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf); 165 166 /** Makes @a status_icon display the file @a filename. 167 * See new_from_file() for details. 168 * 169 * @newin{2,10} 170 * 171 * @param filename A filename. 172 */ 173 void set_from_file(const Glib::ustring& filename); 174 175 /** Makes @a status_icon display the stock icon with the id @a stock_id. 176 * See new_from_stock() for details. 177 * 178 * @newin{2,10} 179 * 180 * @param stock_id A stock icon id. 181 */ 182 void set(const StockID& stock_id); 183 184 /** Makes @a status_icon display the icon named @a icon_name from the 185 * current icon theme. 186 * See new_from_icon_name() for details. 187 * 188 * @newin{2,10} 189 * 190 * @param icon_name An icon name. 191 */ 192 void set(const Glib::ustring& icon_name); 193 194 /** Makes @a status_icon display the Icon. 195 * See new_from_gicon() for details. 196 * 197 * @newin{2,14} 198 * 199 * @param icon A GIcon. 200 */ 201 void set(const Glib::RefPtr<const Gio::Icon>& icon); 202 203 204 /** Gets the type of representation being used by the Gtk::StatusIcon 205 * to store image data. If the Gtk::StatusIcon has no image data, 206 * the return value will be Gtk::IMAGE_EMPTY. 207 * 208 * @newin{2,10} 209 * 210 * @return The image representation being used. 211 */ 212 ImageType get_storage_type() const; 213 214 215 /** Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon. 216 * The storage type of the status icon must be Gtk::IMAGE_EMPTY or 217 * Gtk::IMAGE_PIXBUF (see get_storage_type()). 218 * The caller of this function does not own a reference to the 219 * returned pixbuf. 220 * 221 * @newin{2,10} 222 * 223 * @return The displayed pixbuf, 224 * or <tt>0</tt> if the image is empty. 225 */ 226 Glib::RefPtr<Gdk::Pixbuf> get_pixbuf(); 227 228 /** Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon. 229 * The storage type of the status icon must be Gtk::IMAGE_EMPTY or 230 * Gtk::IMAGE_PIXBUF (see get_storage_type()). 231 * The caller of this function does not own a reference to the 232 * returned pixbuf. 233 * 234 * @newin{2,10} 235 * 236 * @return The displayed pixbuf, 237 * or <tt>0</tt> if the image is empty. 238 */ 239 Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const; 240 241 242 /** Gets the id of the stock icon being displayed by the Gtk::StatusIcon. 243 * The storage type of the status icon must be Gtk::IMAGE_EMPTY or 244 * Gtk::IMAGE_STOCK (see get_storage_type()). 245 * The returned string is owned by the Gtk::StatusIcon and should not 246 * be freed or modified. 247 * 248 * @newin{2,10} 249 * 250 * @return Stock id of the displayed stock icon, 251 * or <tt>0</tt> if the image is empty. 252 */ 253 StockID get_stock() const; 254 255 /** Gets the name of the icon being displayed by the Gtk::StatusIcon. 256 * The storage type of the status icon must be Gtk::IMAGE_EMPTY or 257 * Gtk::IMAGE_ICON_NAME (see get_storage_type()). 258 * The returned string is owned by the Gtk::StatusIcon and should not 259 * be freed or modified. 260 * 261 * @newin{2,10} 262 * 263 * @return Name of the displayed icon, or <tt>0</tt> if the image is empty. 264 */ 265 Glib::ustring get_icon_name() const; 266 267 268 /** Retrieves the Icon being displayed by the Gtk::StatusIcon. 269 * The storage type of the status icon must be Gtk::IMAGE_EMPTY or 270 * Gtk::IMAGE_GICON (see get_storage_type()). 271 * The caller of this function does not own a reference to the 272 * returned Icon. 273 * 274 * If this function fails, @a icon is left unchanged; 275 * 276 * @newin{2,14} 277 * 278 * @return The displayed icon, or <tt>0</tt> if the image is empty. 279 */ 280 Glib::RefPtr<Gio::Icon> get_icon(); 281 282 /** Retrieves the Icon being displayed by the Gtk::StatusIcon. 283 * The storage type of the status icon must be Gtk::IMAGE_EMPTY or 284 * Gtk::IMAGE_GICON (see get_storage_type()). 285 * The caller of this function does not own a reference to the 286 * returned Icon. 287 * 288 * If this function fails, @a icon is left unchanged; 289 * 290 * @newin{2,14} 291 * 292 * @return The displayed icon, or <tt>0</tt> if the image is empty. 293 */ 294 Glib::RefPtr<const Gio::Icon> get_icon() const; 295 296 297 /** Gets the size in pixels that is available for the image. 298 * Stock icons and named icons adapt their size automatically 299 * if the size of the notification area changes. For other 300 * storage types, the size-changed signal can be used to 301 * react to size changes. 302 * 303 * Note that the returned size is only meaningful while the 304 * status icon is embedded (see is_embedded()). 305 * 306 * @newin{2,10} 307 * 308 * @return The size that is available for the image. 309 */ 310 int get_size() const; 311 312 313 /** Sets the Gdk::Screen where @a status_icon is displayed; if 314 * the icon is already mapped, it will be unmapped, and 315 * then remapped on the new screen. 316 * 317 * @newin{2,12} 318 * 319 * @param screen A Gdk::Screen. 320 */ 321 void set_screen(const Glib::RefPtr<Gdk::Screen>& screen); 322 323 /** Returns the Gdk::Screen associated with @a status_icon. 324 * 325 * @newin{2,12} 326 * 327 * @return A Gdk::Screen. 328 */ 329 Glib::RefPtr<Gdk::Screen> get_screen(); 330 331 /** Returns the Gdk::Screen associated with @a status_icon. 332 * 333 * @newin{2,12} 334 * 335 * @return A Gdk::Screen. 336 */ 337 Glib::RefPtr<const Gdk::Screen> get_screen() const; 338 339 340 #ifndef GTKMM_DISABLE_DEPRECATED 341 342 /** Sets the tooltip of the status icon. 343 * 344 * @newin{2,10} 345 * 346 * Deprecated: 2.16: Use set_tooltip_text() instead. 347 * 348 * @param tooltip_text The tooltip text, or <tt>0</tt>. 349 */ 350 void set_tooltip(const Glib::ustring& tooltip_text); 351 #endif // GTKMM_DISABLE_DEPRECATED 352 353 354 /** Shows or hides a status icon. 355 * 356 * @newin{2,10} 357 * 358 * @param visible <tt>true</tt> to show the status icon, <tt>false</tt> to hide it. 359 */ 360 void set_visible(bool visible = true); 361 362 /** Returns whether the status icon is visible or not. 363 * Note that being visible does not guarantee that 364 * the user can actually see the icon, see also 365 * is_embedded(). 366 * 367 * @newin{2,10} 368 * 369 * @return <tt>true</tt> if the status icon is visible. 370 */ 371 bool get_visible() const; 372 373 /** Makes the status icon start or stop blinking. 374 * Note that blinking user interface elements may be problematic 375 * for some users, and thus may be turned off, in which case 376 * this setting has no effect. 377 * 378 * @newin{2,10} 379 * 380 * Deprecated: 2.22: This function will be removed in GTK+ 3 381 * 382 * @param blinking <tt>true</tt> to turn blinking on, <tt>false</tt> to turn it off. 383 */ 384 void set_blinking(bool blinking = true); 385 386 /** Returns whether the icon is blinking, see 387 * set_blinking(). 388 * 389 * @newin{2,10} 390 * 391 * Deprecated: 2.22: This function will be removed in GTK+ 3 392 * 393 * @return <tt>true</tt> if the icon is blinking. 394 */ 395 bool get_blinking() const; 396 397 398 /** Returns whether the status icon is embedded in a notification 399 * area. 400 * 401 * @newin{2,10} 402 * 403 * @return <tt>true</tt> if the status icon is embedded in 404 * a notification area. 405 */ 406 bool is_embedded() const; 407 408 /** Displays a menu aligned to the status icon, and makes it available for selection. 409 * Applications can use this function to display context-sensitive menus. 410 * 411 * This is equivalent to the gtk_status_icon_position_menu() helper callback in GTK+, 412 * which can be provided to gtk_menu_popup(). 413 * 414 * See Gtk::Menu::popup() for more details. 415 * 416 * @param menu The menu to popup for the status icon. 417 * @param button The mouse button which was pressed to initiate the event. 418 * @param activate_time The time at which the activation event occurred. 419 * 420 * @newin{2,12} 421 */ 422 void popup_menu_at_position(Menu& menu, guint button, guint32 activate_time); 423 424 //Note that gtk_status_icon_position_menu() is meant to be used as a helpful callback when calling gtk_menu_popup(). 425 //We make it easier by just providing a popup method that uses it. 426 427 //In gtk_status_icon_get_geometry(), any of the parameters may be NULL, 428 //but we don't need 6 different overloads, with different parameters. 429 //But we can add some if there are common cases. 430 431 /** Obtains information about the location of the status icon 432 * on screen. This information can be used to e.g. position 433 * popups like notification bubbles. 434 * See popup_menu_at_position() for a more convenient 435 * alternative for positioning menus. 436 * 437 * Note that some platforms do not allow GTK+ to provide 438 * this information. 439 * 440 * @param screen: The screen. 441 * @param area The area occupied by the status icon. 442 * @param orientation The orientation of the panel in which the status icon is embedded. A panel 443 * at the top or bottom of the screen is horizontal, a panel at the left or right is vertical. 444 * @result true if the location information has been filled in. 445 * 446 * @newin{2,10} 447 */ 448 bool get_geometry(Glib::RefPtr<Gdk::Screen>& screen, Gdk::Rectangle& area, Orientation& orientation); 449 450 451 /** Returns the current value of the has-tooltip property. 452 * See Gtk::StatusIcon::property_has_tooltip() for more information. 453 * 454 * @newin{2,16} 455 * 456 * @return Current value of has-tooltip on @a status_icon. 457 */ 458 bool get_has_tooltip() const; 459 460 /** Sets the has-tooltip property on @a status_icon to @a has_tooltip. 461 * See Gtk::StatusIcon::property_has_tooltip() for more information. 462 * 463 * @newin{2,16} 464 * 465 * @param has_tooltip Whether or not @a status_icon has a tooltip. 466 */ 467 void set_has_tooltip(bool has_tooltip = true); 468 469 /** Gets the contents of the tooltip for @a status_icon. 470 * 471 * @newin{2,16} 472 * 473 * @return The tooltip text, or <tt>0</tt>. You should free the 474 * returned string with Glib::free() when done. 475 */ 476 Glib::ustring get_tooltip_text() const; 477 478 /** Sets @a text as the contents of the tooltip. 479 * 480 * This function will take care of setting Gtk::StatusIcon::property_has_tooltip() to 481 * <tt>true</tt> and of the default handler for the Gtk::StatusIcon::signal_query_tooltip() 482 * signal. 483 * 484 * See also the Gtk::StatusIcon::property_tooltip_text() property and 485 * Gtk::Tooltip::set_text(). 486 * 487 * @newin{2,16} 488 * 489 * @param text The contents of the tooltip for @a status_icon. 490 */ 491 void set_tooltip_text(const Glib::ustring& text); 492 493 /** Gets the contents of the tooltip for @a status_icon. 494 * 495 * @newin{2,16} 496 * 497 * @return The tooltip text, or <tt>0</tt>. You should free the 498 * returned string with Glib::free() when done. 499 */ 500 Glib::ustring get_tooltip_markup() const; 501 502 /** Sets @a markup as the contents of the tooltip, which is marked up with 503 * the Pango text markup language. 504 * 505 * This function will take care of setting Gtk::StatusIcon::property_has_tooltip() to <tt>true</tt> 506 * and of the default handler for the Gtk::StatusIcon::signal_query_tooltip() signal. 507 * 508 * See also the Gtk::StatusIcon::property_tooltip_markup() property and 509 * Gtk::Tooltip::set_markup(). 510 * 511 * @newin{2,16} 512 * 513 * @param markup The contents of the tooltip for @a status_icon, or <tt>0</tt>. 514 */ 515 void set_tooltip_markup(const Glib::ustring& markup); 516 517 /** Sets the title of this tray icon. 518 * This should be a short, human-readable, localized string 519 * describing the tray icon. It may be used by tools like screen 520 * readers to render the tray icon. 521 * 522 * @newin{2,18} 523 * 524 * @param title The title. 525 */ 526 void set_title(const Glib::ustring& title); 527 528 /** Gets the title of this tray icon. See set_title(). 529 * 530 * @newin{2,18} 531 * 532 * @return The title of the status icon. 533 */ 534 Glib::ustring get_title() const; 535 536 /** Sets the name of this tray icon. 537 * This should be a string identifying this icon. It is may be 538 * used for sorting the icons in the tray and will not be shown to 539 * the user. 540 * 541 * @newin{2,20} 542 * 543 * @param name The name. 544 */ 545 void set_name(const Glib::ustring& name); 546 547 548 /** This function is only useful on the X11/freedesktop.org platform. 549 * It returns a window ID for the widget in the underlying 550 * status icon implementation. This is useful for the Galago 551 * notification service, which can send a window ID in the protocol 552 * in order for the server to position notification windows 553 * pointing to a status icon reliably. 554 * 555 * This function is not intended for other use cases which are 556 * more likely to be met by one of the non-X11 specific methods, such 557 * as position_menu(). 558 * 559 * @newin{2,14} 560 * 561 * @return An 32 bit unsigned integer identifier for the 562 * underlying X11 Window. 563 */ 564 guint32 get_x11_window_id() const; 565 566 /** A GdkPixbuf to display. 567 * 568 * @return A PropertyProxy that allows you to get or set the value of the property, 569 * or receive notification when the value of the property changes. 570 */ 571 Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() ; 572 573 /** A GdkPixbuf to display. 574 * 575 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 576 * or receive notification when the value of the property changes. 577 */ 578 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() const; 579 580 /** Filename to load and display. 581 * 582 * @return A PropertyProxy_WriteOnly that allows you to set the value of the property, 583 * or receive notification when the value of the property changes. 584 */ 585 Glib::PropertyProxy_WriteOnly< std::string > property_file() ; 586 587 588 /** Stock ID for a stock image to display. 589 * 590 * @return A PropertyProxy that allows you to get or set the value of the property, 591 * or receive notification when the value of the property changes. 592 */ 593 Glib::PropertyProxy< StockID > property_stock() ; 594 595 /** Stock ID for a stock image to display. 596 * 597 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 598 * or receive notification when the value of the property changes. 599 */ 600 Glib::PropertyProxy_ReadOnly< StockID > property_stock() const; 601 602 /** The name of the icon from the icon theme. 603 * 604 * @return A PropertyProxy that allows you to get or set the value of the property, 605 * or receive notification when the value of the property changes. 606 */ 607 Glib::PropertyProxy< Glib::ustring > property_icon_name() ; 608 609 /** The name of the icon from the icon theme. 610 * 611 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 612 * or receive notification when the value of the property changes. 613 */ 614 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_icon_name() const; 615 616 /** The GIcon being displayed. 617 * 618 * @return A PropertyProxy that allows you to get or set the value of the property, 619 * or receive notification when the value of the property changes. 620 */ 621 Glib::PropertyProxy< Glib::RefPtr<Gio::Icon> > property_gicon() ; 622 623 /** The GIcon being displayed. 624 * 625 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 626 * or receive notification when the value of the property changes. 627 */ 628 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::Icon> > property_gicon() const; 629 630 /** The representation being used for image data. 631 * 632 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 633 * or receive notification when the value of the property changes. 634 */ 635 Glib::PropertyProxy_ReadOnly< ImageType > property_storage_type() const; 636 637 638 /** The size of the icon. 639 * 640 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 641 * or receive notification when the value of the property changes. 642 */ 643 Glib::PropertyProxy_ReadOnly< int > property_size() const; 644 645 646 /** The screen where this status icon will be displayed. 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::Screen> > property_screen() ; 652 653 /** The screen where this status icon will be displayed. 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::Screen> > property_screen() const; 659 660 /** Whether or not the status icon is blinking. 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< bool > property_blinking() ; 666 667 /** Whether or not the status icon is blinking. 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< bool > property_blinking() const; 673 674 /** Whether or not the status icon is visible. 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_visible() ; 680 681 /** Whether or not the status icon is visible. 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_visible() const; 687 688 /** Whether or not the status icon is embedded. 689 * 690 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 691 * or receive notification when the value of the property changes. 692 */ 693 Glib::PropertyProxy_ReadOnly< bool > property_embedded() const; 694 695 696 /** The orientation of the tray. 697 * 698 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 699 * or receive notification when the value of the property changes. 700 */ 701 Glib::PropertyProxy_ReadOnly< Orientation > property_orientation() const; 702 703 704 /** Whether this tray icon has a tooltip. 705 * 706 * @return A PropertyProxy that allows you to get or set the value of the property, 707 * or receive notification when the value of the property changes. 708 */ 709 Glib::PropertyProxy< bool > property_has_tooltip() ; 710 711 /** Whether this tray icon has a tooltip. 712 * 713 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 714 * or receive notification when the value of the property changes. 715 */ 716 Glib::PropertyProxy_ReadOnly< bool > property_has_tooltip() const; 717 718 /** The contents of the tooltip for this widget. 719 * 720 * @return A PropertyProxy that allows you to get or set the value of the property, 721 * or receive notification when the value of the property changes. 722 */ 723 Glib::PropertyProxy< Glib::ustring > property_tooltip_text() ; 724 725 /** The contents of the tooltip for this widget. 726 * 727 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 728 * or receive notification when the value of the property changes. 729 */ 730 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_tooltip_text() const; 731 732 /** The contents of the tooltip for this tray icon. 733 * 734 * @return A PropertyProxy that allows you to get or set the value of the property, 735 * or receive notification when the value of the property changes. 736 */ 737 Glib::PropertyProxy< Glib::ustring > property_tooltip_markup() ; 738 739 /** The contents of the tooltip for this tray icon. 740 * 741 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 742 * or receive notification when the value of the property changes. 743 */ 744 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_tooltip_markup() const; 745 746 /** The title of this tray icon. 747 * 748 * @return A PropertyProxy that allows you to get or set the value of the property, 749 * or receive notification when the value of the property changes. 750 */ 751 Glib::PropertyProxy< Glib::ustring > property_title() ; 752 753 /** The title of this tray icon. 754 * 755 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 756 * or receive notification when the value of the property changes. 757 */ 758 Glib::PropertyProxy_ReadOnly< Glib::ustring > property_title() const; 759 760 761 /** 762 * @par Slot Prototype: 763 * <tt>bool on_my_%size_changed(int size)</tt> 764 * 765 */ 766 767 Glib::SignalProxy1< bool,int > signal_size_changed(); 768 769 770 //TODO: Remove no_default_handler when we can break ABI. 771 772 /** 773 * @par Slot Prototype: 774 * <tt>void on_my_%activate()</tt> 775 * 776 */ 777 778 Glib::SignalProxy0< void > signal_activate(); 779 780 781 /** 782 * @par Slot Prototype: 783 * <tt>void on_my_%popup_menu(guint button, guint32 activate_time)</tt> 784 * 785 */ 786 787 Glib::SignalProxy2< void,guint,guint32 > signal_popup_menu(); 788 789 790 /** 791 * @par Slot Prototype: 792 * <tt>bool on_my_%button_press_event(GdkEventButton* event)</tt> 793 * 794 */ 795 796 Glib::SignalProxy1< bool,GdkEventButton* > signal_button_press_event(); 797 798 799 /** 800 * @par Slot Prototype: 801 * <tt>bool on_my_%button_release_event(GdkEventButton* event)</tt> 802 * 803 */ 804 805 Glib::SignalProxy1< bool,GdkEventButton* > signal_button_release_event(); 806 807 808 /** 809 * @par Slot Prototype: 810 * <tt>bool on_my_%scroll_event(GdkEventScroll* event)</tt> 811 * 812 */ 813 814 Glib::SignalProxy1< bool,GdkEventScroll* > signal_scroll_event(); 815 816 817 /** 818 * @par Slot Prototype: 819 * <tt>bool on_my_%query_tooltip(int x, int y, bool keyboard_mode, const Glib::RefPtr<Tooltip>& tooltip)</tt> 820 * 821 */ 822 823 Glib::SignalProxy4< bool,int,int,bool,const Glib::RefPtr<Tooltip>& > signal_query_tooltip(); 824 825 826 public: 827 828 public: 829 //C++ methods used to invoke GTK+ virtual functions: 830 831 protected: 832 //GTK+ Virtual Functions (override these to change behaviour): 833 834 //Default Signal Handlers:: 835 /// This is a default handler for the signal signal_size_changed(). 836 virtual bool on_size_changed(int size); 837 838 839 }; 840 841 } // namespace Gtk 842 843 844 namespace Glib 845 { 846 /** A Glib::wrap() method for this object. 847 * 848 * @param object The C instance. 849 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 850 * @result A C++ instance that wraps this C instance. 851 * 852 * @relates Gtk::StatusIcon 853 */ 854 Glib::RefPtr<Gtk::StatusIcon> wrap(GtkStatusIcon* object, bool take_copy = false); 855 } 856 857 858 #endif /* _GTKMM_STATUSICON_H */ 859 860