NumerableIcon

GtkNumerableIcon is a subclass of #GEmblemedIcon that 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 #GtkStyleContext; see gtk.numerable_icon.NumerableIcon.setStyleContext.

Typical numerable icons:

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Functions

getBackgroundGicon
gio.icon.Icon getBackgroundGicon()

Returns the #GIcon that was set as the base background image, or null if there’s none. The caller of this function does not own a reference to the returned #GIcon.

getBackgroundIconName
string getBackgroundIconName()

Returns the icon name used as the base background image, or null if there’s none.

getCount
int getCount()

Returns the value currently displayed by self.

getLabel
string getLabel()

Returns the currently displayed label of the icon, or null.

getStyleContext
gtk.style_context.StyleContext getStyleContext()

Returns the #GtkStyleContext used by the icon for theming, or null if there’s none.

self
NumerableIcon self()

Returns this, for use in with statements.

setBackgroundGicon
void setBackgroundGicon(gio.icon.Icon icon)

Updates the icon to use icon as the base background image. If icon is null, self will go back using style information or default theming for its background image.

setBackgroundIconName
void setBackgroundIconName(string iconName)

Updates the icon to use the icon named icon_name from the current icon theme as the base background image. If icon_name is null, self will go back using style information or default theming for its background image.

setCount
void setCount(int count)

Sets the currently displayed value of self to count.

setLabel
void setLabel(string label)

Sets the currently displayed value of self to the string in label. Setting an empty label removes the emblem.

setStyleContext
void setStyleContext(gtk.style_context.StyleContext style)

Updates the icon to fetch theme information from the given #GtkStyleContext.

Properties

_gType
GType _gType [@property getter]
backgroundIcon
gio.icon.Icon backgroundIcon [@property getter]
backgroundIcon
gio.icon.Icon backgroundIcon [@property setter]
backgroundIconName
string backgroundIconName [@property getter]
backgroundIconName
string backgroundIconName [@property setter]
count
int count [@property getter]
count
int count [@property setter]
label
string label [@property getter]
label
string label [@property setter]
styleContext
gtk.style_context.StyleContext styleContext [@property getter]
styleContext
gtk.style_context.StyleContext styleContext [@property setter]

Static functions

_getGType
GType _getGType()
builder
NumerableIconGidBuilder builder()

Get builder for gtk.numerable_icon.NumerableIcon

newWithStyleContext
gio.icon.Icon newWithStyleContext(gio.icon.Icon baseIcon, gtk.style_context.StyleContext context)

Creates a new #GtkNumerableIcon which will themed according to the passed #GtkStyleContext. This is a convenience constructor that calls gtk.numerable_icon.NumerableIcon.setStyleContext internally.

new_
gio.icon.Icon new_(gio.icon.Icon baseIcon)

Creates a new unthemed #GtkNumerableIcon.

Inherited Members

From EmblemedIcon

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
EmblemedIcon self()

Returns this, for use in with statements.

builder
EmblemedIconGidBuilder builder()

Get builder for gio.emblemed_icon.EmblemedIcon

gicon
gio.icon.Icon gicon [@property getter]

Get gicon property.

addEmblem
void addEmblem(gio.emblem.Emblem emblem)

Adds emblem to the #GList of #GEmblems.

clearEmblems
void clearEmblems()

Removes all the emblems from icon.

getEmblems
gio.emblem.Emblem[] getEmblems()

Gets the list of emblems for the icon.

getIcon
gio.icon.Icon getIcon()

Gets the main icon for emblemed.