## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

5.     --                Copyright (C) 2000-2013, AdaCore                   --

6.     --                                                                   --

7.     -- This library is free software; you can redistribute it and/or     --

8.     -- modify it under the terms of the GNU General Public               --

9.     -- License as published by the Free Software Foundation; either      --

10.     -- version 2 of the License, or (at your option) any later version.  --

11.     --                                                                   --

12.     -- This library is distributed in the hope that it will be useful,   --

13.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

14.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

15.     -- General Public License for more details.                          --

16.     --                                                                   --

17.     -- You should have received a copy of the GNU General Public         --

18.     -- License along with this library; if not, write to the             --

19.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

20.     -- Boston, MA 02111-1307, USA.                                       --

21.     --                                                                   --

22.     -- As a special exception, if other files instantiate generics from  --

23.     -- this unit, or you link this unit with other files to produce an   --

24.     -- executable, this  unit  does not  by itself cause  the resulting  --

25.     -- executable to be covered by the GNU General Public License. This  --

26.     -- exception does not however invalidate any other reasons why the   --

27.     -- executable file  might be covered by the  GNU Public License.     --

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --  A Gtk_Aspect_Frame is the same type of widget as a frame, but it

32.     --  constrains its child to a specific aspect ratio between its width and its

33.     --  height.

34.     --

35.     --  This ratio can either be given explicitly by the user, or chosen from the

36.     --  widget's initial size request (might be different from the one if was

37.     --  actually given).

38.     --

39.     --  </description>

40.     --  <group>Layout Containers</group>

41.     --  <testgtk>create_frame.adb.adb</testgtk>

43.     pragma Warnings (Off, "*is already use-visible*");

44.     with GlibTo API docTo specTo body;            use GlibTo API docTo specTo body;

45.     with Glib.PropertiesTo API docTo specTo body; use Glib.PropertiesTo API docTo specTo body;

46.     with Glib.TypesTo API docTo specTo body;      use Glib.TypesTo API docTo specTo body;

47.     with Gtk.BuildableTo API docTo specTo body;   use Gtk.BuildableTo API docTo specTo body;

48.     with Gtk.FrameTo API docTo specTo body;       use Gtk.FrameTo API docTo specTo body;

49.     with Gtk.WidgetTo API docTo specTo body;      use Gtk.WidgetTo API docTo specTo body;

51.     package Gtk.Aspect_FrameTo API docTo specTo body is

53.        type Gtk_Aspect_Frame_Record is new Gtk_Frame_RecordTo API docTo spec with null record;

54.        type Gtk_Aspect_Frame is access all Gtk_Aspect_Frame_RecordTo API docTo spec'Class;

56.        ------------------

57.        -- Constructors --

58.        ------------------

60.        procedure Gtk_NewTo API docTo body

61.           (Aspect_Frame : out Gtk_Aspect_FrameTo API docTo spec;

62.            Label        : UTF8_StringTo API docTo spec := "";

63.            Xalign       : GfloatTo API docTo spec;

64.            Yalign       : GfloatTo API docTo spec;

65.            Ratio        : GfloatTo API docTo spec;

66.            Obey_Child   : Boolean);

67.        procedure InitializeTo API docTo body

68.           (Aspect_Frame : access Gtk_Aspect_Frame_RecordTo API docTo spec'Class;

69.            Label        : UTF8_StringTo API docTo spec := "";

70.            Xalign       : GfloatTo API docTo spec;

71.            Yalign       : GfloatTo API docTo spec;

72.            Ratio        : GfloatTo API docTo spec;

73.            Obey_Child   : Boolean);

74.        --  Create a new Gtk.Aspect_Frame.Gtk_Aspect_Frame.

75.        --  "label": Label text.

76.        --  "xalign": Horizontal alignment of the child within the allocation of

77.        --  the Gtk.Aspect_Frame.Gtk_Aspect_Frame. This ranges from 0.0 (left

78.        --  aligned) to 1.0 (right aligned)

79.        --  "yalign": Vertical alignment of the child within the allocation of the

80.        --  Gtk.Aspect_Frame.Gtk_Aspect_Frame. This ranges from 0.0 (left aligned)

81.        --  to 1.0 (right aligned)

82.        --  "ratio": The desired aspect ratio.

83.        --  "obey_child": If True, Ratio is ignored, and the aspect ratio is taken

84.        --  from the requistion of the child.

86.        function Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

87.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_aspect_frame_get_type");

89.        -------------

90.        -- Methods --

91.        -------------

93.        procedure SetTo API docTo body

94.           (Aspect_Frame : access Gtk_Aspect_Frame_RecordTo API docTo spec;

95.            Xalign       : GfloatTo API docTo spec;

96.            Yalign       : GfloatTo API docTo spec;

97.            Ratio        : GfloatTo API docTo spec;

98.            Obey_Child   : Boolean);

99.        --  Set parameters for an existing Gtk.Aspect_Frame.Gtk_Aspect_Frame.

100.        --  "xalign": Horizontal alignment of the child within the allocation of

101.        --  the Gtk.Aspect_Frame.Gtk_Aspect_Frame. This ranges from 0.0 (left

102.        --  aligned) to 1.0 (right aligned)

103.        --  "yalign": Vertical alignment of the child within the allocation of the

104.        --  Gtk.Aspect_Frame.Gtk_Aspect_Frame. This ranges from 0.0 (left aligned)

105.        --  to 1.0 (right aligned)

106.        --  "ratio": The desired aspect ratio.

107.        --  "obey_child": If True, Ratio is ignored, and the aspect ratio is taken

108.        --  from the requistion of the child.

110.        ------------

111.        -- Fields --

112.        ------------

114.        function Get_XalignTo API docTo body

115.           (Aspect_Frame : access Gtk_Aspect_Frame_RecordTo API docTo spec) return GfloatTo API docTo spec;

117.        function Get_YalignTo API docTo body

118.           (Aspect_Frame : access Gtk_Aspect_Frame_RecordTo API docTo spec) return GfloatTo API docTo spec;

120.        function Get_RatioTo API docTo body

121.           (Aspect_Frame : access Gtk_Aspect_Frame_RecordTo API docTo spec) return GfloatTo API docTo spec;

123.        ----------------

124.        -- Interfaces --

125.        ----------------

126.        --  This class implements several interfaces. See Glib.Types

127.        --

128.        --  - "Buildable"

130.        package Implements_Buildable is new Glib.Types.ImplementsTo API docTo specTo body

131.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Aspect_Frame_RecordTo API docTo spec, Gtk_Aspect_FrameTo API docTo spec);

132.        function "+"

133.          (Widget : access Gtk_Aspect_Frame_RecordTo API docTo spec'Class)

134.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

135.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

136.        function "-"

137.          (Interf : Gtk.Buildable.Gtk_BuildableTo API docTo spec)

138.        return Gtk_Aspect_FrameTo API docTo spec

139.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

141.        ----------------

142.        -- Properties --

143.        ----------------

144.        --  The following properties are defined for this widget. See

145.        --  Glib.Properties for more information on properties)

146.        --

147.        --  Name: Obey_Child_Property

148.        --  Type: Boolean

149.        --  Flags: read-write

150.        --

151.        --  Name: Ratio_Property

152.        --  Type: Gfloat

153.        --  Flags: read-write

154.        --

155.        --  Name: Xalign_Property

156.        --  Type: Gfloat

157.        --  Flags: read-write

158.        --

159.        --  Name: Yalign_Property

160.        --  Type: Gfloat

161.        --  Flags: read-write

163.        Obey_Child_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

164.        Ratio_Property : constant Glib.Properties.Property_FloatTo API docTo spec;

165.        Xalign_Property : constant Glib.Properties.Property_FloatTo API docTo spec;

166.        Yalign_Property : constant Glib.Properties.Property_FloatTo API docTo spec;

168.     private

169.        Obey_Child_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

170.          Glib.Properties.BuildTo API docTo specTo body ("obey-child");

171.        Ratio_PropertyTo API docTo spec : constant Glib.Properties.Property_FloatTo API docTo spec :=

172.          Glib.Properties.BuildTo API docTo specTo body ("ratio");

173.        Xalign_PropertyTo API docTo spec : constant Glib.Properties.Property_FloatTo API docTo spec :=

174.          Glib.Properties.BuildTo API docTo specTo body ("xalign");

175.        Yalign_PropertyTo API docTo spec : constant Glib.Properties.Property_FloatTo API docTo spec :=

176.          Glib.Properties.BuildTo API docTo specTo body ("yalign");

177.     end Gtk.Aspect_FrameTo API docTo specTo body;