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