## 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 object represents an adjustable bounded value. It is used in many

32.     --  other widgets that have such internal values, like Gtk_Scrollbar,

33.     --  Gtk_Spin_Button, Gtk_Range, ... Modifying the value of these widgets is

34.     --  done through their associated adjustments.

35.     --

36.     --  The modification of the value is left to the user, who should call

37.     --  Value_Changed or Changed to emit the relevant signals.

38.     --

39.     --  The meaning of the most important fields can be explained on the following

40.     --  figure (imagine this is a scrollbar):

41.     --

42.     --  [-------|=================|-------------------]

43.     --

44.     --  lower value value + page_size upper

45.     --

46.     --  </description>

47.     --  <group>Scrolling</group>

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

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

51.     with Glib.ObjectTo API docTo specTo body;     use Glib.ObjectTo API docTo specTo body;

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

54.     package Gtk.AdjustmentTo API docTo specTo body is

56.        type Gtk_Adjustment_Record is new GObject_RecordTo API docTo specTo body with null record;

57.        type Gtk_Adjustment is access all Gtk_Adjustment_RecordTo API docTo spec'Class;

59.        ------------------

60.        -- Constructors --

61.        ------------------

63.        procedure Gtk_NewTo API docTo body

64.           (Adjustment     : out Gtk_AdjustmentTo API docTo spec;

65.            Value          : GdoubleTo API docTo spec;

66.            Lower          : GdoubleTo API docTo spec;

67.            Upper          : GdoubleTo API docTo spec;

68.            Step_Increment : GdoubleTo API docTo spec;

69.            Page_Increment : GdoubleTo API docTo spec;

70.            Page_Size      : GdoubleTo API docTo spec := 0.0);

71.        procedure InitializeTo API docTo body

72.           (Adjustment     : access Gtk_Adjustment_RecordTo API docTo spec'Class;

73.            Value          : GdoubleTo API docTo spec;

74.            Lower          : GdoubleTo API docTo spec;

75.            Upper          : GdoubleTo API docTo spec;

76.            Step_Increment : GdoubleTo API docTo spec;

77.            Page_Increment : GdoubleTo API docTo spec;

78.            Page_Size      : GdoubleTo API docTo spec := 0.0);

79.        --  Create a new adjustment. Value is the initial value of the adjustment.

80.        --  It must be in the range (Lower .. Upper) and the adjustment's value will

81.        --  never be outside this range. Step_Increment is the value used to make

82.        --  minor adjustments, such as when the user clicks on the arrows of a

83.        --  scrollbar. Page_Increment is used to make major adjustments, such as

84.        --  when the user clicks in the through on a scrollbar. Page_Size is

85.        --  deprecated, use the default value.

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

88.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_adjustment_get_type");

90.        -------------

91.        -- Methods --

92.        -------------

94.        procedure ChangedTo API docTo body (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec);

96.        procedure Clamp_PageTo API docTo body

97.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec;

98.            Lower      : GdoubleTo API docTo spec;

99.            Upper      : GdoubleTo API docTo spec);

100.        --  Update the Adjustment value to ensure that the range between Lower and

101.        --  Upper is in the current page (i.e. between value and value + page_size).

102.        --  If the range is larger than the page size, then only the start of it

103.        --  will be in the current page. A "value_changed" signal will be emitted if

104.        --  the value is changed.

106.        procedure ConfigureTo API docTo body

107.           (Adjustment     : access Gtk_Adjustment_RecordTo API docTo spec;

108.            Value          : GdoubleTo API docTo spec;

109.            Lower          : GdoubleTo API docTo spec;

110.            Upper          : GdoubleTo API docTo spec;

111.            Step_Increment : GdoubleTo API docTo spec;

112.            Page_Increment : GdoubleTo API docTo spec;

113.            Page_Size      : GdoubleTo API docTo spec);

114.        --  Sets all properties of the adjustment at once. Use this function to

115.        --  avoid multiple emissions of the "changed" signal. See

116.        --  Gtk.Adjustment.Set_Lower for an alternative way of compressing multiple

117.        --  emissions of "changed" into one.

118.        --  Since: gtk+ 2.14

119.        --  "value": the new value

120.        --  "lower": the new minimum value

121.        --  "upper": the new maximum value

122.        --  "step_increment": the new step increment

123.        --  "page_increment": the new page increment

124.        --  "page_size": the new page size

126.        function Get_LowerTo API docTo body

127.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec) return GdoubleTo API docTo spec;

128.        procedure Set_LowerTo API docTo body

129.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec;

130.            Lower      : GdoubleTo API docTo spec);

131.        --  Sets the minimum value of the adjustment. When setting multiple

132.        --  adjustment properties via their individual setters, multiple "changed"

133.        --  signals will be emitted. However, since the emission of the "changed"

134.        --  signal is tied to the emission of the "GObject::notify" signals of the

135.        --  changed properties, it's possible to compress the "changed" signals into

136.        --  one by calling g_object_freeze_notify and g_object_thaw_notify around

137.        --  the calls to the individual setters. Alternatively, using a single

138.        --  g_object_set for all the properties to change, or using

139.        --  Gtk.Adjustment.Configure has the same effect of compressing "changed"

140.        --  emissions.

141.        --  Since: gtk+ 2.14

142.        --  "lower": the new minimum value

144.        function Get_Page_IncrementTo API docTo body

145.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec) return GdoubleTo API docTo spec;

146.        procedure Set_Page_IncrementTo API docTo body

147.           (Adjustment     : access Gtk_Adjustment_RecordTo API docTo spec;

148.            Page_Increment : GdoubleTo API docTo spec);

149.        --  Sets the page increment of the adjustment. See Gtk.Adjustment.Set_Lower

150.        --  about how to compress multiple emissions of the "changed" signal when

151.        --  setting multiple adjustment properties.

152.        --  Since: gtk+ 2.14

153.        --  "page_increment": the new page increment

155.        function Get_Page_SizeTo API docTo body

156.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec) return GdoubleTo API docTo spec;

157.        procedure Set_Page_SizeTo API docTo body

158.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec;

159.            Page_Size  : GdoubleTo API docTo spec);

160.        --  Sets the page size of the adjustment. See Gtk.Adjustment.Set_Lower

161.        --  about how to compress multiple emissions of the "changed" signal when

162.        --  setting multiple adjustment properties.

163.        --  Since: gtk+ 2.14

164.        --  "page_size": the new page size

166.        function Get_Step_IncrementTo API docTo body

167.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec) return GdoubleTo API docTo spec;

168.        procedure Set_Step_IncrementTo API docTo body

169.           (Adjustment     : access Gtk_Adjustment_RecordTo API docTo spec;

170.            Step_Increment : GdoubleTo API docTo spec);

171.        --  Sets the step increment of the adjustment. See Gtk.Adjustment.Set_Lower

172.        --  about how to compress multiple emissions of the "changed" signal when

173.        --  setting multiple adjustment properties.

174.        --  Since: gtk+ 2.14

175.        --  "step_increment": the new step increment

177.        function Get_UpperTo API docTo body

178.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec) return GdoubleTo API docTo spec;

179.        procedure Set_UpperTo API docTo body

180.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec;

181.            Upper      : GdoubleTo API docTo spec);

182.        --  Sets the maximum value of the adjustment. Note that values will be

183.        --  restricted by <literal>upper - page-size</literal> if the page-size

184.        --  property is nonzero. See Gtk.Adjustment.Set_Lower about how to compress

185.        --  multiple emissions of the "changed" signal when setting multiple

186.        --  adjustment properties.

187.        --  Since: gtk+ 2.14

188.        --  "upper": the new maximum value

190.        function Get_ValueTo API docTo body

191.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec) return GdoubleTo API docTo spec;

192.        procedure Set_ValueTo API docTo body

193.           (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec;

194.            Value      : GdoubleTo API docTo spec);

196.        procedure Value_ChangedTo API docTo body (Adjustment : access Gtk_Adjustment_RecordTo API docTo spec);

198.        ----------------

199.        -- Properties --

200.        ----------------

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

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

203.        --

204.        --  Name: Lower_Property

205.        --  Type: Gdouble

206.        --  Flags: read-write

207.        --  The minimum value of the adjustment.

208.        --

209.        --  Name: Page_Increment_Property

210.        --  Type: Gdouble

211.        --  Flags: read-write

212.        --  The page increment of the adjustment.

213.        --

214.        --  Name: Page_Size_Property

215.        --  Type: Gdouble

216.        --  Flags: read-write

217.        --  The page size of the adjustment. Note that the page-size is irrelevant

218.        --  and should be set to zero if the adjustment is used for a simple scalar

219.        --  value, e.g. in a Gtk.Spinbutton.Gtk_Spinbutton.

220.        --

221.        --  Name: Step_Increment_Property

222.        --  Type: Gdouble

223.        --  Flags: read-write

224.        --  The step increment of the adjustment.

225.        --

226.        --  Name: Upper_Property

227.        --  Type: Gdouble

228.        --  Flags: read-write

229.        --  The maximum value of the adjustment. Note that values will be

230.        --  restricted by <literal>upper - page-size</literal> if the page-size

231.        --  property is nonzero.

232.        --

233.        --  Name: Value_Property

234.        --  Type: Gdouble

235.        --  Flags: read-write

236.        --  The value of the adjustment.

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

239.        Page_Increment_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

240.        Page_Size_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

241.        Step_Increment_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

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

243.        Value_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

245.        -------------

246.        -- Signals --

247.        -------------

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

249.        --

250.        --  "changed"

251.        --     procedure Handler (Self : access Gtk_Adjustment_Record'Class);

252.        --

253.        --  "value-changed"

254.        --     procedure Handler (Self : access Gtk_Adjustment_Record'Class);

256.        Signal_Changed : constant Glib.Signal_NameTo API docTo spec := "changed";

257.        Signal_Value_Changed : constant Glib.Signal_NameTo API docTo spec := "value-changed";

259.     private

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

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

262.        Page_Increment_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

263.          Glib.Properties.BuildTo API docTo specTo body ("page-increment");

264.        Page_Size_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

265.          Glib.Properties.BuildTo API docTo specTo body ("page-size");

266.        Step_Increment_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

267.          Glib.Properties.BuildTo API docTo specTo body ("step-increment");

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

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

270.        Value_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

271.          Glib.Properties.BuildTo API docTo specTo body ("value");

272.     end Gtk.AdjustmentTo API docTo specTo body;