## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

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

5.     --                Copyright (C) 2000-2006 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 package defines the root of the plot hierarchy. It defines several

32.     --  display strategies that can be used to show scientific data on the

33.     --  screen (see the children for 3D, polar, bars,...)

34.     --

35.     --  All coordinates are in percent of the total size allocates for the data

36.     --  set (ie the actual position is (x * width, y * height), where (x, y) is

37.     --  the value stored in the data set and (width, height) its allocated screen

38.     --  size.

39.     --  </description>

40.     --  <c_version>gtkextra 2.1.1</c_version>

41.     --  <group>Plotting Data</group>

42.     --  <testgtk>create_plot_realtime.adb</testgtk>

44.     with Gdk.ColorTo API docTo specTo body;

45.     with Gdk.GCTo API docTo specTo body;

46.     with GlibTo API docTo specTo body;

47.     with Gtk.WidgetTo API docTo specTo body;

48.     with Gtkada.TypesTo API docTo specTo body;

49.     with Unchecked_Conversion;

51.     package Gtk.Extra.Plot_DataTo API docTo specTo body is

53.        type Plot_Label_Style is (Label_Float, Label_Exp, Label_Pow);

54.        --  The style of labels (floating point, or scientific notation)

55.        pragma Convention (C, Plot_Label_StyleTo API docTo spec);

57.        type Plot_Scale is (Scale_Linear, Scale_Log10);

58.        --  Type of scale used for each axis of a graph.

59.        pragma Convention (C, Plot_ScaleTo API docTo spec);

61.        type Gtk_Plot_Data_RecordTo API docTo body is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body with private;

62.        type Gtk_Plot_Data is access all Gtk_Plot_Data_RecordTo API docTo specTo body'Class;

63.        --  A set of values that can be represented on the screen. There are

64.        --  several strategies to set the values, either explicitely in your

65.        --  application, or by having them automatically generated by a function.

67.        type Gtk_Plot_Marker is new Gdk.C_ProxyTo API docTo spec;

69.        --  <doc_ignore>

70.        --  The convert functions are needed to e.g. instantiate Generic_List

71.        --  They should not be used directly

72.        function Convert is new Unchecked_Conversion

73.          (Gtk_Plot_DataTo API docTo spec, System.Address);

74.        function Convert is new Unchecked_Conversion

75.          (System.Address, Gtk_Plot_DataTo API docTo spec);

76.        --  </doc_ignore>

78.        -----------

79.        -- Types --

80.        -----------

82.        type No_Range_Gdouble_Array is array (Natural) of GdoubleTo API docTo spec;

83.        --  An array of values.

84.        --  This is used to represent the data values displayed in the plot.

85.        --  This array does not have any range information (so that it can be

86.        --  easily returned from a C function, without requiring an extra

87.        --  copy of the table). You can not use 'Range on this array.

89.        type No_Range_Gdouble_Array_Access is access all No_Range_Gdouble_ArrayTo API docTo spec;

90.        --  An access to a flat array.

92.        type Gdouble_Array_Access is access all Glib.Gdouble_ArrayTo API docTo spec;

93.        --  The reason we use this type in the functions below is because

94.        --  gtk+-extra does not keep a copy of the arrays, but points to the one

95.        --  given in argument. Thus, the Ada arrays should not be allocated on the

96.        --  stack, or at least they should be at library level. Using this 'Access

97.        --  will force the compiler to do the check for us.

99.        type Points_Array is record

100.           Points     : No_Range_Gdouble_Array_AccessTo API docTo spec;

101.           Num_Points : GintTo API docTo spec := 0;

102.        end record;

103.        --  The points are indexed from 0 to Num_Points-1.

104.        --  Note that you can't use 'Range, 'First or 'Last on Points.

106.        type Plot_Connector is

107.          (Connect_None,

108.           --  No connection

110.           Connect_Straight,

111.           --  straight line

113.           Connect_Spline,

114.           --  spline or Bezier curve

116.           Connect_Hv_Step,

117.           --  Horizontal then vertical

119.           Connect_Vh_Step,

120.           --  Vertical then horizontal

122.           Connect_Middle_Step

123.           --  Split in the middle

124.          );

125.        --  The type of connection between two adjacent points in a graph.

126.        pragma Convention (C, Plot_ConnectorTo API docTo spec);

128.        type Plot_Gradient is new Integer;

129.        --  Indicate which color components vary along the gradient

131.        Gradient_H : constant Plot_GradientTo API docTo spec; --  Hue

132.        Gradient_V : constant Plot_GradientTo API docTo spec; --  Value

133.        Gradient_S : constant Plot_GradientTo API docTo spec; --  Saturation

135.        type Plot_Symbol_Type is

136.          (Symbol_None,

137.           Symbol_Square,

138.           Symbol_Circle,

139.           Symbol_Up_Triangle,

140.           Symbol_Down_Triangle,

141.           Symbol_Right_Triangle,

142.           Symbol_Left_Triangle,

143.           Symbol_Diamond,

144.           Symbol_Plus,

145.           Symbol_Cross,

146.           Symbol_Star,

147.           Symbol_Dot,

148.           Symbol_Impulse);

149.        --  Type of symbol used to represent the points in a graph.

150.        pragma Convention (C, Plot_Symbol_TypeTo API docTo spec);

152.        type Plot_Symbol_Style is

153.          (Symbol_Empty,

154.           Symbol_Filled,

155.           Symbol_Opaque);

156.        --  Style used to draw the points in a graph.

157.        pragma Convention (C, Plot_Symbol_StyleTo API docTo spec);

159.        type Plot_Line_Style is

160.          (Line_None,

161.           Line_Solid,

162.           Line_Dotted,

163.           Line_Dashed,

164.           Line_Dot_Dash,

165.           Line_Dot_Dot_Dash,

166.           Line_Dot_Dash_Dash);

167.        --  Lines used to connect two adjacent points in a graph.

168.        pragma Convention (C, Plot_Line_StyleTo API docTo spec);

170.        type Plot_Angle is (Angle_0, Angle_90, Angle_180, Angle_270);

171.        --  Valid values for the angles of texts and titles.

172.        pragma Convention (C, Plot_AngleTo API docTo spec);

174.        --------------------

175.        -- Plot functions --

176.        --------------------

177.        --  Plot functions should generate a unique Y value given a parameter.

178.        --  These can be used for instance to represent exactly mathematical

179.        --  functions.

180.        --  Note that due to the C interface, the subprograms in Gtk.Extra.Plot and

181.        --  in this package expect functions that take a System.Address as a

182.        --  parameter. However, since it is much more convenient in your application

183.        --  to get a Gtk_Plot_Record directly, GtkAda includes a generic function

184.        --  that automatically does the conversion for you (see

185.        --  Gtk.Plot.Generic_Plot_Function).

187.        type Plot_Function is access function

188.          (Plot  : System.Address;

189.           Set   : Gtk_Plot_DataTo API docTo spec;

190.           X     : GdoubleTo API docTo spec;

191.           Error : access GbooleanTo API docTo spec) return GdoubleTo API docTo spec;

192.        --  Function used for plotting.

193.        --  It should return the value associated with X in its graph, and set

194.        --  Error to True if there was an error while calculating the value.

196.        pragma Convention (C, Plot_FunctionTo API docTo spec);

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

199.        -- Creating a Data set --

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

202.        procedure Gtk_NewTo API docTo body (Data : out Gtk_Plot_DataTo API docTo spec; Func : Plot_FunctionTo API docTo spec := null);

203.        --  Creates a new data set. Its values can either be generated automatically

204.        --  from Func, or will have to be set explicitely using the other

205.        --  subprograms in this package.

207.        procedure InitializeTo API docTo body

208.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body'Class; Func : Plot_FunctionTo API docTo spec := null);

209.        --  Internal initialization function.

210.        --  See the section "Creating your own widgets" in the documentation.

212.        function Get_TypeTo API docTo body return Gtk.Gtk_TypeTo API docTo spec;

213.        --  Return the internal value associated with a Gtk_Plot_Data.

215.        procedure Set_NameTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Name : String);

216.        --  Set the name used internally for that dataset.

217.        --  This name does not appear anywhere on the screen, but it is easier to

218.        --  find the dataset afterward by using this name.

220.        procedure CloneTo API docTo body

221.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body;

222.           Copy : access Gtk_Plot_Data_RecordTo API docTo specTo body'Class);

223.        --  Copy the contents of Data into Copy, which must have been allocated

224.        --  first

226.        -------------------

227.        -- Drawing a set --

228.        -------------------

229.        --  Although a set is basically a list of values, it is closely associated

230.        --  with its representation on the screen (see the children of Gtk_Plot_Data

231.        --  for various possible representations).

232.        --  The Gtk.Extra packages are designed so that the drawing can be done

233.        --  either to the screen (through a Gdk adapter), to a postscript file for

234.        --  easy printing, or to any other media.

236.        procedure PaintTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

237.        --  Emits the "draw_data" signal to request a redrawing of the data set.

239.        procedure UpdateTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

240.        --  Indicates that the data has changed, and the graphical view should

241.        --  reflect this.

243.        procedure Draw_PointsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; N : GintTo API docTo spec);

244.        --  Draw the N last (most recent) values of the Data set on the screen.

245.        --  If N is greater than the actual number of values in Data, then they are

246.        --  all displayed. This subprogram should be used when you want to

247.        --  periodically update the contents of a dataset (you would then modify

248.        --  the number of points in the dataset with a call to Set_Numpoints, then

249.        --  register the new points with Set_X and Set_Y, and finally refresh the

250.        --  dataset with a call to Draw_Points and Gtk.Plot.Refresh).

252.        procedure Draw_SymbolTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; X, Y : GdoubleTo API docTo spec);

253.        --  Draw the current symbol (see Set_Symbol) at specific coordinates on

254.        --  the screen.

256.        ----------------

257.        -- Dimensions --

258.        ----------------

259.        --  The coordinates of the points to draw are specified in space. Therefore,

260.        --  they have multiple coordinates, each associate with a specific

261.        --  dimension.

262.        --  The name of dimensions below must be one of "x", "y", "z", "dx", "dy",

263.        --  "dz", "a", "da".

264.        --  "d..." are the size (precision of these points). A bigger symbol is

265.        --  displayed for the points whose (dx,dy) is bigger.

266.        --  "a" is used to specify the size of the symbols. When plotting boxes in

267.        --  two dimensions, "Z" is used to specify the size of the box.

269.        procedure Dimension_Set_PointsTo API docTo body

270.          (Data   : access Gtk_Plot_Data_RecordTo API docTo specTo body;

271.           Name   : String;

272.           Points : Gdouble_Array_AccessTo API docTo spec);

273.        --  Set the coordinates of the points along one dimension

275.        procedure Set_NumpointsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Num : GintTo API docTo spec);

276.        --  Set the number of points that should be expected in the graph.

277.        --  Note that this does not automatically resize all the internal structure,

278.        --  it just indicates what size the parameters to Set_X, Set_Y,... should

279.        --  have.

281.        function Get_NumpointsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return GintTo API docTo spec;

282.        --  Return the number of points expected in the graph.

284.        -------------------------

285.        -- Manipulating values --

286.        -------------------------

287.        --  These are older functions, kept for compatibility. They provide a

288.        --  somewhat simpler interface to the dimensions, but the use of dimensions

289.        --  is recommended.

290.        --  See the comment for dimensions on the meaning of X, Y, Dx, Dy,...

292.        procedure Set_PointsTo API docTo body

293.          (Data   : access Gtk_Plot_Data_RecordTo API docTo specTo body;

294.           X, Y, Dx, Dy : Gdouble_Array_AccessTo API docTo spec);

295.        --  Set some explicit points in the set.

296.        --  Note that the set must not be associated with a function, or the points

297.        --  will simply be ignored.

298.        --  All of the arrays must have the same length, the behavior is undefined

299.        --  otherwise.

301.        procedure Get_PointsTo API docTo body

302.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body;

303.           XTo API docTo body    : out Points_ArrayTo API docTo spec;

304.           YTo API docTo body    : out Points_ArrayTo API docTo spec;

305.           DxTo API docTo body   : out Points_ArrayTo API docTo spec;

306.           DyTo API docTo body   : out Points_ArrayTo API docTo spec);

307.        --  Return the value of the points in the set.

308.        --  Null-length arrays are returned if the set is associated with a

309.        --  function, since no explicit point has been set.

311.        procedure Set_XTo API docTo body

312.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; X : Gdouble_Array_AccessTo API docTo spec);

313.        procedure Set_YTo API docTo body

314.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Y : Gdouble_Array_AccessTo API docTo spec);

315.        procedure Set_ZTo API docTo body

316.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Z : Gdouble_Array_AccessTo API docTo spec);

317.        procedure Set_ATo API docTo body

318.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; A : Gdouble_Array_AccessTo API docTo spec);

319.        --  Set the values for one specific coordinate in the set.

320.        --  The array must have a length of Get_Numpoints (if GtkAda was

321.        --  compiled with assertions enabled, an exception will be raised if the

322.        --  length are different).

323.        --  No copy of the array is made for efficiency reasons, thus modifying

324.        --  the array content later on will also modify the plot.

326.        procedure Set_A_ScaleTo API docTo body

327.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; A_Scale : GdoubleTo API docTo spec);

328.        function Get_A_ScaleTo API docTo body

329.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return GdoubleTo API docTo spec;

330.        --  Changes the scale used for the "A" coordinate

332.        procedure Set_DxTo API docTo body

333.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Dx : Gdouble_Array_AccessTo API docTo spec);

334.        procedure Set_DyTo API docTo body

335.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Dy : Gdouble_Array_AccessTo API docTo spec);

336.        procedure Set_DzTo API docTo body

337.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Dz : Gdouble_Array_AccessTo API docTo spec);

338.        --  Set the precision of the points in the set. A bigger symbol is displayed

339.        --  for the points whose (Dx, Dy, Dz) is bigger.

340.        --  The array must have a length of Get_Numpoints (if GtkAda was

341.        --  compiled with assertions enabled, an exception will be raised if the

342.        --  length are different).

343.        --  No copy of the array is made for efficiency reasons, thus modifying

344.        --  the array content later on will also modify the plot.

346.        procedure Set_DaTo API docTo body

347.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Da : Gdouble_Array_AccessTo API docTo spec);

348.        --  Specifies the colors to use for the points.

349.        --  The color of the symbols is detemined using the gradient. the gradient

350.        --  has (min, max) values, and corresponding colors. The symbol's color is

351.        --  interpolated between these values using hue/saturation/value depending

352.        --  on the gradient_mask.

354.        function Get_XTo API docTo body  (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

355.        function Get_YTo API docTo body  (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

356.        function Get_ZTo API docTo body  (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

357.        function Get_ATo API docTo body  (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

358.        function Get_DxTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

359.        function Get_DyTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

360.        function Get_DzTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

361.        function Get_DaTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Points_ArrayTo API docTo spec;

362.        --  Return the coordinates for the points in the set.

363.        --  This is a direct access to the underlying C array, thus modifying this

364.        --  array's contents also modifies the graph.

365.        --  See the corresponding Set_* functions for a definition of the

366.        --  coordinates

368.        ------------

369.        -- Labels --

370.        ------------

371.        --  Each point in the data set can be associated with a label that describes

372.        --  it. This is only relevant for data sets where you explicitely give

373.        --  values, not when the values are generated by a function.

375.        procedure Set_LabelsTo API docTo body

376.          (Data   : access Gtk_Plot_Data_RecordTo API docTo specTo body;

377.           Labels : Gtkada.Types.Chars_Ptr_ArrayTo API docTo spec);

378.        --  Set the labels associated which each point in the canvas.

379.        --  There must be at least Get_Numpoints elements in Labels, or the

380.        --  behavior is undefined

382.        function Get_LabelsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body)

383.           return Gtkada.Types.Chars_Ptr_ArrayTo API docTo spec;

384.        --  Return the labels associated with the points in the data set.

385.        --  Note that this returns a *copy* of the actual array, and thus might

386.        --  be expensive to call.

388.        procedure Show_LabelsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Show : Boolean);

389.        --  Indicate whether the labels should be displayed next to each point in

390.        --  the data set. This has no effect if no labels were specified.

392.        procedure Labels_Set_AttributesTo API docTo body

393.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

394.           Font       : String;

395.           Height     : GintTo API docTo spec;

396.           AngleTo API docTo body      : Plot_AngleTo API docTo spec;

397.           ForegroundTo API docTo body : Gdk.Color.Gdk_ColorTo API docTo specTo body;

398.           BackgroundTo API docTo body : Gdk.Color.Gdk_ColorTo API docTo specTo body);

399.        --  Set the properties of the labels

401.        ----------------------------

402.        -- Symbols and Connectors --

403.        ----------------------------

404.        --  Each point that is explicitely set in the data set through the

405.        --  Set_X, Set_Y,... subprograms is visually associated with a symbol. There

406.        --  are several representations for the symbols.

407.        --

408.        --  All these symbols are then connected by a line, a curve or any other

409.        --  link. These are called connectors.

410.        --

411.        --  Each symbol, in addition to being connected to the next one with a

412.        --  connector, can also be linked to the axis X=0, Y=0 or Z=0 so that it is

413.        --  easier to read its coordinates. These are called errbars, and they must

414.        --  be explicitely shown.

416.        procedure Set_SymbolTo API docTo body

417.          (Data         : access Gtk_Plot_Data_RecordTo API docTo specTo body;

418.           The_TypeTo API docTo body     : Plot_Symbol_TypeTo API docTo spec;

419.           StyleTo API docTo body        : Plot_Symbol_StyleTo API docTo spec;

420.           Size         : GintTo API docTo spec;

421.           Line_Width   : GfloatTo API docTo spec;

422.           ColorTo API docTo body        : Gdk.Color.Gdk_ColorTo API docTo specTo body;

423.           Border_ColorTo API docTo body : Gdk.Color.Gdk_ColorTo API docTo specTo body);

424.        --  Set the visual aspect of the symbols.

426.        procedure Get_SymbolTo API docTo body

427.          (Data         : access Gtk_Plot_Data_RecordTo API docTo specTo body;

428.           The_TypeTo API docTo body     : out Plot_Symbol_TypeTo API docTo spec;

429.           StyleTo API docTo body        : out Plot_Symbol_StyleTo API docTo spec;

430.           Size         : out GintTo API docTo spec;

431.           Line_Width   : out GintTo API docTo spec;

432.           ColorTo API docTo body        : out Gdk.Color.Gdk_ColorTo API docTo specTo body;

433.           Border_ColorTo API docTo body : out Gdk.Color.Gdk_ColorTo API docTo specTo body);

434.        --  Return the visual characteristics of the symbols.

436.        procedure Set_ConnectorTo API docTo body

437.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; ConnectorTo API docTo body : Plot_ConnectorTo API docTo spec);

438.        --  Set the style of the connectors.

440.        function Get_ConnectorTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body)

441.           return Plot_ConnectorTo API docTo spec;

442.        --  Return the connector style used for the data set.

444.        procedure Set_Line_AttributesTo API docTo body

445.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

446.           StyleTo API docTo body      : Plot_Line_StyleTo API docTo spec;

447.           Cap_StyleTo API docTo body  : Gdk.GC.Gdk_Cap_StyleTo API docTo spec;

448.           Join_StyleTo API docTo body : Gdk.GC.Gdk_Join_StyleTo API docTo spec;

449.           Width      : GfloatTo API docTo spec;

450.           ColorTo API docTo body      : Gdk.Color.Gdk_ColorTo API docTo specTo body);

451.        --  Set the line style used for the connectors.

453.        procedure Get_Line_AttributesTo API docTo body

454.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

455.           StyleTo API docTo body      : out Plot_Line_StyleTo API docTo spec;

456.           Cap_StyleTo API docTo body  : out Gdk.GC.Gdk_Cap_StyleTo API docTo spec;

457.           Join_StyleTo API docTo body : out Gdk.GC.Gdk_Join_StyleTo API docTo spec;

458.           Width      : out GfloatTo API docTo spec;

459.           ColorTo API docTo body      : out Gdk.Color.Gdk_ColorTo API docTo specTo body);

460.        --  Return the line attributes used for the connectors.

462.        procedure Set_X_AttributesTo API docTo body

463.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

464.           StyleTo API docTo body      : Plot_Line_StyleTo API docTo spec;

465.           Cap_StyleTo API docTo body  : Gdk.GC.Gdk_Cap_StyleTo API docTo spec;

466.           Join_StyleTo API docTo body : Gdk.GC.Gdk_Join_StyleTo API docTo spec;

467.           Width      : GfloatTo API docTo spec;

468.           ColorTo API docTo body      : Gdk.Color.Gdk_ColorTo API docTo specTo body);

469.        --  Set the style of the lines used to connect the symbols to the X axis.

471.        procedure Set_Y_AttributesTo API docTo body

472.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

473.           StyleTo API docTo body      : Plot_Line_StyleTo API docTo spec;

474.           Cap_StyleTo API docTo body  : Gdk.GC.Gdk_Cap_StyleTo API docTo spec;

475.           Join_StyleTo API docTo body : Gdk.GC.Gdk_Join_StyleTo API docTo spec;

476.           Width      : GfloatTo API docTo spec;

477.           ColorTo API docTo body      : Gdk.Color.Gdk_ColorTo API docTo specTo body);

478.        --  Set the style of the lines used to connect the symbols to the Y axis.

480.        procedure Set_Z_AttributesTo API docTo body

481.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

482.           StyleTo API docTo body      : Plot_Line_StyleTo API docTo spec;

483.           Cap_StyleTo API docTo body  : Gdk.GC.Gdk_Cap_StyleTo API docTo spec;

484.           Join_StyleTo API docTo body : Gdk.GC.Gdk_Join_StyleTo API docTo spec;

485.           Width      : GfloatTo API docTo spec;

486.           ColorTo API docTo body      : Gdk.Color.Gdk_ColorTo API docTo specTo body);

487.        --  Set the style of the lines used to connect the symbols to the Z axis.

489.        procedure Show_XerrbarsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

490.        procedure Show_YerrbarsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

491.        procedure Show_ZerrbarsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

492.        --  Indicate that each symbol should be connected to the various axis

494.        procedure Hide_XerrbarsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

495.        procedure Hide_YerrbarsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

496.        procedure Hide_ZerrbarsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

497.        --  Indicate the the symbol should not be connected to the axis.

499.        procedure Fill_AreaTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Fill : Boolean);

500.        --  Indicate whether the area between two points should be filled or not.

502.        function Area_Is_FilledTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body)

503.           return Boolean;

504.        --  Indicate whether the area between two points is filled.

506.        -------------

507.        -- Legends --

508.        -------------

509.        --  In addition to the drawing corresponding to the data set, it is possible

510.        --  to display a box that contains a legend. This is particulary useful when

511.        --  multiple data sets are displayed on the same plot.

513.        procedure Set_LegendTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Legend : String);

514.        --  Set the string printed in the legend for that data set.

515.        --  Note that an entry can exist in the legend even if there is no name

516.        --  associated with the graph.

518.        procedure Show_LegendTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

519.        --  An entry will be made in the plot's legend for that dataset.

521.        procedure Hide_LegendTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

522.        --  No entry will appear in the plot's legend for that dataset.

524.        procedure Set_Legend_PrecisionTo API docTo body

525.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Precision : GintTo API docTo spec);

526.        --  Number of digits to display when the legends is associated with values,

527.        --  as is the case for gradients.

529.        function Get_Legend_PrecisionTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body)

530.           return GintTo API docTo spec;

531.        --  Return the number of digits used for values in the legend

533.        ---------------

534.        -- Gradients --

535.        ---------------

536.        --  The symbols displayed in the plot can be assigned specific colors. But

537.        --  they can also compute their own color by picking it in a gradient,

538.        --  depending on the value.

540.        --  See function Gtk.Plot.Gradient

542.        procedure Move_GradientTo API docTo body

543.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; X, Y : GdoubleTo API docTo spec);

545.        procedure Set_Gradient_SizeTo API docTo body

546.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Size : GintTo API docTo spec);

548.        procedure Reset_GradientTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

549.        --  Reset the gradient to its default value

551.        procedure Reset_Gradient_ColorsTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

552.        --  Reset the colors of the gradient to their default values

554.        procedure Gradient_Use_Custom_ColorsTo API docTo body

555.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Custom : Boolean);

556.        function Gradient_Custom_ColorsTo API docTo body

557.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Boolean;

558.        --  Whether the gradient uses custom colors

560.        procedure Set_Gradient_MaskTo API docTo body

561.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Mask : Plot_GradientTo API docTo spec);

562.        function Get_Gradient_MaskTo API docTo body

563.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Plot_GradientTo API docTo spec;

564.        --  Set or Get how the component of the colors vary along the gradient.

566.        procedure Gradient_Set_VisibleTo API docTo body

567.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Visible : Boolean);

568.        function Gradient_VisibleTo API docTo body

569.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Boolean;

570.        --  Set or get whether the gradient is currently visible (this looks like a

571.        --  legend for the plot)

573.        procedure Gradient_Autoscale_ATo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

574.        procedure Gradient_Autoscale_DaTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

575.        procedure Gradient_Autoscale_ZTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

576.        --  ???

578.        procedure Set_Gradient_ColorsTo API docTo body

579.          (Data     : access Gtk_Plot_Data_RecordTo API docTo specTo body;

580.           MinTo API docTo body, MaxTo API docTo body : Gdk.Color.Gdk_ColorTo API docTo specTo body);

581.        procedure Get_Gradient_ColorsTo API docTo body

582.          (Data     : access Gtk_Plot_Data_RecordTo API docTo specTo body;

583.           MinTo API docTo body, MaxTo API docTo body : out Gdk.Color.Gdk_ColorTo API docTo specTo body);

584.        --  Set or Get the colors that define the gradient. The colors will vary

585.        --  from Min to Max along the components specified in Set_Gradient_Mask.

587.        procedure Set_Gradient_Nth_ColorTo API docTo body

588.          (Data  : access Gtk_Plot_Data_RecordTo API docTo specTo body;

589.           Level : GuintTo API docTo spec;

590.           ColorTo API docTo body : Gdk.Color.Gdk_ColorTo API docTo specTo body);

591.        function Get_Gradient_Nth_ColorTo API docTo body

592.          (Data  : access Gtk_Plot_Data_RecordTo API docTo specTo body; Level : GuintTo API docTo spec)

593.           return Gdk.Color.Gdk_ColorTo API docTo specTo body;

594.        --  Set or Get the nth color in the gradient

596.        procedure Set_Gradient_Outer_ColorsTo API docTo body

597.          (Data     : access Gtk_Plot_Data_RecordTo API docTo specTo body;

598.           MinTo API docTo body, MaxTo API docTo body : Gdk.Color.Gdk_ColorTo API docTo specTo body);

599.        procedure Get_Gradient_Outer_ColorsTo API docTo body

600.          (Data     : access Gtk_Plot_Data_RecordTo API docTo specTo body;

601.           MinTo API docTo body, MaxTo API docTo body : out Gdk.Color.Gdk_ColorTo API docTo specTo body);

602.        --  Set the outer colors for the gradient

604.        procedure Set_GradientTo API docTo body

605.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

606.           Min, Max   : GdoubleTo API docTo spec;

607.           Nlevels    : GintTo API docTo spec;

608.           Nsublevels : GintTo API docTo spec);

609.        procedure Get_GradientTo API docTo body

610.          (Data       : access Gtk_Plot_Data_RecordTo API docTo specTo body;

611.           Min, Max   : out GdoubleTo API docTo spec;

612.           Nlevels    : out GintTo API docTo spec;

613.           Nsublevels : out GintTo API docTo spec);

614.        --  Define the values associated with the minimal color and the maximal

615.        --  color. Any value in between will have a color computed in between.

616.        --  Nlevels is the number of ticks to display in the gradient.

618.        procedure Get_Gradient_LevelTo API docTo body

619.          (Data  : access Gtk_Plot_Data_RecordTo API docTo specTo body;

620.           Level : GdoubleTo API docTo spec;

621.           ColorTo API docTo body : out Gdk.Color.Gdk_ColorTo API docTo specTo body);

622.        --  Return the color associated with a specific level.

623.        --  The color depends on the parameters to Set_Gradient and

624.        --  Set_Gradient_Colors.

626.        procedure Gradient_Set_StyleTo API docTo body

627.          (Data      : access Gtk_Plot_Data_RecordTo API docTo specTo body;

628.           StyleTo API docTo body     : Plot_Label_StyleTo API docTo spec;

629.           Precision : GintTo API docTo spec);

630.        --  ???

632.        procedure Gradient_Set_ScaleTo API docTo body

633.          (Data      : access Gtk_Plot_Data_RecordTo API docTo specTo body;

634.           ScaleTo API docTo body     : Plot_ScaleTo API docTo spec);

635.        --  Set the scale of the gradient

637.        -------------

638.        -- Markers --

639.        -------------

641.        function Add_MarkerTo API docTo body

642.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Point : GuintTo API docTo spec)

643.           return Gtk_Plot_MarkerTo API docTo spec;

644.        --  Add a new marker

646.        procedure Remove_MarkerTo API docTo body

647.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Marker : Gtk_Plot_MarkerTo API docTo spec);

648.        --  Remove a marker from the plot

650.        procedure Remove_MarkersTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

651.        --  Remove all markers

653.        procedure Show_MarkersTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body; Show : Boolean);

654.        --  Whether markers should be shown

656.        function Markers_VisibleTo API docTo body

657.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body) return Boolean;

658.        --  Whether markers are currently visible

660.        ---------------

661.        -- User Data --

662.        ---------------

663.        --  It is possible to associated your own user data with a plot. This is

664.        --  the mechanism provided by the C version of gtkextra. However, the best

665.        --  way to do this in Ada is to inherit from Gtk_Plot_Data_Record (or one

666.        --  of its children), and add your own fields.

668.        procedure Set_LinkTo API docTo body

669.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body;

670.           Link : System.Address);

671.        --  Associate some user data with Data.

672.        --  It is the responsability of the user to do some convert conversion to

673.        --  System.Address.

675.        function Get_LinkTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body)

676.           return System.Address;

677.        --  Return the user data associated with Data, or Null_Address if there is

678.        --  none.

680.        procedure Remove_LinkTo API docTo body (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body);

681.        --  Remove the user data associated with Data.

683.        --  <doc_ignore>

684.        function To_Double_Array is new Unchecked_Conversion

685.          (System.Address, No_Range_Gdouble_Array_AccessTo API docTo spec);

686.        --  </doc_ignore>

688.     private

689.        type Gtk_Plot_Data_RecordTo API docTo spec is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body with

690.          null record;

692.        Gradient_HTo API docTo spec : constant Plot_GradientTo API docTo spec := 1;

693.        Gradient_VTo API docTo spec : constant Plot_GradientTo API docTo spec := 2;

694.        Gradient_STo API docTo spec : constant Plot_GradientTo API docTo spec := 4;

696.        for Plot_AngleTo API docTo spec use

697.          (Angle_0   => 0,

698.           Angle_90  => 90,

699.           Angle_180 => 180,

700.           Angle_270 => 270);

702.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_plot_data_get_type");

703.     end Gtk.Extra.Plot_DataTo API docTo specTo body;

705.     --  Unbound:

706.     --    gtk_plot_data_new_iterator

707.     --    gtk_plot_data_clone

708.     --    gtk_plot_data_get_gradient_outer_colors

709.     --    gtk_plot_data_add_dimension

710.     --    gtk_plot_data_remove_dimension

711.     --    gtk_plot_data_find_dimension

712.     --    gtk_plot_data_required_dimensions

713.     --    gtk_plot_data_independent_dimensions

714.     --    gtk_plot_data_dimension_set_array

715.     --    gtk_plot_data_dimension_get_array

716.     --    gtk_plot_data_get_point

717.     --    gtk_plot_get_gradient_allocation

718.     --  These subprograms appear in gtkplotdata.h, but not in gtkplotdata.c

719.     --    gtk_plot_data_dimension_set_scale

720.     --    gtk_plot_data_dimension_get_scale