## 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-2011, 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.     --  This widget is an adapter: it can contain any child, and will make it

32.     --  scrollable. Its use is not necessary inside a Gtk_Scrolled_Window, which

33.     --  automatically uses a Gtk_Viewport when necessary.

34.     --

35.     --  </description>

36.     --  <group>Scrolling</group>

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

39.     with Gdk.WindowTo API docTo specTo body;      use Gdk.WindowTo API docTo specTo body;

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

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

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

43.     with Gtk.AdjustmentTo API docTo specTo body;  use Gtk.AdjustmentTo API docTo specTo body;

44.     with Gtk.BinTo API docTo specTo body;         use Gtk.BinTo API docTo specTo body;

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

46.     with Gtk.EnumsTo API docTo specTo body;       use Gtk.EnumsTo API docTo specTo body;

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

49.     package Gtk.ViewportTo API docTo specTo body is

51.        type Gtk_Viewport_Record is new Gtk_Bin_RecordTo API docTo spec with null record;

52.        type Gtk_Viewport is access all Gtk_Viewport_RecordTo API docTo spec'Class;

54.        ------------------

55.        -- Constructors --

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

58.        procedure Gtk_NewTo API docTo body

59.           (Viewport    : out Gtk_ViewportTo API docTo spec;

60.            Hadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null;

61.            Vadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null);

62.        procedure InitializeTo API docTo body

63.           (Viewport    : access Gtk_Viewport_RecordTo API docTo spec'Class;

64.            Hadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null;

65.            Vadjustment : Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec := null);

66.        --  Creates a new Gtk.Viewport.Gtk_Viewport with the given adjustments.

67.        --  "hadjustment": horizontal adjustment.

68.        --  "vadjustment": vertical adjustment.

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

71.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_viewport_get_type");

73.        -------------

74.        -- Methods --

75.        -------------

77.        function Get_Bin_WindowTo API docTo body

78.           (Viewport : access Gtk_Viewport_RecordTo API docTo spec) return Gdk.Window.Gdk_WindowTo API docTo spec;

79.        --  Gets the bin window of the Gtk.Viewport.Gtk_Viewport.

80.        --  Since: gtk+ 2.20

82.        function Get_HadjustmentTo API docTo body

83.           (Viewport : access Gtk_Viewport_RecordTo API docTo spec)

84.            return Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec;

85.        procedure Set_HadjustmentTo API docTo body

86.           (Viewport   : access Gtk_Viewport_RecordTo API docTo spec;

87.            Adjustment : access Gtk.Adjustment.Gtk_Adjustment_RecordTo API docTo spec'Class);

88.        --  Sets the horizontal adjustment of the viewport.

89.        --  "adjustment": a Gtk.Adjustment.Gtk_Adjustment.

91.        function Get_Shadow_TypeTo API docTo body

92.           (Viewport : access Gtk_Viewport_RecordTo API docTo spec)

93.            return Gtk.Enums.Gtk_Shadow_TypeTo API docTo spec;

94.        procedure Set_Shadow_TypeTo API docTo body

95.           (Viewport : access Gtk_Viewport_RecordTo API docTo spec;

96.            The_TypeTo API docTo body : Gtk.Enums.Gtk_Shadow_TypeTo API docTo spec);

97.        --  Sets the shadow type of the viewport.

98.        --  "type": the new shadow type.

100.        function Get_VadjustmentTo API docTo body

101.           (Viewport : access Gtk_Viewport_RecordTo API docTo spec)

102.            return Gtk.Adjustment.Gtk_AdjustmentTo API docTo spec;

103.        procedure Set_VadjustmentTo API docTo body

104.           (Viewport   : access Gtk_Viewport_RecordTo API docTo spec;

105.            Adjustment : access Gtk.Adjustment.Gtk_Adjustment_RecordTo API docTo spec'Class);

106.        --  Sets the vertical adjustment of the viewport.

107.        --  "adjustment": a Gtk.Adjustment.Gtk_Adjustment.

109.        function Get_View_WindowTo API docTo body

110.           (Viewport : access Gtk_Viewport_RecordTo API docTo spec) return Gdk.Window.Gdk_WindowTo API docTo spec;

111.        --  Gets the view window of the Gtk.Viewport.Gtk_Viewport.

112.        --  Since: gtk+ 2.22

114.        ----------------

115.        -- Interfaces --

116.        ----------------

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

118.        --

119.        --  - "Buildable"

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

122.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Viewport_RecordTo API docTo spec, Gtk_ViewportTo API docTo spec);

123.        function "+"

124.          (Widget : access Gtk_Viewport_RecordTo API docTo spec'Class)

125.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

126.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

127.        function "-"

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

129.        return Gtk_ViewportTo API docTo spec

130.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

132.        ----------------

133.        -- Properties --

134.        ----------------

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

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

137.        --

138.        --  Name: Hadjustment_Property

139.        --  Type: Gtk.Adjustment.Gtk_Adjustment

140.        --  Flags: read-write

141.        --

142.        --  Name: Shadow_Type_Property

143.        --  Type: Gtk.Enums.Gtk_Shadow_Type

144.        --  Flags: read-write

145.        --

146.        --  Name: Vadjustment_Property

147.        --  Type: Gtk.Adjustment.Gtk_Adjustment

148.        --  Flags: read-write

150.        Hadjustment_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

151.        Shadow_Type_Property : constant Gtk.Enums.Property_Gtk_Shadow_TypeTo API docTo spec;

152.        Vadjustment_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

154.        -------------

155.        -- Signals --

156.        -------------

157.        --  The following new signals are defined for this widget:

158.        --

159.        --  "set-scroll-adjustments"

160.        --     procedure Handler

161.        --       (Self   : access Gtk_Viewport_Record'Class;

162.        --        Object : Gtk.Adjustment.Gtk_Adjustment;

163.        --        P0     : Gtk.Adjustment.Gtk_Adjustment);

164.        --  Set the scroll adjustments for the viewport. Usually scrolled

165.        --  containers like Gtk.Scrolledwindow.Gtk_Scrolledwindow will emit this

166.        --  signal to connect two instances of Gtk.Scrollbar.Gtk_Scrollbar to the

167.        --  scroll directions of the Gtk.Viewport.Gtk_Viewport.

169.        Signal_Set_Scroll_Adjustments : constant Glib.Signal_NameTo API docTo spec := "set-scroll-adjustments";

171.     private

172.        Hadjustment_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

173.          Glib.Properties.BuildTo API docTo specTo body ("hadjustment");

174.        Shadow_Type_PropertyTo API docTo spec : constant Gtk.Enums.Property_Gtk_Shadow_TypeTo API docTo spec :=

175.          Gtk.Enums.BuildTo API docTo specTo body ("shadow-type");

176.        Vadjustment_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

177.          Glib.Properties.BuildTo API docTo specTo body ("vadjustment");

178.     end Gtk.ViewportTo API docTo specTo body;