Gtk.NumerableIcon¶
- Subclasses:
- None 
Methods¶
- Inherited:
- Structs:
| class | 
 | 
| class | 
 | 
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | 
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| r/w | The icon for the number emblem background | ||
| r/w | The icon name for the number emblem background | ||
| r/w | The count of the emblem currently displayed | ||
| r/w | The label to be displayed over the icon | ||
| r/w | The style context to theme the icon appearance | 
Signals¶
- Inherited:
Fields¶
- Inherited:
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | r | 
Class Details¶
- class Gtk.NumerableIcon(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - Gtk.NumerableIconis a subclass of- Gio.EmblemedIconthat can show a number or short string as an emblem. The number can be overlayed on top of another emblem, if desired.- It supports theming by taking font and color information from a provided - Gtk.StyleContext; see- Gtk.NumerableIcon.set_style_context().- Typical numerable icons: - classmethod new(base_icon)[source]¶
- Parameters:
- Returns:
- a new - Gio.Icon
- Return type:
 - Creates a new unthemed - Gtk.NumerableIcon.- New in version 3.0. - Deprecated since version 3.14. 
 - classmethod new_with_style_context(base_icon, context)[source]¶
- Parameters:
- context ( - Gtk.StyleContext) – a- Gtk.StyleContext
 
- Returns:
- a new - Gio.Icon
- Return type:
 - Creates a new - Gtk.NumerableIconwhich will themed according to the passed- Gtk.StyleContext. This is a convenience constructor that calls- Gtk.NumerableIcon.set_style_context() internally.- New in version 3.0. - Deprecated since version 3.14. 
 - get_background_gicon()[source]¶
- 
Returns the Gio.Iconthat was set as the base background image, orNoneif there’s none. The caller of this function does not own a reference to the returnedGio.Icon.New in version 3.0. Deprecated since version 3.14. 
 - get_background_icon_name()[source]¶
- 
Returns the icon name used as the base background image, or Noneif there’s none.New in version 3.0. Deprecated since version 3.14. 
 - get_count()[source]¶
- Returns:
- the currently displayed value 
- Return type:
 - Returns the value currently displayed by self. - New in version 3.0. - Deprecated since version 3.14. 
 - get_label()[source]¶
- 
Returns the currently displayed label of the icon, or None.New in version 3.0. Deprecated since version 3.14. 
 - get_style_context()[source]¶
- Returns:
- a - Gtk.StyleContext, or- None. This object is internal to GTK+ and should not be unreffed. Use- GObject.Object.ref() if you want to keep it around
- Return type:
 - Returns the - Gtk.StyleContextused by the icon for theming, or- Noneif there’s none.- New in version 3.0. - Deprecated since version 3.14. 
 - set_background_gicon(icon)[source]¶
- 
Updates the icon to use icon as the base background image. If icon is None, self will go back using style information or default theming for its background image.If this method is called and an icon name was already set as background for the icon, icon will be used, i.e. the last method called between Gtk.NumerableIcon.set_background_gicon() andGtk.NumerableIcon.set_background_icon_name() has always priority.New in version 3.0. Deprecated since version 3.14. 
 - set_background_icon_name(icon_name)[source]¶
- 
Updates the icon to use the icon named icon_name from the current icon theme as the base background image. If icon_name is None, self will go back using style information or default theming for its background image.If this method is called and a Gio.Iconwas already set as background for the icon, icon_name will be used, i.e. the last method called betweenGtk.NumerableIcon.set_background_icon_name() andGtk.NumerableIcon.set_background_gicon() has always priority.New in version 3.0. Deprecated since version 3.14. 
 - set_count(count)[source]¶
- Parameters:
- count ( - int) – a number between -99 and 99
 - Sets the currently displayed value of self to count. - The numeric value is always clamped to make it two digits, i.e. between -99 and 99. Setting a count of zero removes the emblem. If this method is called, and a label was already set on the icon, it will automatically be reset to - Nonebefore rendering the number, i.e. the last method called between- Gtk.NumerableIcon.set_count() and- Gtk.NumerableIcon.set_label() has always priority.- New in version 3.0. - Deprecated since version 3.14. 
 - set_label(label)[source]¶
- 
Sets the currently displayed value of self to the string in label. Setting an empty label removes the emblem. Note that this is meant for displaying short labels, such as roman numbers, or single letters. For roman numbers, consider using the Unicode characters U+2160 - U+217F. Strings longer than two characters will likely not be rendered very well. If this method is called, and a number was already set on the icon, it will automatically be reset to zero before rendering the label, i.e. the last method called between Gtk.NumerableIcon.set_label() andGtk.NumerableIcon.set_count() has always priority.New in version 3.0. Deprecated since version 3.14. 
 - set_style_context(style)[source]¶
- Parameters:
- style ( - Gtk.StyleContext) – a- Gtk.StyleContext
 - Updates the icon to fetch theme information from the given - Gtk.StyleContext.- New in version 3.0. - Deprecated since version 3.14. 
 
Property Details¶
- Gtk.NumerableIcon.props.background_icon¶
- 
The icon for the number emblem background 
- Gtk.NumerableIcon.props.background_icon_name¶
- 
The icon name for the number emblem background 
- Gtk.NumerableIcon.props.count¶
- 
The count of the emblem currently displayed 
- Gtk.NumerableIcon.props.label¶
- 
The label to be displayed over the icon 
- Gtk.NumerableIcon.props.style_context¶
- Name:
- style-context
- Type:
- Default Value:
- Flags:
 - The style context to theme the icon appearance