## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                     Copyright (C) 2001-2006                       --

5.     --                         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.     --  A special plot that draws its data in three dimension. The data associated

32.     --  with such plots should either be a function or a Gtk.Extra.Plot_Surface.

33.     --  </description>

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

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

36.     --  <testgtk>create_plot_3d.adb</testgtk>

37.     --  <screenshot>gtk-plot_3d</screenshot>

39.     with Gdk.ColorTo API docTo specTo body;

40.     with Gdk.DrawableTo API docTo specTo body;

41.     with Gtk.Extra.PlotTo API docTo specTo body;

42.     with Gtk.Extra.Plot_DataTo API docTo specTo body;

44.     package Gtk.Extra.Plot_3DTo API docTo specTo body is

46.        type Gtk_Plot_3D_RecordTo API docTo body is new Gtk.Extra.Plot.Gtk_Plot_RecordTo API docTo specTo body with private;

47.        type Gtk_Plot_3D is access all Gtk_Plot_3D_RecordTo API docTo specTo body'Class;

49.        type Plot_Plane is new Integer;

50.        Plot_Plane_Xy : constant Plot_PlaneTo API docTo spec := 0;

51.        Plot_Plane_Yx : constant Plot_PlaneTo API docTo spec := 0;

52.        Plot_Plane_Xz : constant Plot_PlaneTo API docTo spec := 1;

53.        Plot_Plane_Zx : constant Plot_PlaneTo API docTo spec := 1;

54.        Plot_Plane_Yz : constant Plot_PlaneTo API docTo spec := 2;

55.        Plot_Plane_Zy : constant Plot_PlaneTo API docTo spec := 2;

57.        type Plot_Side is mod 2 ** 32;

58.        Plot_Side_Xy : constant Plot_SideTo API docTo spec := 2 ** 0;

59.        Plot_Side_Xz : constant Plot_SideTo API docTo spec := 2 ** 1;

60.        Plot_Side_Yx : constant Plot_SideTo API docTo spec := 2 ** 2;

61.        Plot_Side_Yz : constant Plot_SideTo API docTo spec := 2 ** 3;

62.        Plot_Side_Zx : constant Plot_SideTo API docTo spec := 2 ** 4;

63.        Plot_Side_Zy : constant Plot_SideTo API docTo spec := 2 ** 5;

65.        procedure Gtk_NewTo API docTo body

66.          (Widget        : out Gtk_Plot_3DTo API docTo spec;

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

68.           Width, Height : GdoubleTo API docTo spec := 0.0);

69.        --  Create a new 3D plot.

71.        procedure InitializeTo API docTo body

72.          (Widget        : access Gtk_Plot_3D_RecordTo API docTo specTo body'Class;

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

74.           Width, Height : GdoubleTo API docTo spec);

75.        --  Internal initialization function.

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

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

79.        --  Return the internal value associated with this widget.

81.        procedure AutoscaleTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body);

82.        --  Chooses the best ranges for all coordinates depending on the data sets

83.        --  put in Plot. Note that only data sets whose points you have set

84.        --  explicitely are taken into account, not the ones based on functions.

86.        function Get_XfactorTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body) return GdoubleTo API docTo spec;

87.        function Get_YfactorTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body) return GdoubleTo API docTo spec;

88.        function Get_ZfactorTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body) return GdoubleTo API docTo spec;

89.        --  Get the scaling factor along each of the coordinates.

91.        procedure Set_XfactorTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Xfactor : GdoubleTo API docTo spec);

92.        procedure Set_YfactorTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Yfactor : GdoubleTo API docTo spec);

93.        procedure Set_ZfactorTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Zfactor : GdoubleTo API docTo spec);

94.        --  Set the scaling factor along each of the coordinates

96.        procedure Set_XrangeTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Min, Max : GdoubleTo API docTo spec);

97.        procedure Set_YrangeTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Min, Max : GdoubleTo API docTo spec);

98.        procedure Set_ZrangeTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Min, Max : GdoubleTo API docTo spec);

99.        --  Set the minimal and maximal values for each axis.

101.        ----------

102.        -- Axis --

103.        ----------

105.        procedure Show_TitleTo API docTo body

106.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Side : Plot_SideTo API docTo spec);

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

109.        procedure Hide_TitleTo API docTo body

110.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Side : Plot_SideTo API docTo spec);

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

113.        procedure Set_Major_TicksTo API docTo body

114.          (Plot       : access Gtk_Plot_3D_RecordTo API docTo specTo body;

115.           AxisTo API docTo body       : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec;

116.           Major_Step : GdoubleTo API docTo spec);

117.        --  Modify the step for major ticks.

118.        --  This is a percentage value that indicates how many major ticks are

119.        --  drawn along the axis. See also Axis_Set_Ticks.

121.        procedure Set_Minor_TicksTo API docTo body

122.          (Plot   : access Gtk_Plot_3D_RecordTo API docTo specTo body;

123.           AxisTo API docTo body   : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec;

124.           Nminor : GintTo API docTo spec);

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

126.        --  See also Axis_Set_Ticks.

128.        procedure Set_TicksTo API docTo body

129.          (Plot       : access Gtk_Plot_3D_RecordTo API docTo specTo body;

130.           AxisTo API docTo body       : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec;

131.           Major_Step : GdoubleTo API docTo spec;

132.           Nminor     : GintTo API docTo spec);

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

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

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

136.        --  Major_Step is a percentage value of the widget size, and indicate the

137.        --  step between each big ticks. For instance, if Major_Step has a value

138.        --  of 0.2, there will be 5 big ticks drawn along the axis.

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

141.        procedure Set_Ticks_LengthTo API docTo body

142.          (Plot   : access Gtk_Plot_3D_RecordTo API docTo specTo body;

143.           AxisTo API docTo body   : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec;

144.           Length : GintTo API docTo spec);

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

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

148.        procedure Set_Ticks_WidthTo API docTo body

149.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

150.           AxisTo API docTo body  : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec;

151.           Width : GfloatTo API docTo spec);

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

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

155.        procedure Show_LabelsTo API docTo body

156.          (Plot       : access Gtk_Plot_3D_RecordTo API docTo specTo body;

157.           Side       : Plot_SideTo API docTo spec;

158.           Label_Mask : GintTo API docTo spec);

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

160.        --  its value.

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

162.        --  for a vertical axis, the relevant values are Label_Right and Label_Left.

164.        procedure Show_TicksTo API docTo body

165.          (Plot       : access Gtk_Plot_3D_RecordTo API docTo specTo body;

166.           Side       : Plot_SideTo API docTo spec;

167.           Major_Mask : Gtk.Extra.Plot.Plot_Ticks_PosTo API docTo spec;

168.           Minor_Mask : Gtk.Extra.Plot.Plot_Ticks_PosTo API docTo spec);

169.        --  Set the style of the ticks.

171.        function Get_AxisTo API docTo body

172.          (Plot        : access Gtk_Plot_3D_RecordTo API docTo specTo body;

173.           OrientationTo API docTo body : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec)

174.           return Gtk.Extra.Plot.Gtk_Plot_AxisTo API docTo spec;

175.        --  Return a handle to a specific axis.

177.        function Get_SideTo API docTo body

178.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Side : Plot_SideTo API docTo spec)

179.           return Gtk.Extra.Plot.Gtk_Plot_AxisTo API docTo spec;

180.        --  Get the axis for a specific side.

182.        procedure Set_ScaleTo API docTo body

183.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

184.           AxisTo API docTo body  : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec;

185.           ScaleTo API docTo body : Gtk.Extra.Plot_Data.Plot_ScaleTo API docTo spec);

186.        --  Set the scale for the axis

188.        function Get_ScaleTo API docTo body

189.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

190.           AxisTo API docTo body  : Gtk.Extra.Plot.Plot_OrientationTo API docTo spec)

191.           return Gtk.Extra.Plot_Data.Plot_ScaleTo API docTo spec;

192.        --  Get the current sale for the axis

194.        ----------

195.        -- Grid --

196.        ----------

198.        procedure Major_Grids_Set_VisibleTo API docTo body

199.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; X, Y, Z : Boolean);

200.        --  Indicate whether the grid should be displayed for each coordinate

202.        procedure Major_Grids_VisibleTo API docTo body

203.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; X, Y, Z : out Boolean);

204.        --  Indicate whether the grid is currently displayed.

206.        procedure Minor_Grids_Set_VisibleTo API docTo body

207.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; X, Y, Z : Boolean);

208.        --  Indicate whether the grid should be displayed for each coordinate

210.        procedure Minor_Grids_VisibleTo API docTo body

211.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; X, Y, Z : out Boolean);

212.        --  Indicate whether the grid is currently displayed.

214.        procedure Major_Zgrid_Get_AttributesTo API docTo body

215.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

216.           StyleTo API docTo body : out Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

217.           Width : out GfloatTo API docTo spec;

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

219.        --  Get the attributes of the major grid

221.        procedure Major_Zgrid_Set_AttributesTo API docTo body

222.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

223.           StyleTo API docTo body : Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

224.           Width : GfloatTo API docTo spec;

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

226.        --  Set the attributes of the major grid

228.        procedure Minor_Zgrid_Get_AttributesTo API docTo body

229.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

230.           StyleTo API docTo body : out Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

231.           Width : out GfloatTo API docTo spec;

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

233.        --  Get the attributes of the minor grid

235.        procedure Minor_Zgrid_Set_AttributesTo API docTo body

236.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

237.           StyleTo API docTo body : Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

238.           Width : GfloatTo API docTo spec;

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

240.        --  Set the attributes of the minor grid

242.        --------------

243.        -- Rotating --

244.        --------------

246.        procedure Reset_AnglesTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body);

247.        --  reset all the angles to their default values

249.        procedure RotateTo API docTo body

250.          (Plot    : access Gtk_Plot_3D_RecordTo API docTo specTo body;

251.           Angle_X, Angle_Y, Angle_Z : GdoubleTo API docTo spec);

252.        --  Rotate the plot along the three axis at the same time.

253.        --  The angles are specified in degrees.

255.        procedure Rotate_VectorTo API docTo body

256.          (Plot       : access Gtk_Plot_3D_RecordTo API docTo specTo body;

257.           VectorTo API docTo body     : Gtk.Extra.Plot.Plot_VectorTo API docTo spec;

258.           A1, A2, A3 : GdoubleTo API docTo spec);

259.        --  Rotate Vector along the three axis.

260.        --  The three angles A1, A2 and A3 are specified in degrees.

262.        procedure Rotate_XTo API docTo body (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body; Angle : GdoubleTo API docTo spec);

263.        procedure Rotate_YTo API docTo body (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body; Angle : GdoubleTo API docTo spec);

264.        procedure Rotate_ZTo API docTo body (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body; Angle : GdoubleTo API docTo spec);

265.        --  Rotate the plot along a specific axis.

266.        --  Angle is specific in degrees.

268.        ------------

269.        -- Planes --

270.        ------------

271.        --  A 3D plot is associated, as usual, with three axis (one per coordinate

272.        --  X, Y and Z). These three axis, together, define 3 planes that can be

273.        --  shown or hidden, and on which a grid can be displayed to make it easy

274.        --  to visualize the value of the data.

276.        procedure Plane_Set_ColorTo API docTo body

277.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body;

278.           Plane : Plot_PlaneTo API docTo spec;

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

280.        --  Define the background color to use for one of the planes. Each plane

281.        --  can have its own color.

283.        procedure Plane_Set_VisibleTo API docTo body

284.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Plane : Plot_PlaneTo API docTo spec; Visible : Boolean);

285.        --  Indicate whether each plane should be displayed or not.

287.        function Plane_VisibleTo API docTo body

288.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Plane : Plot_PlaneTo API docTo spec) return Boolean;

289.        --  Indicate whether a plane is currently visible or not.

291.        -------------

292.        -- Corners --

293.        -------------

294.        --  In addition to drawing the three planes defined by the axis, a 3D plot

295.        --  can also draw some lines to draw a cube around the plot (although the

296.        --  three new planes defined by these lines are left transparent so that

297.        --  the plot is visible.

299.        procedure Corner_Get_AttributesTo API docTo body

300.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

301.           StyleTo API docTo body : out Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

302.           Width : out GfloatTo API docTo spec;

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

304.        --  Get the style of the corner lines.

306.        procedure Corner_Set_AttributesTo API docTo body

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

308.           StyleTo API docTo body : Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

309.           Width : GfloatTo API docTo spec;

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

311.        --  Define the style of the corner lines.

313.        procedure Corner_Set_VisibleTo API docTo body

314.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Visible : Boolean);

315.        --  Whether corners should be visible

317.        function Corner_VisibleTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body) return Boolean;

318.        --  Indicate whether corners are visible

320.        ----------

321.        -- Misc --

322.        ----------

324.        procedure Frame_Get_AttributesTo API docTo body

325.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

326.           StyleTo API docTo body : out Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

327.           Width : out GfloatTo API docTo spec;

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

330.        procedure Frame_Set_AttributesTo API docTo body

331.          (Plot  : access Gtk_Plot_3D_RecordTo API docTo specTo body;

332.           StyleTo API docTo body : Gtk.Extra.Plot_Data.Plot_Line_StyleTo API docTo spec;

333.           Width : GfloatTo API docTo spec;

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

336.        procedure Get_PixelTo API docTo body

337.          (Plot       : access Gtk_Plot_3D_RecordTo API docTo specTo body;

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

339.           Px, Py, Pz : out GdoubleTo API docTo spec);

341.        function Get_Titles_OffsetTo API docTo body (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body) return GintTo API docTo spec;

343.        procedure Set_Titles_OffsetTo API docTo body

344.          (Plot : access Gtk_Plot_3D_RecordTo API docTo specTo body; Offset : GintTo API docTo spec);

346.        -------------

347.        -- Signals --

348.        -------------

350.        --  <signals>

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

352.        --  </signals>

354.     private

355.        type Gtk_Plot_3D_RecordTo API docTo spec is new Gtk.Extra.Plot.Gtk_Plot_RecordTo API docTo specTo body

356.          with null record;

357.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_plot3d_get_type");

358.     end Gtk.Extra.Plot_3DTo API docTo specTo body;