Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gtk-Themeable-Stock-Images

Themeable Stock Images


Description

Manipulating stock icons

Methods and Functions

Hierarchy

GObject
   +----GtkIconFactory
GBoxed
   +----GtkIconSet

Interfaces

GtkIconFactory implements GtkBuildable.

Detailed Description

Browse the available stock icons in the list of stock IDs found here. You can also use the gtk-demo application for this purpose.

An icon factory manages a collection of GtkIconSet; a GtkIconSet manages a set of variants of a particular icon (i.e. a GtkIconSet contains variants for different sizes and widget states). Icons in an icon factory are named by a stock ID, which is a simple string identifying the icon. Each GtkStyle has a list of GtkIconFactory derived from the current theme; those icon factories are consulted first when searching for an icon. If the theme doesn't set a particular icon, GTK+ looks for the icon in a list of default icon factories, maintained by gtkIconFactoryAddDefault and gtkIconFactoryRemoveDefault. Applications with icons should add a default icon factory with their icons, which will allow themes to override the icons for the application.

To display an icon, always use gtkStyleLookupIconSet on the widget that will display the icon, or the convenience function gtkWidgetRenderIcon. These functions take the theme into account when looking up the icon to use for a given stock ID.

GtkIconFactory as GtkBuildable

GtkIconFactory supports a custom <sources> element, which can contain multiple <source> elements. The following attributes are allowed:

stock-id

The stock id of the source, a string. This attribute is mandatory

filename

The filename of the source, a string. This attribute is optional

icon-name

The icon name for the source, a string. This attribute is optional.

size

Size of the icon, a GtkIconSize enum value. This attribute is optional.

direction

Direction of the source, a GtkTextDirection enum value. This attribute is optional.

state

State of the source, a GtkStateType enum value. This attribute is optional.

A GtkIconFactory UI definition fragment.

<object class="GtkIconFactory" id="iconfactory1">
  <sources>
    <source stock-id="apple-red" filename="apple-red.png"/>
  </sources>
</object>
<object class="GtkWindow" id="window1">
  <child>
    <object class="GtkButton" id="apple_button">
      <property name="label">apple-red</property>
      <property name="use-stock">True</property>
    </object>
  </child>
</object>

Structures

GtkIconSource

undocumented

GtkIconFactory

undocumented

GtkIconSet

undocumented

Convenient Construction

gtkIconFactory is the equivalent of gtkIconFactoryNew.

Enums and Flags

GtkIconSize

undocumented

invalid

undocumented

menu

undocumented

small-toolbar

undocumented

large-toolbar

undocumented

button

undocumented

dnd

undocumented

dialog

undocumented

Author(s)

Derived by RGtkGen from GTK+ documentation

References


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.