## 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.     --  This widget is generally put on the sides of a drawing area to help the

32.     --  user measure distances. It indicates the current position of the mouse

33.     --  cursor within the drawing area, and can be graduated in multiple units.

34.     --

35.     --  </description>

36.     --  <screenshot>gtk-rulers</screenshot>

37.     --  <group>Drawing</group>

38.     --  <testgtk>create_rulers.adb</testgtk>

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

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

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

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

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

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

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

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

49.     package Gtk.RulerTo API docTo specTo body is

51.        type Gtk_Ruler_Record is new Gtk_Widget_RecordTo API docTo specTo body with null record;

52.        type Gtk_Ruler is access all Gtk_Ruler_RecordTo API docTo spec'Class;

54.        subtype Gtk_Vruler_Record is Gtk_Ruler_RecordTo API docTo spec;

55.        subtype Gtk_Vruler is Gtk_RulerTo API docTo spec;

57.        subtype Gtk_Hruler_Record is Gtk_Ruler_RecordTo API docTo spec;

58.        subtype Gtk_Hruler is Gtk_RulerTo API docTo spec;

60.        ------------------

61.        -- Constructors --

62.        ------------------

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

65.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_ruler_get_type");

67.        procedure Gtk_New_VrulerTo API docTo body (Ruler : out Gtk_VrulerTo API docTo spec);

68.        procedure Initialize_VrulerTo API docTo body (Ruler : access Gtk_Vruler_RecordTo API docTo spec'Class);

69.        --  Creates a new vertical ruler unmaintained and too specialized. There is

70.        --  no replacement.

72.        function Vruler_Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

73.        pragma Import (C, Vruler_Get_TypeTo API docTo spec, "gtk_vruler_get_type");

75.        procedure Gtk_New_HrulerTo API docTo body (Ruler : out Gtk_HrulerTo API docTo spec);

76.        procedure Initialize_HrulerTo API docTo body (Ruler : access Gtk_Hruler_RecordTo API docTo spec'Class);

78.        function Hruler_Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

79.        pragma Import (C, Hruler_Get_TypeTo API docTo spec, "gtk_hruler_get_type");

81.        -------------

82.        -- Methods --

83.        -------------

85.        procedure Draw_PosTo API docTo body (Ruler : access Gtk_Ruler_RecordTo API docTo spec);

87.        procedure Draw_TicksTo API docTo body (Ruler : access Gtk_Ruler_RecordTo API docTo spec);

89.        function Get_MetricTo API docTo body

90.           (Ruler : access Gtk_Ruler_RecordTo API docTo spec) return Gtk.Enums.Gtk_Metric_TypeTo API docTo spec;

91.        procedure Set_MetricTo API docTo body

92.           (Ruler  : access Gtk_Ruler_RecordTo API docTo spec;

93.            MetricTo API docTo body : Gtk.Enums.Gtk_Metric_TypeTo API docTo spec);

94.        --  Set or get the units used for a Gtk_Ruler. See Set_Metric

96.        procedure Get_RangeTo API docTo body

97.           (Ruler    : access Gtk_Ruler_RecordTo API docTo spec;

98.            Lower    : out GdoubleTo API docTo spec;

99.            Upper    : out GdoubleTo API docTo spec;

100.            Position : out GdoubleTo API docTo spec;

101.            Max_Size : out GdoubleTo API docTo spec);

102.        procedure Set_RangeTo API docTo body

103.           (Ruler    : access Gtk_Ruler_RecordTo API docTo spec;

104.            Lower    : GdoubleTo API docTo spec;

105.            Upper    : GdoubleTo API docTo spec;

106.            Position : GdoubleTo API docTo spec;

107.            Max_Size : GdoubleTo API docTo spec);

108.        --  This sets the range of the ruler. unmaintained and too specialized.

109.        --  There is no replacement.

110.        --  "lower": the lower limit of the ruler

111.        --  "upper": the upper limit of the ruler

112.        --  "position": the mark on the ruler

113.        --  "max_size": the maximum size of the ruler used when calculating the

114.        --  space to leave for the text

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

117.        -- Interfaces_Impl --

118.        ---------------------

120.        function Get_OrientationTo API docTo body

121.           (Self : access Gtk_Ruler_RecordTo API docTo spec) return Gtk.Enums.Gtk_OrientationTo API docTo spec;

122.        procedure Set_OrientationTo API docTo body

123.           (Self        : access Gtk_Ruler_RecordTo API docTo spec;

124.            OrientationTo API docTo body : Gtk.Enums.Gtk_OrientationTo API docTo spec);

126.        ----------------

127.        -- Interfaces --

128.        ----------------

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

130.        --

131.        --  - "Buildable"

132.        --

133.        --  - "Orientable"

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

136.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Ruler_RecordTo API docTo spec, Gtk_RulerTo API docTo spec);

137.        function "+"

138.          (Widget : access Gtk_Ruler_RecordTo API docTo spec'Class)

139.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

140.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

141.        function "-"

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

143.        return Gtk_RulerTo API docTo spec

144.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

146.        package Implements_Orientable is new Glib.Types.ImplementsTo API docTo specTo body

147.          (Gtk.Orientable.Gtk_OrientableTo API docTo spec, Gtk_Ruler_RecordTo API docTo spec, Gtk_RulerTo API docTo spec);

148.        function "+"

149.          (Widget : access Gtk_Ruler_RecordTo API docTo spec'Class)

150.        return Gtk.Orientable.Gtk_OrientableTo API docTo spec

151.        renames Implements_Orientable.To_InterfaceTo API docTo specTo body;

152.        function "-"

153.          (Interf : Gtk.Orientable.Gtk_OrientableTo API docTo spec)

154.        return Gtk_RulerTo API docTo spec

155.        renames Implements_Orientable.To_ObjectTo API docTo specTo body;

157.        ----------------

158.        -- Properties --

159.        ----------------

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

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

162.        --

163.        --  Name: Lower_Property

164.        --  Type: Gdouble

165.        --  Flags: read-write

166.        --

167.        --  Name: Max_Size_Property

168.        --  Type: Gdouble

169.        --  Flags: read-write

170.        --

171.        --  Name: Metric_Property

172.        --  Type: Gtk.Enums.Gtk_Metric_Type

173.        --  Flags: read-write

174.        --  The metric used for the ruler.

175.        --

176.        --  Name: Position_Property

177.        --  Type: Gdouble

178.        --  Flags: read-write

179.        --

180.        --  Name: Upper_Property

181.        --  Type: Gdouble

182.        --  Flags: read-write

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

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

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

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

188.        Lower_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

189.        Max_Size_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

190.        Metric_Property : constant Gtk.Enums.Property_Metric_TypeTo API docTo spec;

191.        Position_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

192.        Upper_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

194.     private

195.        Lower_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

196.          Glib.Properties.BuildTo API docTo specTo body ("lower");

197.        Max_Size_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

198.          Glib.Properties.BuildTo API docTo specTo body ("max-size");

199.        Metric_PropertyTo API docTo spec : constant Gtk.Enums.Property_Metric_TypeTo API docTo spec :=

200.          Gtk.Enums.BuildTo API docTo specTo body ("metric");

201.        Position_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

202.          Glib.Properties.BuildTo API docTo specTo body ("position");

203.        Upper_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

204.          Glib.Properties.BuildTo API docTo specTo body ("upper");

205.     end Gtk.RulerTo API docTo specTo body;