comp.lang.ada
 help / color / mirror / Atom feed
From: Ali Bendriss <ali.bendriss@snake.oil>
Subject: Re: How to include Win_IO for my project?
Date: 20 Jan 2009 01:50:35 GMT
Date: 2009-01-20T02:50:35+01:00	[thread overview]
Message-ID: <49752deb$0$10085$426a34cc@news.free.fr> (raw)
In-Reply-To: a8fe0306-e968-4852-b5a2-d8b3d6f644d3@w24g2000prd.googlegroups.com

On Sun, 18 Jan 2009 12:42:04 -0800, tolkamp wrote:

>
> Thank you for this explanation. Now I have successful added the
> directory win_io_3.0_scr_dos to my project. After this I have added the
> following source code of my project: - Time, Speed : Float;
> - My_Plot : Plot_Window_Type;
> - Plot_Window (My_Plot, "Time", "Speed"); -- create plot window -
> Add_Point (My_Plot, Time, Speed);
> 
> Compilation is error free, but when an executable is made the following
> error occurs in package plot_windows.adb: "Add_Plot" is undefined.
> 
> What do I wrong?

"Add_Plot" doesn't exist anymore in recent version of GtkAda.
I've done a small patch against win_io_3.0_src to make it compile with 
GtkAda-gpl-2.10.2. I've done a light test and it's look like OK
no warranty of course.
copy the rest of the message in a file as "add_plot.patch" inside 
win_io_3.0_src then run patch -p0 <add_plot.patch

Ali



--- ../plot_windows.adb	2005-10-03 15:42:38.000000000 +0100
+++ plot_windows.adb	2009-01-20 01:23:59.500325738 +0000
@@ -35,6 +35,9 @@
 with Plot_Window_Gui_Intl; use Plot_Window_Gui_Intl;
 with Gtk.Main;
 with Initialize_Gtk_Once;
+with Gtk.Extra.Plot;
+
+with Gtk.Extra.Plot_Canvas.Plot;
 
 package body Plot_Windows is
 
@@ -113,6 +116,7 @@
      return Plot_Window_Type
    is
       Resp : Plot_Window_Type;
+      Child : Gtk.Extra.Plot_Canvas.Plot.Gtk_Plot_Canvas_Plot;
    begin
       Task_Support.Enter;
       New_Graph(Resp);
@@ -129,46 +133,48 @@
       -- Create the plot
       Gtk_New (Resp.Plot,Resp.Gdkw);
 
-      Add_Plot(Resp.Canvas,Resp.Plot,0.2,0.2);
+      Gtk.Extra.Plot_Canvas.Plot.Gtk_New (Child, Resp.Plot);
+      Put_Child (Resp.Canvas, Child,0.2,0.2);
+
       Show(Resp.Plot);
 
       -- Set Axis titles
       Axis_Set_Title
-        (Plot => Resp.Plot,
-         Axis => Axis_Bottom,
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Bottom),
          Title => X_Axis_Title);
       Axis_Set_Visible
-        (Plot => Resp.Plot,
-         Axis => Axis_Bottom,
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Bottom),
          Visible => True);
       Axis_Set_Visible
-        (Plot => Resp.Plot,
-         Axis => Axis_Top,
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Top),
          Visible => False);
       Axis_Move_Title
-        (Plot => Resp.Plot,
-         Axis => Axis_Bottom,
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Bottom),
          Angle => Angle_0,
          X     => 0.5,
          Y     => 0.9);
       Axis_Show_Title
-        (Plot => Resp.Plot,
-         Axis => Axis_Bottom);
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Bottom));
       Axis_Set_Title
-        (Plot => Resp.Plot,
-         Axis => Axis_Left,
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Left),
          Title => Y_Axis_Title);
       Axis_Set_Visible
-        (Plot => Resp.Plot,
-         Axis => Axis_Left,
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Left),
          Visible => True);
       Axis_Set_Visible
-        (Plot => Resp.Plot,
-         Axis => Axis_Right,
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Right),
          Visible => False);
       Axis_Show_Title
-        (Plot => Resp.Plot,
-         Axis => Axis_Left);
+        (Gtk.Extra.Plot.Get_Axis (Plot => Resp.Plot,
+         Axis => Axis_Left));
 
       Task_Support.Leave;
       return Resp;



  parent reply	other threads:[~2009-01-20  1:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 16:07 How to include Win_IO for my project? tolkamp
2009-01-14  7:14 ` anon
2009-01-16 18:34   ` tolkamp
2009-01-16 19:15     ` Anh Vo
2009-01-16 19:31     ` anon
2009-01-17 13:06       ` tolkamp
2009-01-17 19:08         ` anon
2009-01-18 20:42           ` tolkamp
2009-01-18 22:48             ` anon
2009-01-19 13:06               ` tolkamp
2009-01-19 14:14                 ` Petter
2009-01-19 15:51                   ` Jean-Pierre Rosen
2009-01-19 16:20                   ` tolkamp
2009-01-20  1:50             ` Ali Bendriss [this message]
2009-01-20 11:32               ` tolkamp
2009-01-20 19:03                 ` Ali Bendriss
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox