Class: Gtk::StatusIcon
- Inherits:
-
Object
- Object
- Gtk::StatusIcon
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#embedded=(embedded) ⇒ TrueClass
true if the statusicon is embedded in a notification area.
-
#embedded? ⇒ TrueClass
true if the statusicon is embedded in a notification area.
-
#file=(file) ⇒ String
File.
-
#from_file=(filename) ⇒ nil
Makes status_icon display the file filename.
-
#from_gicon=(icon) ⇒ nil
Makes status_icon display the #GIcon.
-
#from_icon_name=(icon_name) ⇒ nil
Makes status_icon display the icon named icon_name from the current icon theme.
-
#from_pixbuf=(pixbuf) ⇒ nil
Makes status_icon display pixbuf.
-
#from_stock=(stock_id) ⇒ nil
Makes status_icon display the stock icon with the id stock_id.
-
#get_geometry(screen, area, orientation) ⇒ TrueClass
Obtains information about the location of the status icon on screen.
-
#gicon ⇒ Gio::Icon
The #GIcon displayed in the Gtk::StatusIcon.
-
#gicon=(gicon) ⇒ Gio::Icon
The #GIcon displayed in the Gtk::StatusIcon.
-
#has_tooltip ⇒ TrueClass
Returns the current value of the has-tooltip property.
-
#has_tooltip=(has_tooltip) ⇒ TrueClass
Enables or disables the emission of Gtk::StatusIcon::query-tooltip on status_icon.
-
#has_tooltip? ⇒ TrueClass
Enables or disables the emission of Gtk::StatusIcon::query-tooltip on status_icon.
-
#icon_name ⇒ String
Icon-name.
- #icon_name=(icon_name) ⇒ String
-
#is_embedded ⇒ TrueClass
Returns whether the status icon is embedded in a notification area.
-
#name=(name) ⇒ nil
Sets the name of this tray icon.
-
#new ⇒ Gtk::StatusIcon
Creates an empty status icon object.
-
#new_from_file(filename) ⇒ Gtk::StatusIcon
Creates a status icon displaying the file filename.
-
#new_from_gicon(icon) ⇒ Gtk::StatusIcon
Creates a status icon displaying a #GIcon.
-
#new_from_icon_name(icon_name) ⇒ Gtk::StatusIcon
Creates a status icon displaying an icon from the current icon theme.
-
#new_from_pixbuf(pixbuf) ⇒ Gtk::StatusIcon
Creates a status icon displaying pixbuf.
-
#new_from_stock(stock_id) ⇒ Gtk::StatusIcon
Creates a status icon displaying a stock icon.
-
#orientation ⇒ Gtk::Orientation
The orientation of the tray in which the statusicon is embedded.
-
#orientation=(orientation) ⇒ Gtk::Orientation
The orientation of the tray in which the statusicon is embedded.
-
#pixbuf ⇒ GdkPixbuf::Pixbuf
Pixbuf.
- #pixbuf=(pixbuf) ⇒ GdkPixbuf::Pixbuf
-
#screen ⇒ Gdk::Screen
Screen.
- #screen=(screen) ⇒ Gdk::Screen
-
#size ⇒ Integer
Size.
- #size=(size) ⇒ Integer
-
#stock ⇒ String
Stock.
- #stock=(stock) ⇒ String
-
#storage_type ⇒ Gtk::ImageType
Storage-type.
- #storage_type=(storage_type) ⇒ Gtk::ImageType
-
#title ⇒ String
The title of this tray icon.
-
#title=(title) ⇒ String
The title of this tray icon.
-
#tooltip_markup ⇒ String
Sets the text of tooltip to be the given string, which is marked up with the [Pango text markup language].
-
#tooltip_markup=(tooltip_markup) ⇒ String
Sets the text of tooltip to be the given string, which is marked up with the [Pango text markup language].
-
#tooltip_text ⇒ String
Sets the text of tooltip to be the given string.
-
#tooltip_text=(tooltip_text) ⇒ String
Sets the text of tooltip to be the given string.
-
#visible ⇒ TrueClass
Returns whether the status icon is visible or not.
- #visible=(visible) ⇒ TrueClass
-
#visible? ⇒ TrueClass
Visible.
-
#x11_window_id ⇒ Integer
This function is only useful on the X11/freedesktop.org platform.
Instance Method Details
#embedded=(embedded) ⇒ TrueClass
true if the statusicon is embedded in a notification area.
#embedded? ⇒ TrueClass
true if the statusicon is embedded in a notification area.
#file=(file) ⇒ String
Returns file.
#from_file=(filename) ⇒ nil
Makes status_icon display the file filename. See gtk_status_icon_new_from_file() for details.
#from_gicon=(icon) ⇒ nil
Makes status_icon display the #GIcon. See gtk_status_icon_new_from_gicon() for details.
#from_icon_name=(icon_name) ⇒ nil
Makes status_icon display the icon named icon_name from the current icon theme. See gtk_status_icon_new_from_icon_name() for details.
#from_pixbuf=(pixbuf) ⇒ nil
Makes status_icon display pixbuf. See gtk_status_icon_new_from_pixbuf() for details.
#from_stock=(stock_id) ⇒ nil
Makes status_icon display the stock icon with the id stock_id. See gtk_status_icon_new_from_stock() for details.
#get_geometry(screen, area, orientation) ⇒ TrueClass
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 gtk_status_icon_position_menu() for a more convenient alternative for positioning menus.
Note that some platforms do not allow GTK+ to provide this information, and even on platforms that do allow it, the information is not reliable unless the status icon is embedded in a notification area, see gtk_status_icon_is_embedded().
#gicon ⇒ Gio::Icon
The #GIcon displayed in the Gtk::StatusIcon. For themed icons, the image will be updated automatically if the theme changes.
#gicon=(gicon) ⇒ Gio::Icon
The #GIcon displayed in the Gtk::StatusIcon. For themed icons, the image will be updated automatically if the theme changes.
#has_tooltip ⇒ TrueClass
Returns the current value of the has-tooltip property. See Gtk::StatusIcon:has-tooltip for more information.
#has_tooltip=(has_tooltip) ⇒ TrueClass
Enables or disables the emission of Gtk::StatusIcon::query-tooltip on status_icon. A value of true indicates that status_icon can have a tooltip, in this case the status icon will be queried using Gtk::StatusIcon::query-tooltip to determine whether it will provide a tooltip or not.
Note that setting this property to true for the first time will change the event masks of the windows of this status icon to include leave-notify and motion-notify events. This will not be undone when the property is set to false again.
Whether this property is respected is platform dependent. For plain text tooltips, use Gtk::StatusIcon:tooltip-text in preference.
#has_tooltip? ⇒ TrueClass
Enables or disables the emission of Gtk::StatusIcon::query-tooltip on status_icon. A value of true indicates that status_icon can have a tooltip, in this case the status icon will be queried using Gtk::StatusIcon::query-tooltip to determine whether it will provide a tooltip or not.
Note that setting this property to true for the first time will change the event masks of the windows of this status icon to include leave-notify and motion-notify events. This will not be undone when the property is set to false again.
Whether this property is respected is platform dependent. For plain text tooltips, use Gtk::StatusIcon:tooltip-text in preference.
#icon_name ⇒ String
Returns icon-name.
#icon_name=(icon_name) ⇒ String
#is_embedded ⇒ TrueClass
Returns whether the status icon is embedded in a notification area.
#name=(name) ⇒ nil
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.
#new ⇒ Gtk::StatusIcon
Creates an empty status icon object.
#new_from_file(filename) ⇒ Gtk::StatusIcon
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.
#new_from_gicon(icon) ⇒ Gtk::StatusIcon
Creates a status icon displaying a #GIcon. If the icon is a themed icon, it will be updated when the theme changes.
#new_from_icon_name(icon_name) ⇒ Gtk::StatusIcon
Creates a status icon displaying an icon from the current icon theme. If the current icon theme is changed, the icon will be updated appropriately.
#new_from_pixbuf(pixbuf) ⇒ Gtk::StatusIcon
Creates a status icon displaying pixbuf.
The image will be scaled down to fit in the available space in the notification area, if necessary.
#new_from_stock(stock_id) ⇒ Gtk::StatusIcon
Creates a status icon displaying a stock icon. Sample stock icon names are #GTK_STOCK_OPEN, #GTK_STOCK_QUIT. You can register your own stock icon names, see gtk_icon_factory_add_default() and gtk_icon_factory_add().
#orientation ⇒ Gtk::Orientation
The orientation of the tray in which the statusicon is embedded.
#orientation=(orientation) ⇒ Gtk::Orientation
The orientation of the tray in which the statusicon is embedded.
#pixbuf ⇒ GdkPixbuf::Pixbuf
Returns pixbuf.
#pixbuf=(pixbuf) ⇒ GdkPixbuf::Pixbuf
#screen ⇒ Gdk::Screen
Returns screen.
#screen=(screen) ⇒ Gdk::Screen
#size ⇒ Integer
Returns size.
#size=(size) ⇒ Integer
#stock ⇒ String
Returns stock.
#stock=(stock) ⇒ String
#storage_type ⇒ Gtk::ImageType
Returns storage-type.
#storage_type=(storage_type) ⇒ Gtk::ImageType
#title ⇒ String
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.
#title=(title) ⇒ String
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.
#tooltip_markup ⇒ String
Sets the text of tooltip to be the given string, which is marked up with the [Pango text markup language]. Also see gtk_tooltip_set_markup().
This is a convenience property which will take care of getting the tooltip shown if the given string is not nil. Gtk::StatusIcon:has-tooltip will automatically be set to true and the default handler for the Gtk::StatusIcon::query-tooltip signal will take care of displaying the tooltip.
On some platforms, embedded markup will be ignored.
#tooltip_markup=(tooltip_markup) ⇒ String
Sets the text of tooltip to be the given string, which is marked up with the [Pango text markup language]. Also see gtk_tooltip_set_markup().
This is a convenience property which will take care of getting the tooltip shown if the given string is not nil. Gtk::StatusIcon:has-tooltip will automatically be set to true and the default handler for the Gtk::StatusIcon::query-tooltip signal will take care of displaying the tooltip.
On some platforms, embedded markup will be ignored.
#tooltip_text ⇒ String
Sets the text of tooltip to be the given string.
Also see gtk_tooltip_set_text().
This is a convenience property which will take care of getting the tooltip shown if the given string is not nil. Gtk::StatusIcon:has-tooltip will automatically be set to true and the default handler for the Gtk::StatusIcon::query-tooltip signal will take care of displaying the tooltip.
Note that some platforms have limitations on the length of tooltips that they allow on status icons, e.g. Windows only shows the first 64 characters.
#tooltip_text=(tooltip_text) ⇒ String
Sets the text of tooltip to be the given string.
Also see gtk_tooltip_set_text().
This is a convenience property which will take care of getting the tooltip shown if the given string is not nil. Gtk::StatusIcon:has-tooltip will automatically be set to true and the default handler for the Gtk::StatusIcon::query-tooltip signal will take care of displaying the tooltip.
Note that some platforms have limitations on the length of tooltips that they allow on status icons, e.g. Windows only shows the first 64 characters.
#visible ⇒ TrueClass
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 gtk_status_icon_is_embedded().
#visible=(visible) ⇒ TrueClass
#visible? ⇒ TrueClass
Returns visible.
#x11_window_id ⇒ Integer
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 gtk_status_icon_position_menu(). underlying X11 Window