package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Aspect_Frame_Record, Gtk_Aspect_Frame);
type Gtk_Aspect_Frame_Record is new Gtk_Frame_Record with null record;
type Gtk_Aspect_Frame is access all Gtk_Aspect_Frame_Record'Class;
Obey_Child_Property : constant Glib.Properties.Property_Boolean;
Ratio_Property : constant Glib.Properties.Property_Float;
Xalign_Property : constant Glib.Properties.Property_Float;
Yalign_Property : constant Glib.Properties.Property_Float;
procedure Gtk_New
( | Aspect_Frame | : out Gtk_Aspect_Frame; |
Label | : UTF8_String := ""; | |
Xalign | : Gfloat; | |
Yalign | : Gfloat; | |
Ratio | : Gfloat; | |
Obey_Child | : Boolean); |
procedure Initialize
( | Aspect_Frame | : not null access Gtk_Aspect_Frame_Record'Class; |
Label | : UTF8_String := ""; | |
Xalign | : Gfloat; | |
Yalign | : Gfloat; | |
Ratio | : Gfloat; | |
Obey_Child | : Boolean); |
function Gtk_Aspect_Frame_New
( | Label | : UTF8_String := ""; |
Xalign | : Gfloat; | |
Yalign | : Gfloat; | |
Ratio | : Gfloat; | |
Obey_Child | : Boolean) return Gtk_Aspect_Frame; |
function Get_Type return Glib.GType;
procedure Set
( | Aspect_Frame | : not null access Gtk_Aspect_Frame_Record; |
Xalign | : Gfloat; | |
Yalign | : Gfloat; | |
Ratio | : Gfloat; | |
Obey_Child | : Boolean); |
function "+"
( | Widget | : access Gtk_Aspect_Frame_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Aspect_Frame renames Implements_Gtk_Buildable.To_Object; |
The Gtk.Aspect_Frame.Gtk_Aspect_Frame is useful when you want pack a widget so that it can resize but always retains the same aspect ratio. For instance, one might be drawing a small preview of a larger image.
Gtk.Aspect_Frame.Gtk_Aspect_Frame derives from Gtk.Frame.Gtk_Frame, so it can draw a label and a frame around the child. The frame will be "shrink-wrapped" to the size of the child.