IconSource

Constructors

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

Creates a new #GtkIconSource. A #GtkIconSource contains a #GdkPixbuf (or image filename) that serves as the base image for one or more of the icons in a #GtkIconSet, along with a specification for which icons in the icon set will be based on that pixbuf or image file. An icon set contains a set of icons that represent “the same” logical concept in different states, different global text directions, and different sizes.

Members

Functions

_cPtr
void* _cPtr(Flag!"Dup" dup)
copy
gtk.icon_source.IconSource copy()

Creates a copy of source; mostly useful for language bindings.

getDirection
gtk.types.TextDirection getDirection()

Obtains the text direction this icon source applies to. The return value is only useful/meaningful if the text direction is not wildcarded.

getDirectionWildcarded
bool getDirectionWildcarded()

Gets the value set by gtk.icon_source.IconSource.setDirectionWildcarded.

getFilename
string getFilename()

Retrieves the source filename, or null if none is set. The filename is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

getIconName
string getIconName()

Retrieves the source icon name, or null if none is set. The icon_name is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

getPixbuf
gdkpixbuf.pixbuf.Pixbuf getPixbuf()

Retrieves the source pixbuf, or null if none is set. In addition, if a filename source is in use, this function in some cases will return the pixbuf from loaded from the filename. This is, for example, true for the GtkIconSource passed to the #GtkStyle render_icon() virtual function. The reference count on the pixbuf is not incremented.

getSize
gtk.types.IconSize getSize()

Obtains the icon size this source applies to. The return value is only useful/meaningful if the icon size is not wildcarded.

getSizeWildcarded
bool getSizeWildcarded()

Gets the value set by gtk.icon_source.IconSource.setSizeWildcarded.

getState
gtk.types.StateType getState()

Obtains the widget state this icon source applies to. The return value is only useful/meaningful if the widget state is not wildcarded.

getStateWildcarded
bool getStateWildcarded()

Gets the value set by gtk.icon_source.IconSource.setStateWildcarded.

self
IconSource self()

Returns this, for use in with statements.

setDirection
void setDirection(gtk.types.TextDirection direction)

Sets the text direction this icon source is intended to be used with.

setDirectionWildcarded
void setDirectionWildcarded(bool setting)

If the text direction is wildcarded, this source can be used as the base image for an icon in any #GtkTextDirection. If the text direction is not wildcarded, then the text direction the icon source applies to should be set with gtk.icon_source.IconSource.setDirection, and the icon source will only be used with that text direction.

setFilename
void setFilename(string filename)

Sets the name of an image file to use as a base image when creating icon variants for #GtkIconSet. The filename must be absolute.

setIconName
void setIconName(string iconName)

Sets the name of an icon to look up in the current icon theme to use as a base image when creating icon variants for #GtkIconSet.

setPixbuf
void setPixbuf(gdkpixbuf.pixbuf.Pixbuf pixbuf)

Sets a pixbuf to use as a base image when creating icon variants for #GtkIconSet.

setSize
void setSize(gtk.types.IconSize size)

Sets the icon size this icon source is intended to be used with.

setSizeWildcarded
void setSizeWildcarded(bool setting)

If the icon size is wildcarded, this source can be used as the base image for an icon of any size. If the size is not wildcarded, then the size the source applies to should be set with gtk.icon_source.IconSource.setSize and the icon source will only be used with that specific size.

setState
void setState(gtk.types.StateType state)

Sets the widget state this icon source is intended to be used with.

setStateWildcarded
void setStateWildcarded(bool setting)

If the widget state is wildcarded, this source can be used as the base image for an icon in any #GtkStateType. If the widget state is not wildcarded, then the state the source applies to should be set with gtk.icon_source.IconSource.setState and the icon source will only be used with that specific state.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()

Inherited Members

From Boxed

_cInstancePtr
void* _cInstancePtr;

Pointer to the C boxed value

_getGType
GType _getGType()

Get the GType of this boxed type.

_gType
GType _gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

boxCopy
void* boxCopy()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.