gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.NumerableIcon

Contents

Description

GtkNumerableIcon is a subclass of EmblemedIcon 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 StyleContext; see numerableIconSetStyleContext.

Typical numerable icons:

Synopsis

Exported types

Methods

getBackgroundGicon

numerableIconGetBackgroundGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> m (Maybe Icon)

Returns: a Icon, or Nothing

Deprecated: (Since version 3.14)

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

Since: 3.0

getBackgroundIconName

numerableIconGetBackgroundIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> m (Maybe Text)

Returns: an icon name, or Nothing

Deprecated: (Since version 3.14)

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

Since: 3.0

getCount

numerableIconGetCount Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> m Int32

Returns: the currently displayed value

Deprecated: (Since version 3.14)

Returns the value currently displayed by self.

Since: 3.0

getLabel

numerableIconGetLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> m (Maybe Text)

Returns: the currently displayed label

Deprecated: (Since version 3.14)

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

Since: 3.0

getStyleContext

numerableIconGetStyleContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> m (Maybe StyleContext)

Returns: a StyleContext, or Nothing. This object is internal to GTK+ and should not be unreffed. Use objectRef if you want to keep it around

Deprecated: (Since version 3.14)

Returns the StyleContext used by the icon for theming, or Nothing if there’s none.

Since: 3.0

new

numerableIconNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsIcon a) 
=> a

baseIcon: a Icon to overlay on

-> m Icon

Returns: a new Icon

Deprecated: (Since version 3.14)

Creates a new unthemed NumerableIcon.

Since: 3.0

newWithStyleContext

numerableIconNewWithStyleContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsIcon a, IsStyleContext b) 
=> a

baseIcon: a Icon to overlay on

-> b

context: a StyleContext

-> m Icon

Returns: a new Icon

Deprecated: (Since version 3.14)

Creates a new NumerableIcon which will themed according to the passed StyleContext. This is a convenience constructor that calls numerableIconSetStyleContext internally.

Since: 3.0

setBackgroundGicon

numerableIconSetBackgroundGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a, IsIcon b) 
=> a

self: a NumerableIcon

-> Maybe b

icon: a Icon, or Nothing

-> m () 

Deprecated: (Since version 3.14)

Updates the icon to use icon as the base background image. If icon is Nothing, 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 numerableIconSetBackgroundGicon and numerableIconSetBackgroundIconName has always priority.

Since: 3.0

setBackgroundIconName

numerableIconSetBackgroundIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> Maybe Text

iconName: an icon name, or Nothing

-> m () 

Deprecated: (Since version 3.14)

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

If this method is called and a Icon was already set as background for the icon, iconName will be used, i.e. the last method called between numerableIconSetBackgroundIconName and numerableIconSetBackgroundGicon has always priority.

Since: 3.0

setCount

numerableIconSetCount Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> Int32

count: a number between -99 and 99

-> m () 

Deprecated: (Since version 3.14)

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 Nothing before rendering the number, i.e. the last method called between numerableIconSetCount and numerableIconSetLabel has always priority.

Since: 3.0

setLabel

numerableIconSetLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a) 
=> a

self: a NumerableIcon

-> Maybe Text

label: a short label, or Nothing

-> m () 

Deprecated: (Since version 3.14)

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 numerableIconSetLabel and numerableIconSetCount has always priority.

Since: 3.0

setStyleContext

numerableIconSetStyleContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsNumerableIcon a, IsStyleContext b) 
=> a

self: a NumerableIcon

-> b

style: a StyleContext

-> m () 

Deprecated: (Since version 3.14)

Updates the icon to fetch theme information from the given StyleContext.

Since: 3.0

Properties

backgroundIcon

data NumerableIconBackgroundIconPropertyInfo Source #

Instances

AttrInfo NumerableIconBackgroundIconPropertyInfo Source # 
type AttrOrigin NumerableIconBackgroundIconPropertyInfo Source # 
type AttrLabel NumerableIconBackgroundIconPropertyInfo Source # 
type AttrGetType NumerableIconBackgroundIconPropertyInfo Source # 
type AttrBaseTypeConstraint NumerableIconBackgroundIconPropertyInfo Source # 
type AttrSetTypeConstraint NumerableIconBackgroundIconPropertyInfo Source # 
type AttrAllowedOps NumerableIconBackgroundIconPropertyInfo Source # 

backgroundIconName

data NumerableIconBackgroundIconNamePropertyInfo Source #

Instances

AttrInfo NumerableIconBackgroundIconNamePropertyInfo Source # 
type AttrOrigin NumerableIconBackgroundIconNamePropertyInfo Source # 
type AttrLabel NumerableIconBackgroundIconNamePropertyInfo Source # 
type AttrGetType NumerableIconBackgroundIconNamePropertyInfo Source # 
type AttrBaseTypeConstraint NumerableIconBackgroundIconNamePropertyInfo Source # 
type AttrSetTypeConstraint NumerableIconBackgroundIconNamePropertyInfo Source # 
type AttrAllowedOps NumerableIconBackgroundIconNamePropertyInfo Source # 

count

data NumerableIconCountPropertyInfo Source #

Instances

AttrInfo NumerableIconCountPropertyInfo Source # 
type AttrOrigin NumerableIconCountPropertyInfo Source # 
type AttrLabel NumerableIconCountPropertyInfo Source # 
type AttrGetType NumerableIconCountPropertyInfo Source # 
type AttrBaseTypeConstraint NumerableIconCountPropertyInfo Source # 
type AttrSetTypeConstraint NumerableIconCountPropertyInfo Source # 
type AttrAllowedOps NumerableIconCountPropertyInfo Source # 

label

data NumerableIconLabelPropertyInfo Source #

Instances

AttrInfo NumerableIconLabelPropertyInfo Source # 
type AttrOrigin NumerableIconLabelPropertyInfo Source # 
type AttrLabel NumerableIconLabelPropertyInfo Source # 
type AttrGetType NumerableIconLabelPropertyInfo Source # 
type AttrBaseTypeConstraint NumerableIconLabelPropertyInfo Source # 
type AttrSetTypeConstraint NumerableIconLabelPropertyInfo Source # 
type AttrAllowedOps NumerableIconLabelPropertyInfo Source # 

styleContext

data NumerableIconStyleContextPropertyInfo Source #

Instances

AttrInfo NumerableIconStyleContextPropertyInfo Source # 
type AttrOrigin NumerableIconStyleContextPropertyInfo Source # 
type AttrLabel NumerableIconStyleContextPropertyInfo Source # 
type AttrGetType NumerableIconStyleContextPropertyInfo Source # 
type AttrBaseTypeConstraint NumerableIconStyleContextPropertyInfo Source # 
type AttrSetTypeConstraint NumerableIconStyleContextPropertyInfo Source # 
type AttrAllowedOps NumerableIconStyleContextPropertyInfo Source #