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. ----------------------------------------------------------------------- 
  29.  
  30. --  <description> 
  31. --  This package does not implement any new widget. 
  32. --  Instead, if provides postscript support for Gtk_Plot widgets, and can 
  33. --  create a postscript file from any Gtk_Plot widget. 
  34. --  </description> 
  35. --  This is a binding to gtkplotprint.h 
  36. --  <c_version>gtkextra 2.1.1</c_version> 
  37. --  <group>Plotting Data</group> 
  38.  
  39. with Gtk.Extra.Plot; 
  40. with Gtk.Extra.Plot_Canvas;  use Gtk.Extra.Plot_Canvas; 
  41.  
  42. package Gtk.Extra.Plot_Ps is 
  43.  
  44.    type Ps_Page_Size is 
  45.      (Plot_Letter, 
  46.       Plot_Legal, 
  47.       Plot_A4, 
  48.       Plot_Executive, 
  49.       Plot_Custom); 
  50.    --  The formats that can be used for paper sizes. 
  51.    pragma Convention (C, Ps_Page_Size); 
  52.  
  53.    type Ps_Orientation is (Plot_Portrait, Plot_Landscape); 
  54.    --  Portrait format means that the vertical size is longer than 
  55.    --  the horizontal size. Landscape is the reverse. 
  56.    pragma Convention (C, Ps_Orientation); 
  57.  
  58.    type Ps_Units is (Plot_Inches, Plot_Mm, Plot_Cm, Plot_Pspoints); 
  59.    --  Units of measure for paper sizes. 
  60.    pragma Convention (C, Ps_Units); 
  61.  
  62.    procedure Plot_Export_Ps 
  63.      (Plot        : access Gtk.Extra.Plot.Gtk_Plot_Record'Class; 
  64.       Psfile      : String; 
  65.       Orientation : Ps_Orientation; 
  66.       Epsflag     : Boolean; 
  67.       Page_Size   : Ps_Page_Size); 
  68.    --  Create a new postscript file PsFile with the content of Plot. 
  69.    --  Epsflag should be true if the generated file should be in 
  70.    --  Encapsulated Postscript format instead of simple Postscript. 
  71.  
  72.    procedure Plot_Export_Ps_With_Size 
  73.      (Plot        : access Gtk.Extra.Plot.Gtk_Plot_Record'Class; 
  74.       Psfile      : in String; 
  75.       Orientation : in Ps_Orientation; 
  76.       Epsflag     : in Boolean; 
  77.       Units       : in Ps_Units; 
  78.       Width       : in Gint; 
  79.       Height      : in Gint); 
  80.    --  Create a new postscript file PsFile with the content of Plot. 
  81.    --  Epsflag should be true if the generated file should be in 
  82.    --  Encapsulated Postscript format instead of simple Postscript. 
  83.    --  The page has a custom size. 
  84.  
  85.    procedure Plot_Canvas_Export_Ps 
  86.      (Canvas      : access Gtk_Plot_Canvas_Record'Class; 
  87.       File_Name   : in String; 
  88.       Orientation : in Ps_Orientation; 
  89.       Epsflag     : in Boolean; 
  90.       Page_Size   : in Ps_Page_Size); 
  91.    --  Create a new postscript file PsFile with the content of Canvas. 
  92.    --  Every plot on it is exported to the postscript file. 
  93.    --  Epsflag should be true if the generated file should be in 
  94.    --  Encapsulated Postscript format instead of simple Postscript. 
  95.  
  96.    procedure Plot_Canvas_Export_Ps_With_Size 
  97.      (Canvas      : access Gtk_Plot_Canvas_Record'Class; 
  98.       File_Name   : in String; 
  99.       Orientation : in Ps_Orientation; 
  100.       Epsflag     : in Boolean; 
  101.       Units       : in Ps_Units; 
  102.       Width       : in Gint; 
  103.       Height      : in Gint); 
  104.    --  Create a new postscript file PsFile with the content of Canvas. 
  105.    --  Every plot on it is exported to the postscript file. 
  106.    --  Epsflag should be true if the generated file should be in 
  107.    --  Encapsulated Postscript format instead of simple Postscript. 
  108.    --  The page has a custom size. 
  109.  
  110.    --  Unbound: 
  111.    --     gtk_plot_ps_get_type 
  112.    --     gtk_plot_ps_new 
  113.    --     gtk_plot_ps_new_with_size 
  114.    --     gtk_plot_ps_construct 
  115.    --     gtk_plot_ps_construct_with_size 
  116.    --     gtk_plot_ps_set_size 
  117.    --     gtk_plot_ps_set_scale 
  118.  
  119. end Gtk.Extra.Plot_Ps;