Package: gtk
Class gtk:icon-factory
Superclassesgtk:buildable, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct Slots
None
Details An icon factory manages a collection of gtk:icon-set instances. A gtk:icon-set instance manages a set of variants of a particular icon, i.e. a gtk:icon-set instance 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 object has a list of gtk:icon-factory objects derived from the current theme.
Those icon factories are consulted first when searching for an icon. If the
theme does not set a particular icon, GTK looks for the icon in a list of default icon factories, maintained by the gtk:icon-factory-add-default and gtk:icon-factory-remove-default functions. 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, use the gtk:widget-render-icon function on the widget that will display the icon. This function takes the theme into account when looking up the icon to use for a given stock ID. GtkIconFactory as GtkBuildable
<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> | Inherited Slot Access FunctionsSee also |
#2023-3-27