gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.NumerableIcon

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

newtype NumerableIcon Source #

Memory-managed wrapper type.

Constructors

NumerableIcon (ManagedPtr NumerableIcon) 

Instances

Instances details
Eq NumerableIcon Source # 
Instance details

Defined in GI.Gtk.Objects.NumerableIcon

GObject NumerableIcon Source # 
Instance details

Defined in GI.Gtk.Objects.NumerableIcon

ManagedPtrNewtype NumerableIcon Source # 
Instance details

Defined in GI.Gtk.Objects.NumerableIcon

Methods

toManagedPtr :: NumerableIcon -> ManagedPtr NumerableIcon

TypedObject NumerableIcon Source # 
Instance details

Defined in GI.Gtk.Objects.NumerableIcon

Methods

glibType :: IO GType

HasParentTypes NumerableIcon Source # 
Instance details

Defined in GI.Gtk.Objects.NumerableIcon

IsGValue (Maybe NumerableIcon) Source #

Convert NumerableIcon to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.NumerableIcon

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe NumerableIcon -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe NumerableIcon)

type ParentTypes NumerableIcon Source # 
Instance details

Defined in GI.Gtk.Objects.NumerableIcon

type ParentTypes NumerableIcon = '[EmblemedIcon, Object, Icon]

class (GObject o, IsDescendantOf NumerableIcon o) => IsNumerableIcon o Source #

Type class for types which can be safely cast to NumerableIcon, for instance with toNumerableIcon.

Instances

Instances details
(GObject o, IsDescendantOf NumerableIcon o) => IsNumerableIcon o Source # 
Instance details

Defined in GI.Gtk.Objects.NumerableIcon

toNumerableIcon :: (MonadIO m, IsNumerableIcon o) => o -> m NumerableIcon Source #

Cast to NumerableIcon, for types for which this is known to be safe. For general casts, use castTo.

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

No description available in the introspection data.

clearNumerableIconBackgroundIcon :: (MonadIO m, IsNumerableIcon o) => o -> m () Source #

Set the value of the “background-icon” property to Nothing. When overloading is enabled, this is equivalent to

clear #backgroundIcon

constructNumerableIconBackgroundIcon :: (IsNumerableIcon o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “background-icon” property. This is rarely needed directly, but it is used by new.

getNumerableIconBackgroundIcon :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe Icon) Source #

Get the value of the “background-icon” property. When overloading is enabled, this is equivalent to

get numerableIcon #backgroundIcon

setNumerableIconBackgroundIcon :: (MonadIO m, IsNumerableIcon o, IsIcon a) => o -> a -> m () Source #

Set the value of the “background-icon” property. When overloading is enabled, this is equivalent to

set numerableIcon [ #backgroundIcon := value ]

backgroundIconName

No description available in the introspection data.

clearNumerableIconBackgroundIconName :: (MonadIO m, IsNumerableIcon o) => o -> m () Source #

Set the value of the “background-icon-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #backgroundIconName

constructNumerableIconBackgroundIconName :: (IsNumerableIcon o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “background-icon-name” property. This is rarely needed directly, but it is used by new.

getNumerableIconBackgroundIconName :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe Text) Source #

Get the value of the “background-icon-name” property. When overloading is enabled, this is equivalent to

get numerableIcon #backgroundIconName

setNumerableIconBackgroundIconName :: (MonadIO m, IsNumerableIcon o) => o -> Text -> m () Source #

Set the value of the “background-icon-name” property. When overloading is enabled, this is equivalent to

set numerableIcon [ #backgroundIconName := value ]

count

No description available in the introspection data.

constructNumerableIconCount :: (IsNumerableIcon o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “count” property. This is rarely needed directly, but it is used by new.

getNumerableIconCount :: (MonadIO m, IsNumerableIcon o) => o -> m Int32 Source #

Get the value of the “count” property. When overloading is enabled, this is equivalent to

get numerableIcon #count

setNumerableIconCount :: (MonadIO m, IsNumerableIcon o) => o -> Int32 -> m () Source #

Set the value of the “count” property. When overloading is enabled, this is equivalent to

set numerableIcon [ #count := value ]

label

No description available in the introspection data.

clearNumerableIconLabel :: (MonadIO m, IsNumerableIcon o) => o -> m () Source #

Set the value of the “label” property to Nothing. When overloading is enabled, this is equivalent to

clear #label

constructNumerableIconLabel :: (IsNumerableIcon o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “label” property. This is rarely needed directly, but it is used by new.

getNumerableIconLabel :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe Text) Source #

Get the value of the “label” property. When overloading is enabled, this is equivalent to

get numerableIcon #label

setNumerableIconLabel :: (MonadIO m, IsNumerableIcon o) => o -> Text -> m () Source #

Set the value of the “label” property. When overloading is enabled, this is equivalent to

set numerableIcon [ #label := value ]

styleContext

No description available in the introspection data.

constructNumerableIconStyleContext :: (IsNumerableIcon o, MonadIO m, IsStyleContext a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “style-context” property. This is rarely needed directly, but it is used by new.

getNumerableIconStyleContext :: (MonadIO m, IsNumerableIcon o) => o -> m (Maybe StyleContext) Source #

Get the value of the “style-context” property. When overloading is enabled, this is equivalent to

get numerableIcon #styleContext

setNumerableIconStyleContext :: (MonadIO m, IsNumerableIcon o, IsStyleContext a) => o -> a -> m () Source #

Set the value of the “style-context” property. When overloading is enabled, this is equivalent to

set numerableIcon [ #styleContext := value ]