type Gtk_Icon_Factory_Record is new Glib.Object.GObject_Record with private;
type Gtk_Icon_Factory is access all Gtk_Icon_Factory_Record'Class;
type Gtk_Icon_Set is new Glib.C_Proxy;
type Gtk_Icon_Source is new Glib.C_Proxy;
procedure Gtk_New
| ( | Widget | : out Gtk_Icon_Factory); |
procedure Initialize
| ( | Widget | : access Gtk_Icon_Factory_Record'Class); |
function Get_Type return Glib.GType;
procedure Add_Default
| ( | Factory | : access Gtk_Icon_Factory_Record); |
procedure Remove_Default
| ( | Factory | : access Gtk_Icon_Factory_Record); |
function Gtk_New
| ( | Pixbuf | : Gdk.Pixbuf.Gdk_Pixbuf) return Gtk_Icon_Set; |
procedure Add
| ( | Factory | : access Gtk_Icon_Factory_Record; |
| Stock_Id | : String; | |
| Set | : Gtk_Icon_Set); |
function Lookup_Icon_Set
| ( | Style | : access Gtk.Style.Gtk_Style_Record'Class; |
| Stock_Id | : String) return Gtk_Icon_Set; |
function Lookup
| ( | Factory | : access Gtk_Icon_Factory_Record; |
| Stock_Id | : String) return Gtk_Icon_Set; |
function Lookup_Default
| ( | Stock_Id | : String) return Gtk_Icon_Set; |
function Icon_Set_Get_Type return Glib.GType;
function Copy
| ( | Icon_Set | : Gtk_Icon_Set) return Gtk_Icon_Set; |
function Get_Sizes
| ( | Icon_Set | : Gtk_Icon_Set) return Gint_Array; |
procedure Ref
| ( | Icon_Set | : Gtk_Icon_Set); |
procedure Unref
| ( | Icon_Set | : Gtk_Icon_Set); |
function Render_Icon
| ( | Icon_Set | : Gtk_Icon_Set; |
| Style | : access Gtk.Style.Gtk_Style_Record'Class; | |
| Direction | : Gtk.Enums.Gtk_Text_Direction; | |
| State | : Gtk.Enums.Gtk_State_Type; | |
| Size | : Gtk.Enums.Gtk_Icon_Size; | |
| Widget | : Gtk.Widget.Gtk_Widget := null; | |
| Detail | : String := "") return Gdk.Pixbuf.Gdk_Pixbuf; |
function Icon_Source_Copy
| ( | Source | : Gtk_Icon_Source) return Gtk_Icon_Source; |
function Icon_Source_Get_Type return Glib.GType;
function Render_Icon
| ( | Style | : access Gtk.Style.Gtk_Style_Record'Class; |
| Source | : Gtk.Icon_Factory.Gtk_Icon_Source; | |
| Direction | : Gtk.Enums.Gtk_Text_Direction; | |
| State | : Gtk.Enums.Gtk_State_Type; | |
| Size | : Gtk.Enums.Gtk_Icon_Size; | |
| Widget | : Gtk.Widget.Gtk_Widget := null; | |
| Detail | : String := "") return Gdk.Pixbuf.Gdk_Pixbuf; |
procedure Add_Source
| ( | Set | : Gtk_Icon_Set; |
| Source | : Gtk_Icon_Source); |
procedure Set_Filename
| ( | Source | : Gtk_Icon_Source; |
| Filename | : String); |
function Get_Filename
| ( | Source | : Gtk_Icon_Source) return String; |
procedure Set_Pixbuf
| ( | Source | : Gtk_Icon_Source; |
| Pixbuf | : Gdk.Pixbuf.Gdk_Pixbuf); |
function Get_Pixbuf
| ( | Source | : Gtk_Icon_Source) return Gdk.Pixbuf.Gdk_Pixbuf; |
procedure Set_Size
| ( | Source | : Gtk_Icon_Source; |
| Size | : Gtk.Enums.Gtk_Icon_Size); |
function Get_Size
| ( | Source | : Gtk_Icon_Source) return Gtk.Enums.Gtk_Icon_Size; |
procedure Set_Icon_Name
| ( | Source | : Gtk_Icon_Source; |
| Icon_Name | : String); |
function Get_Icon_Name
| ( | Source | : Gtk_Icon_Source) return String; |
procedure Set_Size_Wildcarded
| ( | Source | : Gtk_Icon_Source; |
| Wildcarded | : Boolean); |
function Get_Size_Wildcarded
| ( | Source | : Gtk_Icon_Source) return Boolean; |
procedure Set_Direction_Wildcarded
| ( | Source | : Gtk_Icon_Source; |
| Setting | : Boolean); |
function Get_Direction_Wildcarded
| ( | Source | : Gtk_Icon_Source) return Boolean; |
procedure Set_Direction
| ( | Source | : Gtk_Icon_Source; |
| Direction | : Gtk.Enums.Gtk_Text_Direction); |
function Get_Direction
| ( | Source | : Gtk_Icon_Source) return Gtk.Enums.Gtk_Text_Direction; |
procedure Set_State_Wildcarded
| ( | Source | : Gtk_Icon_Source; |
| Setting | : Boolean); |
function Get_State_Wildcarded
| ( | Source | : Gtk_Icon_Source) return Boolean; |
procedure Set_State
| ( | Source | : Gtk_Icon_Source; |
| State | : Gtk.Enums.Gtk_State_Type); |
function Get_State
| ( | Source | : Gtk_Icon_Source) return Gtk.Enums.Gtk_State_Type; |
function Icon_Size_From_Name
| ( | Name | : String) return Gtk.Enums.Gtk_Icon_Size; |
function Icon_Size_Get_Name
| ( | Size | : Gtk.Enums.Gtk_Icon_Size) return String; |
procedure Icon_Size_Lookup
| ( | Size | : Gtk.Enums.Gtk_Icon_Size; |
| Width, Height | : out Gint); |
procedure Icon_Size_Lookup_For_Settings
| ( | Settings | : access Gtk.Settings.Gtk_Settings_Record'Class; |
| Size | : Gtk.Enums.Gtk_Icon_Size; | |
| Width | : out Gint; | |
| Height | : out Gint); |
function Icon_Size_Register
| ( | Name | : String; |
| Width | : Gint; | |
| Height | : Gint) return Gtk.Enums.Gtk_Icon_Size; |
procedure Icon_Size_Register_Alias
| ( | Alias | : String; |
| Target | : Gtk.Enums.Gtk_Icon_Size); |
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 Gtk_Icon_Set; a Gtk_Icon_Set manages set of variants of a particular icon (i.e. a Gtk_Icon_Set 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 Gtk_Style has a list of Gtk_Icon_Factory 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 gtk.icon_factory.add_default and gtk.icon_factory.remove_default. Applications with icons should add default icon factory with their icons, which will allow themes to override the icons for the application.
To display an icon, always use Lookup_Icon_Set on the widget that will display the icon, or the convenience function Gtk.Widget.Render_Icon.
These functions take the theme into account when looking up the icon to use for a given stock ID.
Binding from C File version 2.8.17
<see>Gtk.Icon_Theme</see>