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_set_style_context().

Typical numerable icons:

Constructors

this
this(GtkNumerableIcon* gtkNumerableIcon, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(IconIF baseIcon)

Creates a new unthemed #GtkNumerableIcon.

this
this(IconIF baseIcon, StyleContext context)

Creates a new #GtkNumerableIcon which will themed according to the passed #GtkStyleContext. This is a convenience constructor that calls gtk_numerable_icon_set_style_context() internally.

Members

Functions

getBackgroundGicon
IconIF 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.

getNumerableIconStruct
GtkNumerableIcon* getNumerableIconStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getStyleContext
StyleContext getStyleContext()

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

setBackgroundGicon
void setBackgroundGicon(IconIF 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(StyleContext style)

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

Static functions

getType
GType getType()

Variables

gtkNumerableIcon
GtkNumerableIcon* gtkNumerableIcon;

the main Gtk struct

Inherited Members

From EmblemedIcon

gEmblemedIcon
GEmblemedIcon* gEmblemedIcon;

the main Gtk struct

getEmblemedIconStruct
GEmblemedIcon* getEmblemedIconStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

__anonymous
mixin IconT!(GEmblemedIcon)
Undocumented in source.
getType
GType getType()
addEmblem
void addEmblem(Emblem emblem)

Adds @emblem to the #GList of #GEmblems.

clearEmblems
void clearEmblems()

Removes all the emblems from @icon.

getEmblems
ListG getEmblems()

Gets the list of emblems for the @icon.

getIcon
IconIF getIcon()

Gets the main icon for @emblemed.

Meta