Toc Gallery Index Tree Gtk.Image

Screenshot

No screeshot

Hierarchy

Description

The Gtk_Image widget displays a graphical image. The image is typically created using Gdk.Image.Gdk_New.

The pixels in a Gtk_Image may be manipulated by the application after creation, as Gtk_Image store the pixel data on the client side. If you wish to store the pixel data on the server side (thus not allowing manipulation of the data after creation) you should use Gtk_Pixmap.

Types

  • type Gtk_Image is access all Gtk_Image_Record'Class;
  • type Gtk_Image_Record is new Gtk.Misc.Gtk_Misc_Record with private;
  • type Gtk_Image_Type is (Image_Empty, Image_Pixmap, Image_Image, Image_Pixbuf, Image_Stock, Image_Icon_Set, Image_Animation);
  • type Property_Image_Type is new Image_Type_Properties.Property;

Subprograms

  • procedure Gtk_New (Image : out Gtk_Image);
    procedure Initialize (Image : access Gtk_Image_Record'Class);
    Creates a new empty image
  • procedure Gtk_New (Image : out Gtk_Image; Val : Gdk.Image.Gdk_Image; Mask : Gdk.Bitmap.Gdk_Bitmap);
    procedure Initialize (Image : access Gtk_Image_Record'Class; Val : Gdk.Image.Gdk_Image; Mask : Gdk.Bitmap.Gdk_Bitmap);
    Creates or initializes an image
  • procedure Gtk_New (Image : out Gtk_Image; Pixmap : Gdk.Pixmap.Gdk_Pixmap; Mask : Gdk.Bitmap.Gdk_Bitmap);
    procedure Initialize (Image : access Gtk_Image_Record'Class; Pixmap : Gdk.Pixmap.Gdk_Pixmap; Mask : Gdk.Bitmap.Gdk_Bitmap);
    Creates or initializes an image from its components
  • procedure Gtk_New (Image : out Gtk_Image; Filename : String);
    procedure Initialize (Image : access Gtk_Image_Record'Class; Filename : String);
    Creates or initializes an image from a file
  • procedure Gtk_New (Image : out Gtk_Image; Pixbuf : Gdk.Pixbuf.Gdk_Pixbuf);
    procedure Initialize (Image : access Gtk_Image_Record'Class; Pixbuf : Gdk.Pixbuf.Gdk_Pixbuf);
    Creates or initializes an image from an existing pixbuf
  • procedure Gtk_New (Image : out Gtk_Image; Stock_Id : String; Size : Gtk.Enums.Gtk_Icon_Size);
    procedure Initialize (Image : access Gtk_Image_Record'Class; Stock_Id : String; Size : Gtk.Enums.Gtk_Icon_Size);
    Creates or initializes an image from one of the predefined images of gtk+ (see gtk-stock.ads). The image will be scaled to the appropriate format.
  • procedure Gtk_New (Image : out Gtk_Image; Icon_Set : Gtk.Icon_Factory.Gtk_Icon_Set; Size : Gtk.Enums.Gtk_Icon_Size);
    procedure Initialize (Image : access Gtk_Image_Record'Class; Icon_Set : Gtk.Icon_Factory.Gtk_Icon_Set; Size : Gtk.Enums.Gtk_Icon_Size);
    Creates or initializes an image from a set of icons
  • procedure Gtk_New (Image : out Gtk_Image; Animation : Gdk.Pixbuf.Gdk_Pixbuf_Animation);
    procedure Initialize (Image : access Gtk_Image_Record'Class; Animation : Gdk.Pixbuf.Gdk_Pixbuf_Animation);
    Create or initializes a GtkImage displaying the given animation.
  • procedure Gtk_New_From_Icon_Name (Image : out Gtk_Image; Icon_Name : String; Size : Gtk.Enums.Gtk_Icon_Size);
    procedure Initialize_From_Icon_Name (Image : access Gtk_Image_Record'Class; Icon_Name : String; Size : Gtk.Enums.Gtk_Icon_Size);
    Creates or initialized an image displaying an icon from the current icon theme. If the icon name isn't known, a "broken image" icon will be displayed instead. If the current icon theme is changed, the icon will be updated appropriately.
  • function Get_Type return Glib.GType;
    Return the internal value associated with a Gtk_Image.
  • procedure Set (Image : access Gtk_Image_Record; Pixmap : Gdk.Pixmap.Gdk_Pixmap; Mask : Gdk.Bitmap.Gdk_Bitmap);
    procedure Get (Image : access Gtk_Image_Record; Pixmap : out Gdk.Pixmap.Gdk_Pixmap; Mask : out Gdk.Bitmap.Gdk_Bitmap);
    Set or Get the values of a Gtk_Image. Mask indicates which parts of the image should be transparent.
  • procedure Set (Image : access Gtk_Image_Record; Val : Gdk.Image.Gdk_Image; Mask : Gdk.Bitmap.Gdk_Bitmap);
    procedure Get (Image : access Gtk_Image_Record; Val : out Gdk.Image.Gdk_Image; Mask : out Gdk.Bitmap.Gdk_Bitmap);
    Set or Get the value of a Gtk_Image. Mask indicates which parts of the image should be transparent.
  • procedure Set (Image : access Gtk_Image_Record; File : String);
  • procedure Set (Image : access Gtk_Image_Record; Pixbuf : Gdk.Pixbuf.Gdk_Pixbuf);
    function Get (Image : access Gtk_Image_Record) return Gdk.Pixbuf.Gdk_Pixbuf;
    Set or get the image stored in Image
  • procedure Set (Image : access Gtk_Image_Record; Stock_Id : String; Size : Gtk.Enums.Gtk_Icon_Size);
    function Get (Image : access Gtk_Image_Record; Size : access Gtk.Enums.Gtk_Icon_Size) return String;
    Set or get the image stored in Image
  • procedure Set (Image : access Gtk_Image_Record; Icon_Set : Gtk.Icon_Factory.Gtk_Icon_Set; Size : Gtk.Enums.Gtk_Icon_Size);
    procedure Get (Image : access Gtk_Image_Record; Icon_Set : out Gtk.Icon_Factory.Gtk_Icon_Set; Size : out Gtk.Enums.Gtk_Icon_Size);
    Set or get the image stored in Image
  • procedure Set (Image : access Gtk_Image_Record; Animation : Gdk.Pixbuf.Gdk_Pixbuf_Animation);
    function Get (Image : access Gtk_Image_Record) return Gdk.Pixbuf.Gdk_Pixbuf_Animation;
    Get the Pixbuf Animation being displayed by the given Image. The reference counter for the returned animation is not incremented. This must be done separately if needed.
  • function Get_Storage_Type (Image : access Gtk_Image_Record) return Gtk_Image_Type;
    Indicates how the image was created
  • procedure Clear (Image : access Gtk_Image_Record);
    Resets the image to be empty.
  • procedure Set_From_Icon_Name (Image : access Gtk_Image_Record; Icon_Name : String; Size : Gtk.Enums.Gtk_Icon_Size);
    procedure Get_Icon_Name (Image : access Gtk_Image_Record; Name : out GNAT.Strings.String_Access; Size : out Gtk.Enums.Gtk_Icon_Size);
    Gets the icon name and size being displayed by the image The storage type of the image must be Image_Empty or Image_Icon_Name. The returned string must be freed by the caller.
  • procedure Set_Pixel_Size (Image : access Gtk_Image_Record; Pixel_Size : Gint);
    function Get_Pixel_Size (Image : access Gtk_Image_Record) return Gint;
    Sets or Gets the pixel size used for named icons. If the pixel size is set to a value different from -1, it is used instead of the icon size set by Set_From_Icon_Name.

Signals

Properties

  • File_Property
    String
    Filename to load and display
  • Icon_Name_Property
    String
    The name of the icon from the icon theme
  • Icon_Set_Property
    Boxed
    Icon set to display
  • Icon_Size_Property
    Int
    Symbolic size to use for stock icon, icon set or named icon
  • Image_Property
    Object
    A GdkImage to display
  • Mask_Property
    Object
    Mask bitmap to use with GdkImage or GdkPixmap
  • Pixbuf_Animation_Property
    Object
    GdkPixbufAnimation to display
  • Pixbuf_Property
    Object
    A GdkPixbuf to display
  • Pixel_Size_Property
    Int
    Pixel size to use for named icon
  • Pixmap_Property
    Object
    A GdkPixmap to display
  • Stock_Property
    String
    Stock ID for a stock image to display
  • Storage_Type_Property
    Enum
    The representation being used for image data

Alphabetical Index