## 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-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.     --

32.     --  This package implements a high-level, general purpose plotting widget.

33.     --  You can display any set of data (set of points, curve defined by a

34.     --  parametric function, ...). This widget can automatically display them

35.     --  as a curve, along with labelled axis, axis tic marks, legends,...

36.     --

37.     --  This is the base class, that provides 2D graphics. Some children provide

38.     --  polar-coordinates and 3D graphics in addition.

39.     --

40.     --  It fully supports the drag-and-drop protocol for all of its children,

41.     --  which means that the user can interactively move them in the Gtk_Plot

42.     --  area.

43.     --

44.     --  A Gtk_Plot is closely associated with a Gdk_Drawable, on which all the

45.     --  drawings are done. It can be done anywhere within that drawable, its

46.     --  "position" is indicated by a tuple (X, Y), which are two values between

47.     --  0.0 and 1.0 (from left to right, or from top to bottom).

48.     --  Its size is also given as a ratio other the drawable's size.

49.     --

50.     --  Most points in the plot have also this relative coordinates systems, which

51.     --  makes it really easy to handle resizing of a plot window.

52.     --

53.     --  See the package Gtk.Extra.Plot_Ps for a way to easily print a Gtk_Plot to

54.     --  a postscript file.

55.     --

56.     --  In this package, font parameters are sometimes required. Here is the

57.     --  list of possible fonts used by Gtk.Extra:

58.     --

59.     --   - "Times-Roman",

60.     --   - "Times-Italic",

61.     --   - "Times-Bold",

62.     --   - "Times-BoldItalic",

63.     --   - "AvantGarde-Book",

64.     --   - "AvantGarde-BookOblique",

65.     --   - "AvantGarde-Demi",

66.     --   - "AvantGarde-DemiOblique",

67.     --   - "Bookman-Light",

68.     --   - "Bookman-LightItalic",

69.     --   - "Bookman-Demi",

70.     --   - "Bookman-DemiItalic",

71.     --   - "Courier",

72.     --   - "Courier-Oblique",

73.     --   - "Courier-Bold",

74.     --   - "Courier-BoldOblique",

75.     --   - "Helvetica",

76.     --   - "Helvetica-Oblique",

77.     --   - "Helvetica-Bold",

78.     --   - "Helvetica-BoldOblique",

79.     --   - "Helvetica-Narrow",

80.     --   - "Helvetica-Narrow-Oblique",

81.     --   - "Helvetica-Narrow-Bold",

82.     --   - "Helvetica-Narrow-BoldOblique",

83.     --   - "NewCenturySchoolbook-Roman",

84.     --   - "NewCenturySchoolbook-Italic",

85.     --   - "NewCenturySchoolbook-Bold",

86.     --   - "NewCenturySchoolbook-BoldItalic",

87.     --   - "Palatino-Roman",

88.     --   - "Palatino-Italic",

89.     --   - "Palatino-Bold",

90.     --   - "Palatino-BoldItalic",

91.     --   - "Symbol",

92.     --   - "ZapfChancery-MediumItalic",

93.     --   - "ZapfDingbats",

94.     --

95.     --  </description>

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

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

98.     --  <testgtk>create_plot.adb</testgtk>

99.     --  <screenshot>gtk-plot</screenshot>

101.     with Glib.ObjectTo API docTo specTo body;

103.     with System;

104.     with Gdk.ColorTo API docTo specTo body;

105.     with Gdk.DrawableTo API docTo specTo body;

106.     with Gdk.PixmapTo API docTo specTo body;

107.     with Gdk.RectangleTo API docTo specTo body;

108.     with Gtk.EnumsTo API docTo specTo body;

109.     with Gtk.Extra.Plot_DataTo API docTo specTo body;   use Gtk.Extra.Plot_DataTo API docTo specTo body;

110.     with Gtk.WidgetTo API docTo specTo body;

112.     package Gtk.Extra.PlotTo API docTo specTo body is

114.        type Gtk_Plot_RecordTo API docTo body is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body with private;

115.        type Gtk_Plot is access all Gtk_Plot_RecordTo API docTo specTo body'Class;

117.        type Gtk_Plot_Axis_RecordTo API docTo body is new Glib.Object.GObject_RecordTo API docTo specTo body with private;

118.        type Gtk_Plot_Axis is access all Gtk_Plot_Axis_RecordTo API docTo specTo body'Class;

119.        --  One of the axis of the plot.

120.        --  There are up to six axis for each plot, one on each side. They can have

121.        --  ticks, labels, etc.

123.        type Gtk_Plot_Text is new Gdk.C_ProxyTo API docTo spec;

124.        --  A text that can be displayed anywhere on the plot.

126.        type Gtk_Plot_Line is new Gdk.C_ProxyTo API docTo spec;

127.        --  A simple line drawn on the plot.

129.        type Gtk_Plot_Symbol is new Gdk.C_ProxyTo API docTo spec;

130.        type Gtk_Plot_Tick   is new Gdk.C_ProxyTo API docTo spec;

131.        type Gtk_Plot_Ticks  is new Gdk.C_ProxyTo API docTo spec;

133.        type Plot_Vector is record

134.           X, Y, Z : GdoubleTo API docTo spec;

135.        end record;

137.        ----------------

138.        -- Enum types --

139.        ----------------

141.        type Plot_Border_Style is

142.          (Border_None,

143.           --  No border is drawn

145.           Border_Line,

146.           --  A simple line on each side

148.           Border_Shadow

149.           --  The right and bottom lines are

150.           --  thicker

151.          );

152.        --  Border types used for legends.

153.        pragma Convention (C, Plot_Border_StyleTo API docTo spec);

155.        --     subtype Plot_Scale        is Gtk.Extra.Plot_Data.Plot_Scale;

156.        --     subtype Plot_Label_Style  is Gtk.Extra.Plot_Data.Plot_Label_Style;

157.        --     subtype Plot_Symbol_Style is Gtk.Extra.Plot_Data.Plot_Symbol_Style;

158.        --     subtype Plot_Symbol_Type  is Gtk.Extra.Plot_Data.Plot_Symbol_Type;

159.        --     subtype Plot_Line_Style   is Gtk.Extra.Plot_Data.Plot_Line_Style;

160.        --     subtype Plot_Connector    is Gtk.Extra.Plot_Data.Plot_Connector;

162.        --  In C, these types are declared in gtkplot.h. However, because of type

163.        --  circularity, we need to define them in Gtk.Extra.Plot_Data, and have

164.        --  subtypes here. This would lead to unnecessary required qualification in

165.        --  user code though...

167.        type Plot_Label_Pos is new Integer;

168.        --  Position of labels along an axis.

170.        Label_None   : constant Plot_Label_PosTo API docTo spec;

171.        Label_In     : constant Plot_Label_PosTo API docTo spec;

172.        Label_Out    : constant Plot_Label_PosTo API docTo spec;

174.        type Plot_Error is (Error_Div_Zero, Error_Log_Neg);

175.        --  Errors that can be encountered while calculating a graph.

176.        pragma Convention (C, Plot_ErrorTo API docTo spec);

178.        type Plot_Axis_Pos is (Axis_Left, Axis_Right, Axis_Top, Axis_Bottom);

179.        --  Where the axis should be put

180.        pragma Convention (C, Plot_Axis_PosTo API docTo spec);

182.        type Plot_Orientation is (Axis_X, Axis_Y, Axis_Z);

183.        --  How to reference axis in 3D plots

184.        pragma Convention (C, Plot_OrientationTo API docTo spec);

186.        type Plot_Ticks_Pos is new Integer;

187.        --  The position and orientation of the ticks along an axis.

188.        --  See the constants below for the possible values.

189.        --  Note also that not all the values are valid with all types of axis.

191.        Ticks_None  : constant Plot_Ticks_PosTo API docTo spec;

192.        Ticks_In    : constant Plot_Ticks_PosTo API docTo spec;

193.        Ticks_Out   : constant Plot_Ticks_PosTo API docTo spec;

195.        ---------------------

196.        -- Creating a plot --

197.        ---------------------

199.        procedure Gtk_NewTo API docTo body

200.          (Plot     : out Gtk_PlotTo API docTo spec;

201.           Drawable : Gdk.Drawable.Gdk_DrawableTo API docTo spec := Gdk.Drawable.Null_DrawableTo API docTo spec);

202.        --  Create a new plot, that will be displayed in Drawable.

203.        --  All the dataset, labels, axis,... associated with the plot will be drawn

204.        --  in that drawable, which must have been created beforehand.

205.        --  Note that the drawable can also be set later with Set_Drawable.

207.        procedure Gtk_NewTo API docTo body

208.          (Plot     : out Gtk_PlotTo API docTo spec;

209.           Width    : GdoubleTo API docTo spec;

210.           Height   : GdoubleTo API docTo spec;

211.           Drawable : Gdk.Drawable.Gdk_DrawableTo API docTo spec := Gdk.Drawable.Null_DrawableTo API docTo spec);

212.        --  Create a new plot with a specific size.

214.        procedure InitializeTo API docTo body

215.          (Plot     : access Gtk_Plot_RecordTo API docTo specTo body'Class;

216.           Drawable : Gdk.Drawable.Gdk_DrawableTo API docTo spec);

217.        --  Internal initialization function.

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

220.        procedure InitializeTo API docTo body

221.          (Plot     : access Gtk_Plot_RecordTo API docTo specTo body'Class;

222.           Drawable : Gdk.Drawable.Gdk_DrawableTo API docTo spec;

223.           Width    : GdoubleTo API docTo spec;

224.           Height   : GdoubleTo API docTo spec);

225.        --  Internal initialization function.

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

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

229.        --  Return the internal value associated with a Gtk_Plot.

231.        procedure Set_DrawableTo API docTo body

232.          (Plot     : access Gtk_Plot_RecordTo API docTo specTo body;

233.           Drawable : Gdk.Drawable.Gdk_DrawableTo API docTo spec);

234.        --  Modify the drawable on which the graphs are displayed.

235.        --  From now on, all the drawings will be done on that drawable. Note that

236.        --  they are not automatically copied to the new Drawable until the Plot

237.        --  needs to be redrawn.

239.        function Get_DrawableTo API docTo body

240.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Gdk.Drawable.Gdk_DrawableTo API docTo spec;

241.        --  Return the drawable on which the graphs are plotted.

243.        procedure Set_BackgroundTo API docTo body

244.          (Plot       : access Gtk_Plot_RecordTo API docTo specTo body;

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

246.        --  Change the background for the plot.

247.        --  Note that this has no effect if the plot has been set to transparent

248.        --  (see the flags below).

249.        --  The Plot is also redrawn as soon as you modify this color.

251.        procedure Set_Background_PixmapTo API docTo body

252.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body; Pixmap : Gdk.Pixmap.Gdk_PixmapTo API docTo spec);

253.        --  Specificy a background pixmap to use for the plot

255.        procedure Set_TransparentTo API docTo body

256.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body; Transparent : Boolean);

257.        --  Whether the plot is transparent. If Transparent is True, all background

258.        --  attributes are ignored (pixmap, color,...)

260.        function Is_TransparentTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Boolean;

261.        --  Whether the plot is current transparent

263.        procedure PaintTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body);

264.        --  Force an immediate repaint of the widget in its pixmap.

265.        --  The modification won't appear on the screen until you call Refresh.

266.        --  It is probably not a good idea to call this function directly, and it

267.        --  is more efficient to queue a draw request (see the Gtk.Widget package

268.        --  for related functions).

270.        procedure RefreshTo API docTo body

271.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

272.           AreaTo API docTo body : Gdk.Rectangle.Gdk_RectangleTo API docTo spec);

273.        --  Copy the plot's pixmap to the screen.

274.        --  The same comment as for Paint applies here, and you probably don't

275.        --  have to call this function yourself, since queuing a draw request is

276.        --  more efficient.

278.        ----------------------------

279.        --  Coordinates and sizes --

280.        ----------------------------

282.        procedure Get_PositionTo API docTo body

283.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

284.           X    : out GdoubleTo API docTo spec;

285.           Y    : out GdoubleTo API docTo spec);

286.        --  Return the position of the Plot within its drawable.

287.        --  X and Y are in the range 0.0 .. 1.0, where (0.0, 0.0) is the top-left

288.        --  corner and (1.0, 1.0) the bottom-right corner. The position can be

289.        --  modified by Move below.

291.        procedure Get_SizeTo API docTo body

292.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body;

293.           Width  : out GdoubleTo API docTo spec;

294.           Height : out GdoubleTo API docTo spec);

295.        --  Return the size of the Plot.

296.        --  Width and Height are both in the range 0.0 .. 1.0, where 1.0 means they

297.        --  occupy all the space available in the Drawable, 0.5 means they only

298.        --  occupy half of it.

300.        function Get_Internal_AllocationTo API docTo body

301.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Gtk.Widget.Gtk_AllocationTo API docTo spec;

302.        --  Return the real position/size of the plot inside its parent container.

303.        --  You should use this function instead of converting yourself the result

304.        --  of Get_Position and Get_Size.

306.        procedure Set_MagnificationTo API docTo body

307.          (Plot          : access Gtk_Plot_RecordTo API docTo specTo body;

308.           Magnification : GdoubleTo API docTo spec);

309.        --  Change the magnification level of the plot.

310.        --  1.0 is the default magnification, higher values will zoom in while lower

311.        --  values will zoom out.

313.        procedure MoveTo API docTo body

314.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

315.           X    : GdoubleTo API docTo spec;

316.           Y    : GdoubleTo API docTo spec);

317.        --  Move the plot widget inside its drawable.

318.        --  X and Y should both be in the range 0.0 .. 1.0 (from top-left corner

319.        --  to bottom-right corner).

321.        procedure ResizeTo API docTo body

322.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body;

323.           Width  : GdoubleTo API docTo spec;

324.           Height : GdoubleTo API docTo spec);

325.        --  Resize the widget.

326.        --  Width and Height should both be in the range 0.0 .. 1.0, this indicates

327.        --  which ratio of the drawable's screen real-estate they should use.

329.        procedure Move_ResizeTo API docTo body

330.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body;

331.           X      : GdoubleTo API docTo spec;

332.           Y      : GdoubleTo API docTo spec;

333.           Width  : GdoubleTo API docTo spec;

334.           Height : GdoubleTo API docTo spec);

335.        --  Move and resize the widget in a single operation.

336.        --  This is faster than doing each operation separately.

338.        procedure Get_PixelTo API docTo body

339.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

340.           Xx   : GdoubleTo API docTo spec;

341.           Yy   : GdoubleTo API docTo spec;

342.           X    : out GdoubleTo API docTo spec;

343.           Y    : out GdoubleTo API docTo spec);

344.        --  Get the screen coordinate (relative to Plot's parent) of a point.

345.        --  The initial coordinates (Xx, Yy) should be in the range 0.0 .. 1.0.

347.        procedure Clip_DataTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body; Clip : Boolean);

348.        --  If Clip is True, any drawing of a Gtk_Plot_Data will be limited to the

349.        --  area occupied by Plot. Otherwise, it might draw outside of Plot.

351.        procedure Get_PointTo API docTo body

352.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

353.           X    : GintTo API docTo spec;

354.           Y    : GintTo API docTo spec;

355.           Xx   : out GdoubleTo API docTo spec;

356.           Yy   : out GdoubleTo API docTo spec);

357.        --  Convert from an absolute screen coordinate to a relative one.

358.        --  (X, Y) should be relative to Plot's parent.

359.        --  This function is the opposite of Get_Pixel.

361.        procedure Set_XrangeTo API docTo body

362.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

363.           Xmin : GdoubleTo API docTo spec := 0.0;

364.           Xmax : GdoubleTo API docTo spec := 1.0);

365.        --  Set the range of visible points for this plot.

366.        --  Only the points of the graph those coordinates are in the range

367.        --  Xmin .. Xmax will be visible.

369.        procedure Set_YrangeTo API docTo body

370.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

371.           Ymin : GdoubleTo API docTo spec := 0.0;

372.           Ymax : GdoubleTo API docTo spec := 1.0);

373.        --  Set the range of visible points for this plot.

374.        --  Only the points of the graph those coordinates are in the range

375.        --  Xmin .. Xmax will be visible.

377.        procedure Set_RangeTo API docTo body

378.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

379.           Xmin : GdoubleTo API docTo spec := 0.0;

380.           Xmax : GdoubleTo API docTo spec := 1.0;

381.           Ymin : GdoubleTo API docTo spec := 0.0;

382.           Ymax : GdoubleTo API docTo spec := 1.0);

383.        --  Set both ranges at the same time

385.        procedure AutoscaleTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body);

386.        --  Calculate automically the appropriate ranges for the plot.

388.        procedure Get_XrangeTo API docTo body

389.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

390.           Xmin : out GdoubleTo API docTo spec;

391.           Xmax : out GdoubleTo API docTo spec);

392.        --  Get the current range for the X axis.

394.        procedure Get_YrangeTo API docTo body

395.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

396.           Ymin : out GdoubleTo API docTo spec;

397.           Ymax : out GdoubleTo API docTo spec);

398.        --  Get the current range for the X axis.

400.        procedure Set_XscaleTo API docTo body

401.          (Plot       : access Gtk_Plot_RecordTo API docTo specTo body;

402.           Scale_TypeTo API docTo body : Plot_ScaleTo API docTo spec);

403.        --  Set the type of the X axis (logarithmic, linear, ...).

405.        procedure Set_YscaleTo API docTo body

406.          (Plot       : access Gtk_Plot_RecordTo API docTo specTo body;

407.           Scale_TypeTo API docTo body : Plot_ScaleTo API docTo spec);

408.        --  Set the type of the Y axis (logarithmic, linear, ...).

410.        function Get_XscaleTo API docTo body

411.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Plot_ScaleTo API docTo spec;

412.        --  Get the type of the X axis.

414.        function Get_YscaleTo API docTo body

415.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Plot_ScaleTo API docTo spec;

416.        --  Get the type of the Y axis.

418.        procedure Reflect_XTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body; Reflect : Boolean);

419.        --  Reverse the direction of the X axis

421.        function Is_X_ReflectedTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Boolean;

422.        --  Whether the X axis is currently reflected

424.        procedure Reflect_YTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body; Reflect : Boolean);

425.        --  Reverse the direction of the Y axis

427.        function Is_Y_ReflectedTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Boolean;

428.        --  Whether the Y axis is currently reflected

430.        ----------

431.        -- Text --

432.        ----------

434.        function Put_TextTo API docTo body

435.          (Plot          : access Gtk_Plot_RecordTo API docTo specTo body;

436.           X             : GdoubleTo API docTo spec;

437.           Y             : GdoubleTo API docTo spec;

438.           Font          : String := "";

439.           Font_Height   : GintTo API docTo spec := 10;

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

441.           ForegroundTo API docTo body    : Gdk.Color.Gdk_ColorTo API docTo specTo body := Gdk.Color.Null_ColorTo API docTo specTo body;

442.           BackgroundTo API docTo body    : Gdk.Color.Gdk_ColorTo API docTo specTo body := Gdk.Color.Null_ColorTo API docTo specTo body;

443.           Transparent   : Boolean := False;

444.           JustificationTo API docTo body : Gtk.Enums.Gtk_JustificationTo API docTo spec := Gtk.Enums.Justify_Center;

445.           Text          : String := "") return Gtk_Plot_TextTo API docTo spec;

446.        --  Print some text in Plot.

447.        --  The text will be drawn at the relative coordinates (X, Y), with a

448.        --  specified Angle.

449.        --  If Font is the empty string, a default font and default Font_Height

450.        --  will be used. Likewise, default colors will be used if you don't

451.        --  specify any. Font should be the name of a postscript font, the list of

452.        --  which can be found in Gtk.Plot.Psfont.

453.        --  If Transparent is True, then no background will be drawn for the text.

455.        procedure Remove_TextTo API docTo body

456.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

457.           Text : Gtk_Plot_TextTo API docTo spec);

458.        --  Remove some text that is currently visible on the plot.

459.        --  Nothing is done if Text is currently not visible.

461.        procedure Text_Get_AreaTo API docTo body

462.          (Text          : Gtk_Plot_TextTo API docTo spec;

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

464.           JustTo API docTo body          : Gtk.Enums.Gtk_JustificationTo API docTo spec;

465.           Font_Name     : String;

466.           Font_Size     : GintTo API docTo spec;

467.           X             : out GintTo API docTo spec;

468.           Y             : out GintTo API docTo spec;

469.           Width         : out GintTo API docTo spec;

470.           Height        : out GintTo API docTo spec);

471.        --  Return the area currently occupied by a text.

472.        --  The coordinates are relative to the top-left corner of the plot in

473.        --  which the text was put.

475.        procedure Text_Get_SizeTo API docTo body

476.          (Text          : Gtk_Plot_TextTo API docTo spec;

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

478.           Font_Name     : String;

479.           Font_Size     : GintTo API docTo spec;

480.           Width         : out GintTo API docTo spec;

481.           Height        : out GintTo API docTo spec;

482.           Ascent        : out GintTo API docTo spec;

483.           Descent       : out GintTo API docTo spec);

484.        --  Return the size in pixels occupied by a text in the plot.

485.        --  See Gtk.Extra.Plot_Canvas for a function that returns a Gtk_Plot_Text.

487.        procedure Text_Set_AttributesTo API docTo body

488.          (Text          : Gtk_Plot_TextTo API docTo spec;

489.           Font          : String;

490.           Height        : GintTo API docTo spec;

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

492.           FgTo API docTo body            : Gdk.Color.Gdk_ColorTo API docTo specTo body;

493.           BgTo API docTo body            : Gdk.Color.Gdk_ColorTo API docTo specTo body;

494.           Transparent   : Boolean := False;

495.           JustificationTo API docTo body : Gtk.Enums.Gtk_JustificationTo API docTo spec := Gtk.Enums.Justify_Center;

496.           Str           : String := "");

497.        --  Change the attributes of Text.

499.        procedure Text_Set_BorderTo API docTo body

500.          (Text         : Gtk_Plot_TextTo API docTo spec;

501.           Border       : Plot_Border_StyleTo API docTo spec;

502.           Border_Space : GintTo API docTo spec;

503.           Border_Width : GintTo API docTo spec;

504.           Shadow_Width : GintTo API docTo spec);

505.        --  Set the border attributes for the text

507.        procedure Draw_TextTo API docTo body

508.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

509.           Text : Gtk_Plot_TextTo API docTo spec);

510.        --  Draw the text

512.        -----------

513.        -- Lines --

514.        -----------

516.        procedure Draw_LineTo API docTo body

517.          (Plot           : access Gtk_Plot_RecordTo API docTo specTo body;

518.           Line           : Gtk_Plot_LineTo API docTo spec;

519.           X1, Y1, X2, Y2 : GdoubleTo API docTo spec);

520.        --  Draw a line on the plot

522.        procedure Set_Line_AttributesTo API docTo body

523.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

524.           Line : Gtk_Plot_LineTo API docTo spec);

526.        ----------

527.        -- Axis --

528.        ----------

529.        --  A Gtk_Plot has four axis, one one each of its sides. These axis can

530.        --  have ticks, labels for ticks, titles, ... associated with them.

532.        procedure Set_TicksTo API docTo body

533.          (Plot        : access Gtk_Plot_RecordTo API docTo specTo body;

534.           OrientationTo API docTo body : Plot_OrientationTo API docTo spec;

535.           Major_Step  : GdoubleTo API docTo spec;

536.           Num_Minor   : GintTo API docTo spec);

537.        --  Set up ticks for a specific orientation.

538.        --  A horizontal orientation will match the left and right sides, whereas

539.        --  a vertical orientation will match the top and bottom sides.

540.        --  Major_Step is a value between 0.0 and 1.0 which indicates the

541.        --  proportion of the total axis length between successive big ticks.

542.        --  For instance, if Major_Step has a value of 0.2, there will be 5 big

543.        --  ticks drawn along the axis.

544.        --  Num_Minor is the number of minor ticks between each major one.

546.        procedure Set_Major_TicksTo API docTo body

547.          (Plot        : access Gtk_Plot_RecordTo API docTo specTo body;

548.           OrientationTo API docTo body : Plot_OrientationTo API docTo spec;

549.           Major_Step  : GdoubleTo API docTo spec);

550.        --  Modify the step for major ticks.

551.        --  Major_Step is a value between 0.0 and 1.0 which indicates the

552.        --  proportion of the total axis length between successive big ticks.

553.        --  For instance, if Major_Step has a value of 0.2, there will be 5 big

554.        --  ticks drawn along the axis.

555.        --  See also Set_Ticks.

557.        procedure Set_Minor_TicksTo API docTo body

558.          (Plot        : access Gtk_Plot_RecordTo API docTo specTo body;

559.           OrientationTo API docTo body : Plot_OrientationTo API docTo spec;

560.           Num_Minor   : GintTo API docTo spec);

561.        --  Modify the number of minor ticks between each major one.

562.        --  See also Axis_Set_Ticks.

564.        procedure Set_Ticks_LimitsTo API docTo body

565.          (Plot        : access Gtk_Plot_RecordTo API docTo specTo body;

566.           OrientationTo API docTo body : Plot_OrientationTo API docTo spec;

567.           Ticks_Begin : GdoubleTo API docTo spec;

568.           Ticks_End   : GdoubleTo API docTo spec);

569.        --  Indicate the area of the axis that should have ticks.

570.        --  Ticks will be displayed only from Ticks_Beg to Ticks_End.

572.        procedure Unset_Ticks_LimitsTo API docTo body

573.          (Plot        : access Gtk_Plot_RecordTo API docTo specTo body;

574.           OrientationTo API docTo body : Plot_OrientationTo API docTo spec);

575.        --  Cancel the ticks limits set by a previous call to

576.        --  Axis_Set_Ticks_Limits.

578.        procedure Set_BreakTo API docTo body

579.          (Plot         : access Gtk_Plot_RecordTo API docTo specTo body;

580.           OrientTo API docTo body       : Plot_OrientationTo API docTo spec;

581.           Min, Max     : GdoubleTo API docTo spec;

582.           Step_After   : GdoubleTo API docTo spec;

583.           Nminor_After : GintTo API docTo spec;

584.           Scale_AfterTo API docTo body  : Plot_ScaleTo API docTo spec;

585.           Pos          : GdoubleTo API docTo spec);

586.        --  ???

588.        procedure Remove_BreakTo API docTo body

589.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body; OrientTo API docTo body : Plot_OrientationTo API docTo spec);

590.        --  ???

592.        procedure Gtk_NewTo API docTo body

593.          (Axis        : out Gtk_Plot_AxisTo API docTo spec;

594.           OrientationTo API docTo body : Plot_OrientationTo API docTo spec);

595.        --  Create a new axis

597.        procedure InitializeTo API docTo body

598.          (Axis        : access Gtk_Plot_Axis_RecordTo API docTo specTo body'Class;

599.           OrientationTo API docTo body : Plot_OrientationTo API docTo spec);

600.        --  Internal initialization function.

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

603.        function Axis_Get_TypeTo API docTo body return Gtk_TypeTo API docTo spec;

604.        --  Return the internal value associated with a Gtk_Plot_Axis.

606.        function Get_AxisTo API docTo body

607.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body;

608.           AxisTo API docTo body   : Plot_Axis_PosTo API docTo spec) return Gtk_Plot_AxisTo API docTo spec;

609.        --  Get a pointer to an axis.

611.        function GradientTo API docTo body

612.          (Data : access Gtk_Plot_Data_RecordTo API docTo specTo body'Class) return Gtk_Plot_AxisTo API docTo spec;

613.        --  Return the gradient associated with Data.

614.        --

615.        --  This function cannot be defined in Gtk.Plot_Data, since Gtk_Plot_Axis

616.        --  must be defined in the same package as its primitive operations, ie

617.        --  Gtk.Plot

619.        procedure Axis_Set_VisibleTo API docTo body

620.          (Axis    : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

621.           Visible : Boolean);

622.        --  Indicate whether the axis should be visible or not.

624.        function Axis_VisibleTo API docTo body

625.          (Axis    : access Gtk_Plot_Axis_RecordTo API docTo specTo body) return Boolean;

626.        --  Return the visibility state of the axis

628.        procedure Axis_Set_TitleTo API docTo body

629.          (Axis  : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

630.           Title : String);

631.        --  Modify the title of the axis.

632.        --  Each axis has a title that is displayed along its line (vertically

633.        --  for the left and right sides).

635.        procedure Axis_Show_TitleTo API docTo body

636.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body);

637.        --  Show the title associated with the axis.

639.        procedure Axis_Hide_TitleTo API docTo body

640.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body);

641.        --  Hide the title associated with the axis.

643.        procedure Axis_Move_TitleTo API docTo body

644.          (Axis  : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

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

646.           X     : GdoubleTo API docTo spec;

647.           Y     : GdoubleTo API docTo spec);

648.        --  Modify the position and orientation of the axis' title.

649.        --  X and Y indicate a position relative to the location of the axis (0.0

650.        --  to display it to the left (resp. top) of the axis, 1.0 to display it

651.        --  to the right (resp. bottom) of the axis.

653.        procedure Axis_Justify_TitleTo API docTo body

654.          (Axis          : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

655.           JustificationTo API docTo body : Gtk.Enums.Gtk_JustificationTo API docTo spec);

656.        --  Modify the justification for the axis.

658.        procedure Axis_Set_AttributesTo API docTo body

659.          (Axis  : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

660.           Width : GfloatTo API docTo spec;

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

662.        --  Modify the attributes of the lines of the axis.

664.        procedure Axis_Get_AttributesTo API docTo body

665.          (Axis  : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

666.           Width : out    GfloatTo API docTo spec;

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

668.        --  Get the attributes of the axis.

670.        procedure Axis_Set_TicksTo API docTo body

671.          (Axis        : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

672.           Major_Step  : GdoubleTo API docTo spec;

673.           Num_Minor   : GintTo API docTo spec);

674.        --  Set up ticks for a specific orientation.

675.        --  A horizontal orientation will match the left and right sides, whereas

676.        --  a vertical orientation will match the top and bottom sides.

677.        --  Major_Step is a value between 0.0 and 1.0 which indicates the

678.        --  proportion of the total axis length between successive big ticks.

679.        --  For instance, if Major_Step has a value of 0.2, there will be 5 big

680.        --  ticks drawn along the axis.

682.        procedure Axis_Set_Major_TicksTo API docTo body

683.          (Axis        : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

684.           Major_Step  : GdoubleTo API docTo spec);

685.        --  Modify the step for major ticks.

686.        --  Major_Step is a value between 0.0 and 1.0 which indicates the

687.        --  proportion of the total axis length between successive big ticks.

688.        --  For instance, if Major_Step has a value of 0.2, there will be 5 big

689.        --  ticks drawn along the axis.

690.        --  See also Axis_Set_Ticks.

692.        procedure Axis_Set_Minor_TicksTo API docTo body

693.          (Axis        : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

694.           Num_Minor   : GintTo API docTo spec);

695.        --  Modify the number of minor ticks between each major one.

696.        --  See also Axis_Set_Ticks.

698.        procedure Axis_Set_Ticks_LengthTo API docTo body

699.          (Axis   : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

700.           Length : GintTo API docTo spec);

701.        --  Set the length (in pixels) of the big ticks.

702.        --  The small ticks will have half this length.

704.        procedure Axis_Set_Ticks_WidthTo API docTo body

705.          (Axis  : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

706.           Width : GfloatTo API docTo spec);

707.        --  Set the width (in pixels) of the ticks.

708.        --  This width is common to both the long and short ticks.

710.        procedure Axis_Show_TicksTo API docTo body

711.          (Axis       : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

712.           Major_Mask : Plot_Ticks_PosTo API docTo spec;

713.           Minor_Mask : Plot_Ticks_PosTo API docTo spec);

714.        --  Set the style of the ticks.

716.        procedure Axis_Set_Ticks_LimitsTo API docTo body

717.          (Axis        : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

718.           Ticks_Begin : GdoubleTo API docTo spec;

719.           Ticks_End   : GdoubleTo API docTo spec);

720.        --  Indicate the area of the axis that should have ticks.

721.        --  Ticks will be displayed only from Ticks_Beg to Ticks_End.

723.        procedure Axis_Unset_Ticks_LimitsTo API docTo body

724.          (Axis        : access Gtk_Plot_Axis_RecordTo API docTo specTo body);

725.        --  Cancel the ticks limits set by a previous call to

726.        --  Axis_Set_Ticks_Limits.

728.        procedure Axis_Set_BreakTo API docTo body

729.          (Axis         : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

730.           Min, Max     : GdoubleTo API docTo spec;

731.           Step_After   : GdoubleTo API docTo spec;

732.           Nminor_After : GintTo API docTo spec;

733.           Scale_AfterTo API docTo body  : Plot_ScaleTo API docTo spec;

734.           Pos          : GdoubleTo API docTo spec);

735.        --  ???

737.        procedure Axis_Remove_BreakTo API docTo body (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body);

738.        --  ???

740.        procedure Axis_Show_LabelsTo API docTo body

741.          (Axis        : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

742.           Labels_Mask : Plot_Label_PosTo API docTo spec);

743.        --  Indicate whether a label should be drawn at each ticks to indicate

744.        --  its value.

745.        --  Not all values of Labels_Mask are relevant for all axis. For instance,

746.        --  for a vertical axis, the relevant values are Axis_Right and Axis_Left.

748.        procedure Axis_Title_Set_AttributesTo API docTo body

749.          (Axis          : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

750.           Font          : String;

751.           Height        : GintTo API docTo spec;

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

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

754.           BackgroundTo API docTo body    : Gdk.Color.Gdk_ColorTo API docTo specTo body;

755.           Transparent   : Boolean;

756.           JustificationTo API docTo body : Gtk.Enums.Gtk_JustificationTo API docTo spec);

757.        --  Set the attributes to be used for the title of the axis.

758.        --  Font is a postscript font name (as listed in the beginning of this

759.        --  package).

761.        procedure Axis_Set_Labels_AttributesTo API docTo body

762.          (Axis          : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

763.           Font          : String;

764.           Height        : GintTo API docTo spec;

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

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

767.           BackgroundTo API docTo body    : Gdk.Color.Gdk_ColorTo API docTo specTo body;

768.           Transparent   : Boolean;

769.           JustificationTo API docTo body : Gtk.Enums.Gtk_JustificationTo API docTo spec);

770.        --  Set the attributes to be used for the ticks labels.

772.        procedure Axis_Set_Labels_OffsetTo API docTo body

773.          (Axis   : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

774.           Offset : GintTo API docTo spec);

775.        --  Set the distance between the axis and its labels

777.        function Axis_Get_Labels_OffsetTo API docTo body

778.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body) return GintTo API docTo spec;

779.        --  Get the distance between the axis and its labels.

781.        procedure Axis_Set_Labels_StyleTo API docTo body

782.          (Axis      : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

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

784.           Precision : GintTo API docTo spec);

785.        --  Set the style of labels.

786.        --  This indicates whether the labels should be displayed as floating

787.        --  point values or in the scientific notation.

788.        --  Precision is the number of digits to be printed.

790.        procedure Axis_Use_Custom_Tick_LabelsTo API docTo body

791.          (Axis   : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

792.           Custom : Boolean := True);

793.        --  Indicate which kind of labels should be used for major ticks.

794.        --  If Custom is True, then the labels set by Axis_Set_Tick_Labels will

795.        --  be used.

797.        procedure Axis_Set_Labels_SuffixTo API docTo body

798.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

799.           Text : String);

800.        --  Defines a suffix to add after each label on the axis

802.        procedure Axis_Set_Labels_PrefixTo API docTo body

803.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

804.           Text : String);

805.        --  Defines a prefix to add before each label on the axis

807.        function Axis_Get_Labels_SuffixTo API docTo body

808.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body) return String;

809.        --  Return the suffix added to each label.

811.        function Axis_Get_Labels_PrefixTo API docTo body

812.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body) return String;

813.        --  Return the prefix added to each label.

815.        procedure Axis_Ticks_RecalcTo API docTo body (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body);

817.        function Axis_Ticks_TransformTo API docTo body

818.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

819.           Y    : GdoubleTo API docTo spec) return GdoubleTo API docTo spec;

821.        function Axis_Ticks_InverseTo API docTo body

822.          (Axis : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

823.           X    : GdoubleTo API docTo spec) return GdoubleTo API docTo spec;

825.        procedure Axis_Parse_LabelTo API docTo body

826.          (Axis      : access Gtk_Plot_Axis_RecordTo API docTo specTo body;

827.           Val       : GdoubleTo API docTo spec;

828.           Precision : GintTo API docTo spec;

829.           Style     : GintTo API docTo spec;

830.           Label     : String);

832.        -----------

833.        -- Grids --

834.        -----------

835.        --  A grid can be displayed in the graph.

836.        --  This makes it easier to understand a graphics in some situations.

837.        --  The grid has two simultaneous line styles, each with its own specific

838.        --  step (minor and major steps).

839.        --

840.        --  There are two special lines in the grid, that you can display even if

841.        --  you don't display the rest of the line. These are the origin of the

842.        --  coordinates system, ie the lines at X=0 and Y=0.

844.        procedure X0_Set_VisibleTo API docTo body

845.          (Plot    : access Gtk_Plot_RecordTo API docTo specTo body;

846.           Visible : Boolean);

847.        --  Indicate whether the line at X=0 should be displayed.

849.        function X0_VisibleTo API docTo body

850.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Boolean;

851.        --  Return the visibility state of the line at X=0

853.        procedure Y0_Set_VisibleTo API docTo body

854.          (Plot    : access Gtk_Plot_RecordTo API docTo specTo body;

855.           Visible : Boolean);

856.        --  Indicate whether the line at Y=0 should be displayed.

858.        function Y0_VisibleTo API docTo body

859.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body) return Boolean;

860.        --  Return the visibility state of the line at Y=0

862.        procedure X0line_Set_AttributesTo API docTo body

863.          (Plot  : access Gtk_Plot_RecordTo API docTo specTo body;

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

865.           Width : GfloatTo API docTo spec;

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

867.        --  Set the attributes of the line at X=0

869.        procedure Y0line_Set_AttributesTo API docTo body

870.          (Plot  : access Gtk_Plot_RecordTo API docTo specTo body;

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

872.           Width : GfloatTo API docTo spec;

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

874.        --  Set the attributes of the line at Y=0

876.        procedure Grids_Set_On_TopTo API docTo body

877.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body; On_Top : Boolean);

878.        --  Whether the grid should be displayed on top of the plots

880.        function Grids_On_TopTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body) return Boolean;

881.        --  Whether the gris is currently displayed on top of the plots

883.        procedure Grids_Set_VisibleTo API docTo body

884.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body;

885.           Vmajor : Boolean;

886.           Vminor : Boolean;

887.           Hmajor : Boolean;

888.           Hminor : Boolean);

889.        --  Indicate whether the lines of the grids should be displayed.

890.        --  You can decide separately whether the major and minor lines should

891.        --  be displayed.

893.        procedure Grids_VisibleTo API docTo body

894.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body;

895.           Vmajor : out Boolean;

896.           Vminor : out Boolean;

897.           Hmajor : out Boolean;

898.           Hminor : out Boolean);

899.        --  Return the visibility state of the grid.

901.        procedure Major_Hgrid_Set_AttributesTo API docTo body

902.          (Plot  : access Gtk_Plot_RecordTo API docTo specTo body;

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

904.           Width : GfloatTo API docTo spec;

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

906.        --  Set the attributes for the major horizontal lines in the grid.

908.        procedure Major_Vgrid_Set_AttributesTo API docTo body

909.          (Plot  : access Gtk_Plot_RecordTo API docTo specTo body;

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

911.           Width : GfloatTo API docTo spec;

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

913.        --  Set the attributes for the major vertical lines in the grid.

915.        procedure Minor_Hgrid_Set_AttributesTo API docTo body

916.          (Plot  : access Gtk_Plot_RecordTo API docTo specTo body;

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

918.           Width : GfloatTo API docTo spec;

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

920.        --  Set the attributes for the minor horizontal lines in the grid.

922.        procedure Minor_Vgrid_Set_AttributesTo API docTo body

923.          (Plot  : access Gtk_Plot_RecordTo API docTo specTo body;

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

925.           Width : GfloatTo API docTo spec;

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

927.        --  Set the attributes for the minor vertical lines in the grid.

929.        -------------

930.        -- Legends --

931.        -------------

932.        --  Each graph is associated with one legend, that is supposed to

933.        --  indicate what the plot represents.

935.        procedure Show_LegendsTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body);

936.        --  Indicate that the legend should be displayed.

938.        procedure Hide_LegendsTo API docTo body (Plot : access Gtk_Plot_RecordTo API docTo specTo body);

939.        --  Indicate that the legend should not be displayed.

941.        procedure Set_Legends_BorderTo API docTo body

942.          (Plot         : access Gtk_Plot_RecordTo API docTo specTo body;

943.           BorderTo API docTo body       : Plot_Border_StyleTo API docTo spec;

944.           Shadow_Width : GintTo API docTo spec);

945.        --  Modify the way the borders of the legend look like.

947.        procedure Legends_MoveTo API docTo body

948.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

949.           X    : GdoubleTo API docTo spec;

950.           Y    : GdoubleTo API docTo spec);

951.        --  Move the legend relative to the widget's area.

952.        --  X and Y are percentage values. (0.0, 0.0) indicates the top-left

953.        --  corner of the plot, (1.0, 1.0) indicates the bottom-right corner.

955.        procedure Legends_Get_PositionTo API docTo body

956.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

957.           X    : out GdoubleTo API docTo spec;

958.           Y    : out GdoubleTo API docTo spec);

959.        --  Return the current position of the legend.

961.        function Legends_Get_AllocationTo API docTo body

962.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body) return Gtk.Widget.Gtk_AllocationTo API docTo spec;

963.        --  Return the exact coordinates and size in pixels of the legend.

964.        --  The coordinates are relative to the widget's parent container.

966.        procedure Legends_Set_AttributesTo API docTo body

967.          (Plot       : access Gtk_Plot_RecordTo API docTo specTo body;

968.           Ps_Font    : String;

969.           Height     : GintTo API docTo spec;

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

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

972.        --  Set the attributes to use when displaying the legend.

974.        --------------

975.        -- Datasets --

976.        --------------

977.        --  A dataset is a set of points, either given explicitly by your

978.        --  application or calculated with a specific function, and that can be

979.        --  plotted on the screen.

980.        --  In Gtk_Plot, such a set is represented with symbols (special points in

981.        --  the graph, that can be manipulated interactively if you so wish), linked

982.        --  by connectors, which are either straight lines, splines, sets, ...

983.        --  Multiple data sets can of course be printed on a single graph.

985.        --  <doc_ignore>

986.        generic

987.           with function Func (Plot  : access Gtk_Plot_RecordTo API docTo specTo body'Class;

988.                               Set   :        Gtk_Plot_DataTo API docTo spec;

989.                               X     :        GdoubleTo API docTo spec;

990.                               Error : access Boolean)

991.                              return GdoubleTo API docTo spec;

992.        function Generic_Plot_FunctionTo API docTo body (Plot  : System.Address;

993.                                        Set   : Gtk_Plot_DataTo API docTo spec;

994.                                        X     : GdoubleTo API docTo spec;

995.                                        Error : access GbooleanTo API docTo spec)

996.                                       return GdoubleTo API docTo spec;

997.        --  Generic function that can be instantiated for Plot_Function below.

998.        --  </doc_ignore>

1000.        --  <doc_ignore>

1001.        generic

1002.           with function Func (Plot  : access Gtk_Plot_RecordTo API docTo specTo body'Class;

1003.                               Set   :        Gtk_Plot_DataTo API docTo spec;

1004.                               X     :        GdoubleTo API docTo spec;

1005.                               Y     :        GdoubleTo API docTo spec;

1006.                               Error : access Boolean)

1007.                              return GdoubleTo API docTo spec;

1008.        function Generic_Plot3D_FunctionTo API docTo body (Plot  : System.Address;

1009.                                          Set   : Gtk_Plot_DataTo API docTo spec;

1010.                                          X     : GdoubleTo API docTo spec;

1011.                                          Y     : GdoubleTo API docTo spec;

1012.                                          Error : access GbooleanTo API docTo spec)

1013.                                         return GdoubleTo API docTo spec;

1014.        --  Generic function that can be instanciated for Plot3D_Function below.

1015.        --  </doc_ignore>

1017.        type Plot3D_Function is access function

1018.          (Plot  : System.Address;

1019.           Set   : Gtk_Plot_DataTo API docTo spec;

1020.           X     : GdoubleTo API docTo spec;

1021.           Y     : GdoubleTo API docTo spec;

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

1023.        --  Function used for plotting 3D graphs.

1024.        --  It should return the value associated with (X, Y) in its graph, and set

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

1027.        pragma Convention (C, Generic_Plot_FunctionTo API docTo specTo body);

1028.        pragma Convention (C, Generic_Plot3D_FunctionTo API docTo specTo body);

1029.        pragma Convention (C, Plot3D_FunctionTo API docTo spec);

1031.        procedure Add_DataTo API docTo body

1032.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

1033.           Data : access Gtk_Plot_Data_RecordTo API docTo specTo body'Class);

1034.        --  Add an existing set of data to the plot.

1035.        --  This set will automatically be drawn the next time the Plot itself is

1036.        --  drawn.

1038.        function Remove_DataTo API docTo body

1039.          (Plot : access Gtk_Plot_RecordTo API docTo specTo body;

1040.           Data : access Gtk_Plot_Data_RecordTo API docTo specTo body'Class)

1041.           return Boolean;

1042.        --  Remove the dataset from Plot.

1043.        --  This function returns True if the dataset was indeed found and could be

1044.        --  removed, False otherwise.

1046.        function Add_FunctionTo API docTo body

1047.          (Plot   : access Gtk_Plot_RecordTo API docTo specTo body;

1048.           Func   : Plot_FunctionTo API docTo spec)

1049.           return  Gtk_Plot_DataTo API docTo spec;

1050.        --  Allocate a new dataset, whose point are automatically calculated.

1051.        --  Func is a function that takes the X coordinate value, and should return

1052.        --  the Y coordinate value.

1053.        --  The newly allocated set should be freed by calling Free above.

1054.        --  The set is automatically added to the plot, so you don't need to

1055.        --  explicitly call Add_Dataset.

1057.        -------------

1058.        -- Signals --

1059.        -------------

1061.        --  <signals>

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

1063.        --

1064.        --  - "changed"

1065.        --    procedure Handler (Plot : access Gtk_Plot_Record'Class);

1066.        --

1067.        --    Called every time some property of the widget is changed, or the

1068.        --    widget is moved or resized.

1069.        --

1070.        --  - "moved"

1071.        --    function Handler (Plot : access Gtk_Plot_Record'Class;

1072.        --                      X    : Gdouble;

1073.        --                      Y    : Gdouble)

1074.        --                     return Boolean;

1075.        --

1076.        --    Called when the widget has been moved relative to its drawable.

1077.        --    Its new position is given in parameters.

1078.        --

1079.        --  - "resized"

1080.        --    function Handler (Plot   : access Gtk_Plot_Record'Class;

1081.        --                      Width  : Gdouble;

1082.        --                      Height : Gdouble)

1083.        --                     return Boolean;

1084.        --

1085.        --    Called when the widget has been resized relative to its drawable.

1086.        --    Its new size is given in parameters.

1087.        --

1088.        --  - "tick_label"

1089.        --    function Handler (Axis  : access Gtk_Plot_Axis_Record'Class;

1090.        --                      Tick  : Gdouble_Access;

1091.        --                      Label : Interfaces.C.Strings.chars_ptr)

1092.        --                     return Boolean;

1093.        --

1094.        --     Called when a label should be drawn. You can modify the contents

1095.        --     of Label (up to 100 characters) a

1096.        --

1097.        --  </signals>

1099.     private

1100.        type Gtk_Plot_RecordTo API docTo spec is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body with null record;

1101.        type Gtk_Plot_Axis_RecordTo API docTo spec is new Glib.Object.GObject_RecordTo API docTo specTo body with

1102.          null record;

1104.        Label_NoneTo API docTo spec   : constant Plot_Label_PosTo API docTo spec := 0;

1105.        Label_InTo API docTo spec     : constant Plot_Label_PosTo API docTo spec := 1;

1106.        Label_OutTo API docTo spec    : constant Plot_Label_PosTo API docTo spec := 2;

1108.        Ticks_NoneTo API docTo spec  : constant Plot_Ticks_PosTo API docTo spec := 0;

1109.        Ticks_InTo API docTo spec    : constant Plot_Ticks_PosTo API docTo spec := 1;

1110.        Ticks_OutTo API docTo spec   : constant Plot_Ticks_PosTo API docTo spec := 2;

1112.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_plot_get_type");

1113.        pragma Import (C, Axis_Get_TypeTo API docTo spec, "gtk_plot_axis_get_type");

1114.        pragma Import (C, Text_Set_BorderTo API docTo spec, "gtk_plot_text_set_border");

1115.     end Gtk.Extra.PlotTo API docTo specTo body;

1117.     --  Unbound:

1118.     --    gtk_plot_set_pc

1119.     --    gtk_plot_axis_set_tick_labels

1120.     --    gtk_plot_axis_ticks_autoscale