## 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.     --  The Gtk_Curve widget allows the user to edit a curve covering a range of

32.     --  values. It is typically used to fine-tune color balances in graphics

33.     --  applications like the Gimp.

34.     --

35.     --  The Gtk_Curve widget has 3 modes of operation: spline, linear and free. In

36.     --  spline mode the user places points on the curve which are automatically

37.     --  connected together into a smooth curve. In linear mode the user places

38.     --  points on the curve which are connected by straight lines. In free mode the

39.     --  user can draw the points of the curve freely, and they are not connected at

40.     --  all.

41.     --

42.     --  </description>

43.     --  <group>Drawing</group>

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

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

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

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

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

50.     with Gtk.Drawing_AreaTo API docTo specTo body; use Gtk.Drawing_AreaTo API docTo specTo body;

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

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

54.     package Gtk.CurveTo API docTo specTo body is

56.        type Gtk_Curve_Record is new Gtk_Drawing_Area_RecordTo API docTo spec with null record;

57.        type Gtk_Curve is access all Gtk_Curve_RecordTo API docTo spec'Class;

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

60.        -- Constructors --

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

63.        procedure Gtk_NewTo API docTo body (Curve : out Gtk_CurveTo API docTo spec);

64.        procedure InitializeTo API docTo body (Curve : access Gtk_Curve_RecordTo API docTo spec'Class);

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

67.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_curve_get_type");

69.        -------------

70.        -- Methods --

71.        -------------

73.        procedure ResetTo API docTo body (Curve : access Gtk_Curve_RecordTo API docTo spec);

74.        --  Reset the curve. Reset to a straight line from the minimum x & y values

75.        --  to the maximum x & y values (i.e. from the bottom-left to the top-right

76.        --  corners). The curve type is not changed.

78.        procedure Set_Curve_TypeTo API docTo body

79.           (Curve    : access Gtk_Curve_RecordTo API docTo spec;

80.            The_TypeTo API docTo body : Gtk.Enums.Gtk_Curve_TypeTo API docTo spec);

81.        --  Set the type of the curve. The curve will remain unchanged except when

82.        --  changing from a free curve to a linear or spline curve, in which case

83.        --  the curve will be changed as little as possible.

85.        procedure Set_GammaTo API docTo body (Curve : access Gtk_Curve_RecordTo API docTo spec; Gamma : GfloatTo API docTo spec);

86.        --  Recompute the entire curve using the given gamma value. A gamma value

87.        --  of 1.0 results in a straight line. Values greater than 1.0 result in a

88.        --  curve above the straight line. Values less than 1.0 result in a curve

89.        --  below the straight line. The curve type is changed to Curve_Type_Free.

91.        procedure Set_RangeTo API docTo body

92.           (Curve : access Gtk_Curve_RecordTo API docTo spec;

93.            Min_X : GfloatTo API docTo spec;

94.            Max_X : GfloatTo API docTo spec;

95.            Min_Y : GfloatTo API docTo spec;

96.            Max_Y : GfloatTo API docTo spec);

97.        --  Set the minimum and maximum x & y values of the curve. The curve is

98.        --  also reset with a call to Reset.

100.        ----------------------

101.        -- GtkAda additions --

102.        ----------------------

104.        procedure Set_VectorTo API docTo body

105.          (Curve  : access Gtk_Curve_RecordTo API docTo spec;

106.           Vector : Gfloat_ArrayTo API docTo spec);

107.        procedure Get_VectorTo API docTo body

108.          (Curve  : access Gtk_Curve_RecordTo API docTo spec;

109.           Vector : out Gfloat_ArrayTo API docTo spec);

110.        --  Set the vector of points on the curve.

111.        --  The curve type is set to Curve_Type_Free.

113.        ----------------

114.        -- Interfaces --

115.        ----------------

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

117.        --

118.        --  - "Buildable"

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

121.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Curve_RecordTo API docTo spec, Gtk_CurveTo API docTo spec);

122.        function "+"

123.          (Widget : access Gtk_Curve_RecordTo API docTo spec'Class)

124.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

125.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

126.        function "-"

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

128.        return Gtk_CurveTo API docTo spec

129.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

131.        ----------------

132.        -- Properties --

133.        ----------------

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

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

136.        --

137.        --  Name: Curve_Type_Property

138.        --  Type: Gtk.Enums.Gtk_Curve_Type

139.        --  Flags: read-write

140.        --

141.        --  Name: Max_X_Property

142.        --  Type: Gfloat

143.        --  Flags: read-write

144.        --

145.        --  Name: Max_Y_Property

146.        --  Type: Gfloat

147.        --  Flags: read-write

148.        --

149.        --  Name: Min_X_Property

150.        --  Type: Gfloat

151.        --  Flags: read-write

152.        --

153.        --  Name: Min_Y_Property

154.        --  Type: Gfloat

155.        --  Flags: read-write

157.        Curve_Type_Property : constant Gtk.Enums.Property_Gtk_Curve_TypeTo API docTo spec;

158.        Max_X_Property : constant Glib.Properties.Property_FloatTo API docTo spec;

159.        Max_Y_Property : constant Glib.Properties.Property_FloatTo API docTo spec;

160.        Min_X_Property : constant Glib.Properties.Property_FloatTo API docTo spec;

161.        Min_Y_Property : constant Glib.Properties.Property_FloatTo API docTo spec;

163.        -------------

164.        -- Signals --

165.        -------------

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

167.        --

168.        --  "curve-type-changed"

169.        --     procedure Handler (Self : access Gtk_Curve_Record'Class);

171.        Signal_Curve_Type_Changed : constant Glib.Signal_NameTo API docTo spec := "curve-type-changed";

173.     private

174.        Curve_Type_PropertyTo API docTo spec : constant Gtk.Enums.Property_Gtk_Curve_TypeTo API docTo spec :=

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

176.        Max_X_PropertyTo API docTo spec : constant Glib.Properties.Property_FloatTo API docTo spec :=

177.          Glib.Properties.BuildTo API docTo specTo body ("max-x");

178.        Max_Y_PropertyTo API docTo spec : constant Glib.Properties.Property_FloatTo API docTo spec :=

179.          Glib.Properties.BuildTo API docTo specTo body ("max-y");

180.        Min_X_PropertyTo API docTo spec : constant Glib.Properties.Property_FloatTo API docTo spec :=

181.          Glib.Properties.BuildTo API docTo specTo body ("min-x");

182.        Min_Y_PropertyTo API docTo spec : constant Glib.Properties.Property_FloatTo API docTo spec :=

183.          Glib.Properties.BuildTo API docTo specTo body ("min-y");

184.     end Gtk.CurveTo API docTo specTo body;