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 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.
Subprograms
Icon factories
-
procedure Gtk_New (Widget : out Gtk_Icon_Factory);
procedure Initialize (Widget : access Gtk_Icon_Factory_Record'Class);
-
-
procedure Add_Default (Factory : access Gtk_Icon_Factory_Record);
-
procedure Remove_Default (Factory : access Gtk_Icon_Factory_Record);
Icon sets
-
function Gtk_New return Gtk_Icon_Set;
-
-
procedure Add
(Factory : access Gtk_Icon_Factory_Record;
Stock_Id : String;
Set : 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 Copy (Icon_Set : Gtk_Icon_Set) return Gtk_Icon_Set;
-
function Get_Sizes (Icon_Set : Gtk_Icon_Set) return Gint_Array;
-
function Ref (Icon_Set : Gtk_Icon_Set) return Gtk_Icon_Set;
function Unref (Icon_Set : Gtk_Icon_Set) return Gtk_Icon_Set;
-
Icon sources
-
function Gtk_New return Gtk_Icon_Source;
-
function Icon_Source_Copy (Source : Gtk_Icon_Source) return Gtk_Icon_Source;
-
-
-
procedure Add_Source
(Set : Gtk_Icon_Set;
Source : Gtk_Icon_Source);
-
procedure Free (Source : Gtk_Icon_Source);
-
procedure Set_Filename
(Source : Gtk_Icon_Source; Filename : String);
function Get_Filename (Source : Gtk_Icon_Source) return String;
-
-
-
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_State_Wildcarded
(Source : Gtk_Icon_Source; Setting : Boolean);
function Get_State_Wildcarded (Source : Gtk_Icon_Source) return Boolean;
-
Icon sizes
There are a number of predefined icon sizes (see
gtk-enums.ads). These
are used in the various gtk+ contexts. However, you can also define your
own icon sizes to use in your application.
-
-
-
-
-
-