Gtk::StatusIcon Class Reference

The "system tray" or notification area is normally used for transient icons that indicate some special state. More...

Inheritance diagram for Gtk::StatusIcon:
[legend]
Collaboration diagram for Gtk::StatusIcon:
[legend]

List of all members.

## Public Member Functions

virtual | ~StatusIcon ()
GtkStatusIcon* | gobj ()
| Provides access to the underlying C GObject.
const GtkStatusIcon* | gobj () const
| Provides access to the underlying C GObject.
GtkStatusIcon* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void | set (const Glib::RefPtr< Gdk::Pixbuf >& pixbuf)
| Makes status_icon display pixbuf.
void | set_from_file (const Glib::ustring& filename)
| Makes status_icon display the file filename.
void | set (const StockID& stock_id)
| Makes status_icon display the stock icon with the id stock_id.
void | set (const Glib::ustring& icon_name)
| Makes status_icon display the icon named icon_name from the current icon theme.
void | set (const Glib::RefPtr< const Gio::Icon >& icon)
| Makes status_icon display the Icon.
ImageType | get_storage_type () const
| Gets the type of representation being used by the Gtk::StatusIcon to store image data.
Glib::RefPtr< Gdk::Pixbuf > | get_pixbuf ()
| Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon.
Glib::RefPtr< const Gdk::Pixbuf > | get_pixbuf () const
| Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon.
StockID | get_stock () const
| Gets the id of the stock icon being displayed by the Gtk::StatusIcon.
Glib::ustring | get_icon_name () const
| Gets the name of the icon being displayed by the Gtk::StatusIcon.
Glib::RefPtr< Gio::Icon > | get_icon ()
| Retrieves the Icon being displayed by the Gtk::StatusIcon.
Glib::RefPtr< const Gio::Icon > | get_icon () const
| Retrieves the Icon being displayed by the Gtk::StatusIcon.
int | get_size () const
| Gets the size in pixels that is available for the image.
void | set_screen (const Glib::RefPtr< Gdk::Screen >& screen)
| Sets the Gdk::Screen where status_icon is displayed; if the icon is already mapped, it will be unmapped, and then remapped on the new screen.
Glib::RefPtr< Gdk::Screen > | get_screen ()
| Returns the Gdk::Screen associated with status_icon.
Glib::RefPtr< const Gdk::Screen > | get_screen () const
| Returns the Gdk::Screen associated with status_icon.
void | set_visible (bool visible=true)
| Shows or hides a status icon.
bool | get_visible () const
| Returns whether the status icon is visible or not.
bool | is_embedded () const
| Returns whether the status icon is embedded in a notification area.
void | popup_menu_at_position (Menu& menu, guint button, guint32 activate_time)
| Displays a menu aligned to the status icon, and makes it available for selection.
bool | get_geometry (Glib::RefPtr< Gdk::Screen >& screen, Gdk::Rectangle& area, Orientation& orientation)
| Obtains information about the location of the status icon on screen.
bool | get_has_tooltip () const
| Returns the current value of the has-tooltip property.
void | set_has_tooltip (bool has_tooltip=true)
| Sets the has-tooltip property on status_icon to has_tooltip.
Glib::ustring | get_tooltip_text () const
| Gets the contents of the tooltip for status_icon.
void | set_tooltip_text (const Glib::ustring& text)
| Sets text as the contents of the tooltip.
Glib::ustring | get_tooltip_markup () const
| Gets the contents of the tooltip for status_icon.
void | set_tooltip_markup (const Glib::ustring& markup)
| Sets markup as the contents of the tooltip, which is marked up with the .
void | set_title (const Glib::ustring& title)
| Sets the title of this tray icon.
Glib::ustring | get_title () const
| Gets the title of this tray icon.
void | set_name (const Glib::ustring& name)
| Sets the name of this tray icon.
guint32 | get_x11_window_id () const
| This function is only useful on the X11/freedesktop.org platform.
Glib::PropertyProxy < Glib::RefPtr< Gdk::Pixbuf > > | property_pixbuf ()
| A GdkPixbuf to display.
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Gdk::Pixbuf > > | property_pixbuf () const
| A GdkPixbuf to display.
Glib::PropertyProxy_WriteOnly < std::string > | property_file ()
| Filename to load and display.
Glib::PropertyProxy< StockID > | property_stock ()
| Stock ID for a stock image to display.
Glib::PropertyProxy_ReadOnly < StockID > | property_stock () const
| Stock ID for a stock image to display.
Glib::PropertyProxy < Glib::ustring > | property_icon_name ()
| The name of the icon from the icon theme.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_icon_name () const
| The name of the icon from the icon theme.
Glib::PropertyProxy < Glib::RefPtr< Gio::Icon > > | property_gicon ()
| The GIcon being displayed.
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Gio::Icon > > | property_gicon () const
| The GIcon being displayed.
Glib::PropertyProxy_ReadOnly < ImageType > | property_storage_type () const
| The representation being used for image data.
Glib::PropertyProxy_ReadOnly< int > | property_size () const
| The size of the icon.
Glib::PropertyProxy < Glib::RefPtr< Gdk::Screen > > | property_screen ()
| The screen where this status icon will be displayed.
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Gdk::Screen > > | property_screen () const
| The screen where this status icon will be displayed.
Glib::PropertyProxy< bool > | property_visible ()
| Whether the status icon is visible.
Glib::PropertyProxy_ReadOnly < bool > | property_visible () const
| Whether the status icon is visible.
Glib::PropertyProxy_ReadOnly < bool > | property_embedded () const
| Whether the status icon is embedded.
Glib::PropertyProxy_ReadOnly < Orientation > | property_orientation () const
| The orientation of the tray.
Glib::PropertyProxy< bool > | property_has_tooltip ()
| Whether this tray icon has a tooltip.
Glib::PropertyProxy_ReadOnly < bool > | property_has_tooltip () const
| Whether this tray icon has a tooltip.
Glib::PropertyProxy < Glib::ustring > | property_tooltip_text ()
| The contents of the tooltip for this widget.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_tooltip_text () const
| The contents of the tooltip for this widget.
Glib::PropertyProxy < Glib::ustring > | property_tooltip_markup ()
| The contents of the tooltip for this tray icon.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_tooltip_markup () const
| The contents of the tooltip for this tray icon.
Glib::PropertyProxy < Glib::ustring > | property_title ()
| The title of this tray icon.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_title () const
| The title of this tray icon.
Glib::SignalProxy1< bool, int > | signal_size_changed ()
Glib::SignalProxy0< void > | signal_activate ()
Glib::SignalProxy2< void, guint, guint32 > | signal_popup_menu ()
Glib::SignalProxy1< bool, GdkEventButton* > | signal_button_press_event ()
Glib::SignalProxy1< bool, GdkEventButton* > | signal_button_release_event ()
Glib::SignalProxy1< bool, GdkEventScroll* > | signal_scroll_event ()
Glib::SignalProxy4< bool, int, int, bool, const Glib::RefPtr < Tooltip >& > | signal_query_tooltip ()

## Static Public Member Functions

static Glib::RefPtr< StatusIcon > | create (const Glib::RefPtr< Gdk::Pixbuf >& pixbuf)
| Creates a new Gtk::StatusIcon object.
static Glib::RefPtr< StatusIcon > | create (const StockID& stock_id)
static Glib::RefPtr< StatusIcon > | create (const Glib::ustring& icon_name)
static Glib::RefPtr< StatusIcon > | create_from_file (const std::string& filename)
| Creates a status icon displaying the file filename.

## Protected Member Functions

| StatusIcon ()
| StatusIcon (const Glib::RefPtr< Gdk::Pixbuf >& pixbuf)
| StatusIcon (const StockID& stock)
| StatusIcon (const Glib::ustring& icon_name)
| StatusIcon (const Glib::RefPtr< const Gio::Icon >& icon)
virtual bool | on_size_changed (int size)
virtual void | on_activate ()
virtual void | on_popup_menu (guint button, guint32 activate_time)
virtual bool | on_button_press_event (GdkEventButton* event)
virtual bool | on_button_release_event (GdkEventButton* event)
virtual bool | on_scroll_event (GdkEventScroll* event)
virtual bool | on_query_tooltip (int x, int y, bool keyboard_mode, const Glib::RefPtr< Tooltip >& tooltip)

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gtk::StatusIcon > | wrap (GtkStatusIcon* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

The "system tray" or notification area is normally used for transient icons that indicate some special state.

For example, a system tray icon might appear to tell the user that they have new mail, or have an incoming instant message, or something along those lines. The basic idea is that creating an icon in the notification area is less annoying than popping up a dialog.

A StatusIcon object can be used to display an icon in a "system tray". The icon can have a tooltip, and the user can interact with it by activating it or popping up a context menu. Critical information should not solely be displayed in a StatusIcon, since it may not be visible (e.g. when the user doesn't have a notification area on his panel). This can be checked with is_embedded().

On X11, the implementation follows the freedesktop.org "System Tray" specification. Implementations of the "tray" side of this specification can be found e.g. in the GNOME and KDE panel applications.

Since gtkmm 2.10:

## Constructor & Destructor Documentation

virtual Gtk::StatusIcon::~StatusIcon | ( |  | ) | `[virtual]`

Gtk::StatusIcon::StatusIcon | ( |  | ) | `[protected]`

Gtk::StatusIcon::StatusIcon | ( | const Glib::RefPtr< Gdk::Pixbuf >& | pixbuf | ) | `[explicit, protected]`

Gtk::StatusIcon::StatusIcon | ( | const StockID& | stock | ) | `[explicit, protected]`

Gtk::StatusIcon::StatusIcon | ( | const Glib::ustring & | icon_name | ) | `[explicit, protected]`

Gtk::StatusIcon::StatusIcon | ( | const Glib::RefPtr< const Gio::Icon > & | icon | ) | `[explicit, protected]`

## Member Function Documentation

static Glib::RefPtr<StatusIcon> Gtk::StatusIcon::create | ( | const Glib::RefPtr< Gdk::Pixbuf >& | pixbuf | ) | `[static]`

Creates a new Gtk::StatusIcon object.

Returns:
  A Glib::RefPtr<> to a newly created Gtk::StatusIcon object.

static Glib::RefPtr<StatusIcon> Gtk::StatusIcon::create | ( | const StockID& | stock_id | ) | `[static]`

static Glib::RefPtr<StatusIcon> Gtk::StatusIcon::create | ( | const Glib::ustring & | icon_name | ) | `[static]`

static Glib::RefPtr<StatusIcon> Gtk::StatusIcon::create_from_file | ( | const std::string & | filename | ) | `[static]`

Creates a status icon displaying the file filename.

The image will be scaled down to fit in the available space in the notification area, if necessary.

Parameters:

  filename | A filename.

Returns:
  A new StatusIcon

Since gtkmm 2.10:

bool Gtk::StatusIcon::get_geometry | ( | Glib::RefPtr< Gdk::Screen >& | screen,
|  | Gdk::Rectangle& | area,
|  | Orientation& | orientation
| ) |  |

Obtains information about the location of the status icon on screen.

This information can be used to e.g. position popups like notification bubbles. See popup_menu_at_position() for a more convenient alternative for positioning menus.

Note that some platforms do not allow GTK+ to provide this information.

Parameters:

  screen,: | The screen.
  area | The area occupied by the status icon.
  orientation | The orientation of the panel in which the status icon is embedded. A panel at the top or bottom of the screen is horizontal, a panel at the left or right is vertical.

Returns:
  true if the location information has been filled in.

Since gtkmm 2.10:

bool Gtk::StatusIcon::get_has_tooltip | ( |  | ) | const

Returns the current value of the has-tooltip property.

See Gtk::StatusIcon:has-tooltip for more information.

Since gtkmm 2.16:

Returns:
  Current value of has-tooltip on status_icon.

Glib::RefPtr<Gio::Icon> Gtk::StatusIcon::get_icon | ( |  | ) |

Retrieves the Icon being displayed by the Gtk::StatusIcon.

The storage type of the status icon must be Gtk::IMAGE_EMPTY or Gtk::IMAGE_GICON (see get_storage_type()). The caller of this function does not own a reference to the returned Icon.

If this function fails, icon is left unchanged;

Since gtkmm 2.14:

Returns:
  The displayed icon, or `0` if the image is empty.

Glib::RefPtr<const Gio::Icon> Gtk::StatusIcon::get_icon | ( |  | ) | const

Retrieves the Icon being displayed by the Gtk::StatusIcon.

The storage type of the status icon must be Gtk::IMAGE_EMPTY or Gtk::IMAGE_GICON (see get_storage_type()). The caller of this function does not own a reference to the returned Icon.

If this function fails, icon is left unchanged;

Since gtkmm 2.14:

Returns:
  The displayed icon, or `0` if the image is empty.

Glib::ustring Gtk::StatusIcon::get_icon_name | ( |  | ) | const

Gets the name of the icon being displayed by the Gtk::StatusIcon.

The storage type of the status icon must be Gtk::IMAGE_EMPTY or Gtk::IMAGE_ICON_NAME (see get_storage_type()). The returned string is owned by the Gtk::StatusIcon and should not be freed or modified.

Since gtkmm 2.10:

Returns:
  Name of the displayed icon, or `0` if the image is empty.

Glib::RefPtr<Gdk::Pixbuf> Gtk::StatusIcon::get_pixbuf | ( |  | ) |

Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon.

The storage type of the status icon must be Gtk::IMAGE_EMPTY or Gtk::IMAGE_PIXBUF (see get_storage_type()). The caller of this function does not own a reference to the returned pixbuf.

Since gtkmm 2.10:

Returns:
  The displayed pixbuf, or `0` if the image is empty.

Glib::RefPtr<const Gdk::Pixbuf> Gtk::StatusIcon::get_pixbuf | ( |  | ) | const

Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon.

The storage type of the status icon must be Gtk::IMAGE_EMPTY or Gtk::IMAGE_PIXBUF (see get_storage_type()). The caller of this function does not own a reference to the returned pixbuf.

Since gtkmm 2.10:

Returns:
  The displayed pixbuf, or `0` if the image is empty.

Glib::RefPtr<Gdk::Screen> Gtk::StatusIcon::get_screen | ( |  | ) |

Returns the Gdk::Screen associated with status_icon.

Since gtkmm 2.12:

Returns:
  A Gdk::Screen.

Glib::RefPtr<const Gdk::Screen> Gtk::StatusIcon::get_screen | ( |  | ) | const

Returns the Gdk::Screen associated with status_icon.

Since gtkmm 2.12:

Returns:
  A Gdk::Screen.

int Gtk::StatusIcon::get_size | ( |  | ) | const

Gets the size in pixels that is available for the image.

Stock icons and named icons adapt their size automatically if the size of the notification area changes. For other storage types, the size-changed signal can be used to react to size changes.

Note that the returned size is only meaningful while the status icon is embedded (see is_embedded()).

Since gtkmm 2.10:

Returns:
  The size that is available for the image.

StockID Gtk::StatusIcon::get_stock | ( |  | ) | const

Gets the id of the stock icon being displayed by the Gtk::StatusIcon.

The storage type of the status icon must be Gtk::IMAGE_EMPTY or Gtk::IMAGE_STOCK (see get_storage_type()). The returned string is owned by the Gtk::StatusIcon and should not be freed or modified.

Since gtkmm 2.10:

Returns:
  Stock id of the displayed stock icon, or `0` if the image is empty.

ImageType Gtk::StatusIcon::get_storage_type | ( |  | ) | const

Gets the type of representation being used by the Gtk::StatusIcon to store image data.

If the Gtk::StatusIcon has no image data, the return value will be Gtk::IMAGE_EMPTY.

Since gtkmm 2.10:

Returns:
  The image representation being used.

Glib::ustring Gtk::StatusIcon::get_title | ( |  | ) | const

Gets the title of this tray icon.

See set_title().

Since gtkmm 2.18:

Returns:
  The title of the status icon.

Glib::ustring Gtk::StatusIcon::get_tooltip_markup | ( |  | ) | const

Gets the contents of the tooltip for status_icon.

Since gtkmm 2.16:

Returns:
  The tooltip text, or `0`. You should free the returned string with Glib::free() when done.

Glib::ustring Gtk::StatusIcon::get_tooltip_text | ( |  | ) | const

Gets the contents of the tooltip for status_icon.

Since gtkmm 2.16:

Returns:
  The tooltip text, or `0`. You should free the returned string with Glib::free() when done.

bool Gtk::StatusIcon::get_visible | ( |  | ) | const

Returns whether the status icon is visible or not.

Note that being visible does not guarantee that the user can actually see the icon, see also is_embedded().

Since gtkmm 2.10:

Returns:
  `true` if the status icon is visible.

guint32 Gtk::StatusIcon::get_x11_window_id | ( |  | ) | const

This function is only useful on the X11/freedesktop.org platform.

It returns a window ID for the widget in the underlying status icon implementation. This is useful for the Galago notification service, which can send a window ID in the protocol in order for the server to position notification windows pointing to a status icon reliably.

This function is not intended for other use cases which are more likely to be met by one of the non-X11 specific methods, such as position_menu().

Since gtkmm 2.14:

Returns:
  An 32 bit unsigned integer identifier for the underlying X11 Window.

const GtkStatusIcon* Gtk::StatusIcon::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GtkStatusIcon* Gtk::StatusIcon::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GtkStatusIcon* Gtk::StatusIcon::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

bool Gtk::StatusIcon::is_embedded | ( |  | ) | const

Returns whether the status icon is embedded in a notification area.

Since gtkmm 2.10:

Returns:
  `true` if the status icon is embedded in a notification area.

virtual void Gtk::StatusIcon::on_activate | ( |  | ) | `[protected, virtual]`

virtual bool Gtk::StatusIcon::on_button_press_event | ( | GdkEventButton * | event | ) | `[protected, virtual]`

virtual bool Gtk::StatusIcon::on_button_release_event | ( | GdkEventButton * | event | ) | `[protected, virtual]`

virtual void Gtk::StatusIcon::on_popup_menu | ( | guint | button,
|  | guint32 | activate_time
| ) |  | `[protected, virtual]`

virtual bool Gtk::StatusIcon::on_query_tooltip | ( | int | x,
|  | int | y,
|  | bool | keyboard_mode,
|  | const Glib::RefPtr< Tooltip >& | tooltip
| ) |  | `[protected, virtual]`

virtual bool Gtk::StatusIcon::on_scroll_event | ( | GdkEventScroll * | event | ) | `[protected, virtual]`

virtual bool Gtk::StatusIcon::on_size_changed | ( | int | size | ) | `[protected, virtual]`

void Gtk::StatusIcon::popup_menu_at_position | ( | Menu& | menu,
|  | guint | button,
|  | guint32 | activate_time
| ) |  |

Displays a menu aligned to the status icon, and makes it available for selection.

Applications can use this function to display context-sensitive menus.

This is equivalent to the gtk_status_icon_position_menu() helper callback in GTK+, which can be provided to gtk_menu_popup().

See Gtk::Menu::popup() for more details.

Parameters:

  menu | The menu to popup for the status icon.
  button | The mouse button which was pressed to initiate the event.
  activate_time | The time at which the activation event occurred.

Since gtkmm 2.12:

Glib::PropertyProxy_ReadOnly<bool> Gtk::StatusIcon::property_embedded | ( |  | ) | const

Whether the status icon is embedded.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly<std::string> Gtk::StatusIcon::property_file | ( |  | ) |

Filename to load and display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< Glib::RefPtr<Gio::Icon> > Gtk::StatusIcon::property_gicon | ( |  | ) |

The GIcon being displayed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::Icon> > Gtk::StatusIcon::property_gicon | ( |  | ) | const

The GIcon being displayed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::StatusIcon::property_has_tooltip | ( |  | ) | const

Whether this tray icon has a tooltip.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::StatusIcon::property_has_tooltip | ( |  | ) |

Whether this tray icon has a tooltip.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gtk::StatusIcon::property_icon_name | ( |  | ) |

The name of the icon from the icon theme.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::StatusIcon::property_icon_name | ( |  | ) | const

The name of the icon from the icon theme.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Orientation> Gtk::StatusIcon::property_orientation | ( |  | ) | const

The orientation of the tray.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Gtk::StatusIcon::property_pixbuf | ( |  | ) |

A GdkPixbuf to display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Gtk::StatusIcon::property_pixbuf | ( |  | ) | const

A GdkPixbuf to display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > Gtk::StatusIcon::property_screen | ( |  | ) |

The screen where this status icon will be displayed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > Gtk::StatusIcon::property_screen | ( |  | ) | const

The screen where this status icon will be displayed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::StatusIcon::property_size | ( |  | ) | const

The size of the icon.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<StockID> Gtk::StatusIcon::property_stock | ( |  | ) | const

Stock ID for a stock image to display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<StockID> Gtk::StatusIcon::property_stock | ( |  | ) |

Stock ID for a stock image to display.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<ImageType> Gtk::StatusIcon::property_storage_type | ( |  | ) | const

The representation being used for image data.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::StatusIcon::property_title | ( |  | ) | const

The title of this tray icon.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gtk::StatusIcon::property_title | ( |  | ) |

The title of this tray icon.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::StatusIcon::property_tooltip_markup | ( |  | ) | const

The contents of the tooltip for this tray icon.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gtk::StatusIcon::property_tooltip_markup | ( |  | ) |

The contents of the tooltip for this tray icon.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gtk::StatusIcon::property_tooltip_text | ( |  | ) |

The contents of the tooltip for this widget.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::StatusIcon::property_tooltip_text | ( |  | ) | const

The contents of the tooltip for this widget.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::StatusIcon::property_visible | ( |  | ) | const

Whether the status icon is visible.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::StatusIcon::property_visible | ( |  | ) |

Whether the status icon is visible.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::StatusIcon::set | ( | const Glib::RefPtr< Gdk::Pixbuf >& | pixbuf | ) |

Makes status_icon display pixbuf.

See new_from_pixbuf() for details.

Since gtkmm 2.10:

Parameters:

  pixbuf | A Gdk::Pixbuf or `0`.

void Gtk::StatusIcon::set | ( | const StockID& | stock_id | ) |

Makes status_icon display the stock icon with the id stock_id.

See new_from_stock() for details.

Since gtkmm 2.10:

Parameters:

  stock_id | A stock icon id.

void Gtk::StatusIcon::set | ( | const Glib::ustring & | icon_name | ) |

Makes status_icon display the icon named icon_name from the current icon theme.

See new_from_icon_name() for details.

Since gtkmm 2.10:

Parameters:

  icon_name | An icon name.

void Gtk::StatusIcon::set | ( | const Glib::RefPtr< const Gio::Icon > & | icon | ) |

Makes status_icon display the Icon.

See new_from_gicon() for details.

Since gtkmm 2.14:

Parameters:

  icon | A GIcon.

void Gtk::StatusIcon::set_from_file | ( | const Glib::ustring & | filename | ) |

Makes status_icon display the file filename.

See new_from_file() for details.

Since gtkmm 2.10:

Parameters:

  filename | A filename.

void Gtk::StatusIcon::set_has_tooltip | ( | bool | has_tooltip = `true` | ) |

Sets the has-tooltip property on status_icon to has_tooltip.

See Gtk::StatusIcon:has-tooltip for more information.

Since gtkmm 2.16:

Parameters:

  has_tooltip | Whether or not status_icon has a tooltip.

void Gtk::StatusIcon::set_name | ( | const Glib::ustring & | name | ) |

Sets the name of this tray icon.

This should be a string identifying this icon. It is may be used for sorting the icons in the tray and will not be shown to the user.

Since gtkmm 2.20:

Parameters:

  name | The name.

void Gtk::StatusIcon::set_screen | ( | const Glib::RefPtr< Gdk::Screen >& | screen | ) |

Sets the Gdk::Screen where status_icon is displayed; if the icon is already mapped, it will be unmapped, and then remapped on the new screen.

Since gtkmm 2.12:

Parameters:

  screen | A Gdk::Screen.

void Gtk::StatusIcon::set_title | ( | const Glib::ustring & | title | ) |

Sets the title of this tray icon.

This should be a short, human-readable, localized string describing the tray icon. It may be used by tools like screen readers to render the tray icon.

Since gtkmm 2.18:

Parameters:

  title | The title.

void Gtk::StatusIcon::set_tooltip_markup | ( | const Glib::ustring & | markup | ) |

Sets markup as the contents of the tooltip, which is marked up with the .

This function will take care of setting Gtk::StatusIcon:has-tooltip to `true` and of the default handler for the Gtk::StatusIcon::query-tooltip signal.

See also the Gtk::StatusIcon:tooltip-markup property and Gtk::Tooltip::set_markup().

Since gtkmm 2.16:

Parameters:

  markup | The contents of the tooltip for status_icon, or `0`.

void Gtk::StatusIcon::set_tooltip_text | ( | const Glib::ustring & | text | ) |

Sets text as the contents of the tooltip.

This function will take care of setting Gtk::StatusIcon:has-tooltip to `true` and of the default handler for the Gtk::StatusIcon::query-tooltip signal.

See also the Gtk::StatusIcon:tooltip-text property and Gtk::Tooltip::set_text().

Since gtkmm 2.16:

Parameters:

  text | The contents of the tooltip for status_icon.

void Gtk::StatusIcon::set_visible | ( | bool | visible = `true` | ) |

Shows or hides a status icon.

Since gtkmm 2.10:

Parameters:

  visible | `true` to show the status icon, `false` to hide it.

Glib::SignalProxy0< void > Gtk::StatusIcon::signal_activate | ( |  | ) |

Prototype:
  `void on_my_activate()`

Glib::SignalProxy1< bool,GdkEventButton* > Gtk::StatusIcon::signal_button_press_event | ( |  | ) |

Prototype:
  `bool on_my_button_press_event(GdkEventButton* event)`

Glib::SignalProxy1< bool,GdkEventButton* > Gtk::StatusIcon::signal_button_release_event | ( |  | ) |

Prototype:
  `bool on_my_button_release_event(GdkEventButton* event)`

Glib::SignalProxy2< void,guint,guint32 > Gtk::StatusIcon::signal_popup_menu | ( |  | ) |

Prototype:
  `void on_my_popup_menu(guint button, guint32 activate_time)`

Glib::SignalProxy4< bool,int,int,bool,const Glib::RefPtr<Tooltip>& > Gtk::StatusIcon::signal_query_tooltip | ( |  | ) |

Prototype:
  `bool on_my_query_tooltip(int x, int y, bool keyboard_mode, const Glib::RefPtr<Tooltip>& tooltip)`

Glib::SignalProxy1< bool,GdkEventScroll* > Gtk::StatusIcon::signal_scroll_event | ( |  | ) |

Prototype:
  `bool on_my_scroll_event(GdkEventScroll* event)`

Glib::SignalProxy1< bool,int > Gtk::StatusIcon::signal_size_changed | ( |  | ) |

Prototype:
  `bool on_my_size_changed(int size)`

## Friends And Related Function Documentation

Glib::RefPtr< Gtk::StatusIcon > wrap | ( | GtkStatusIcon * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gtkmm/statusicon.h