1. ----------------------------------------------------------------------- 
  2. --              GtkAda - Ada95 binding for Gtk+/Gnome                -- 
  3. --                                                                   -- 
  4. --                Copyright (C) 2006-2009, AdaCore                   -- 
  5. --                                                                   -- 
  6. -- This library is free software; you can redistribute it and/or     -- 
  7. -- modify it under the terms of the GNU General Public               -- 
  8. -- License as published by the Free Software Foundation; either      -- 
  9. -- version 2 of the License, or (at your option) any later version.  -- 
  10. --                                                                   -- 
  11. -- This library is distributed in the hope that it will be useful,   -- 
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  14. -- General Public License for more details.                          -- 
  15. --                                                                   -- 
  16. -- You should have received a copy of the GNU General Public         -- 
  17. -- License along with this library; if not, write to the             -- 
  18. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  19. -- Boston, MA 02111-1307, USA.                                       -- 
  20. --                                                                   -- 
  21. -- -- -- -- -- -- -- -- -- -- -- --
  22. ----------------------------------------------------------------------- 
  23.  
  24. --  <description> 
  25. --  A Gtk_Cell_Renderer_Progress can be used to render a progress bar in a cell 
  26. --  </description> 
  27. --  <c_version>2.8.17</c_version> 
  28. --  <group>Trees and Lists</group> 
  29.  
  30. with Glib.Properties; 
  31. with Gtk.Cell_Renderer; 
  32.  
  33. package Gtk.Cell_Renderer_Progress is 
  34.  
  35.    type Gtk_Cell_Renderer_Progress_Record is 
  36.      new Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record with null record; 
  37.    type Gtk_Cell_Renderer_Progress is 
  38.      access all Gtk_Cell_Renderer_Progress_Record'Class; 
  39.  
  40.    procedure Gtk_New    (Render : out Gtk_Cell_Renderer_Progress); 
  41.    procedure Initialize 
  42.      (Render : access Gtk_Cell_Renderer_Progress_Record'Class); 
  43.    --  Creates or initializes a new renderer. 
  44.    --  Adjust how text is drawn using object properties. 
  45.    --  Properties can be set either directly on the renderer, or in combination 
  46.    --  with a Gtk_Tree_View_Column so that the property is bound to a value 
  47.    --  in the Gtk_Tree_Model. 
  48.  
  49.    function Get_Type return GType; 
  50.    --  Returns the internal value associated with this renderer 
  51.  
  52.    ---------------- 
  53.    -- Properties -- 
  54.    ---------------- 
  55.  
  56.    --  <properties> 
  57.    --  The following properties are defined for this widget. See 
  58.    --  Glib.Properties for more information on properties. 
  59.    -- 
  60.    --  Name:  Text_Property 
  61.    --  Type:  String 
  62.    --  Descr: Text on the progress bar 
  63.    -- 
  64.    --  Name:  Value_Property 
  65.    --  Type:  Int 
  66.    --  Descr: Value of the progress bar 
  67.    -- 
  68.    --  Name:  Orientation_Property 
  69.    --  Type:  Enum 
  70.    --  Descr: Orientation and growth direction of the progress bar 
  71.    -- 
  72.    --  Name:  Pulse_Property 
  73.    --  Type:  Int 
  74.    --  Descr: Set this to positive values to indicate that some progress is 
  75.    --  made, but you don't know how much. 
  76.    -- 
  77.    --  Name:  Text_Xalign_Property 
  78.    --  Type:  Float 
  79.    --  Descr: The horizontal text alignment, from 0 (left) to 1 (right). 
  80.    --  Reversed for RTL layouts. 
  81.    -- 
  82.    --  Name:  Text_Yalign_Property 
  83.    --  Type:  Float 
  84.    --  Descr: The vertical text alignment, from 0 (top) to 1 (bottom). 
  85.    -- 
  86.    --  </properties> 
  87.  
  88.    Text_Property  : constant Glib.Properties.Property_String; 
  89.    Value_Property : constant Glib.Properties.Property_Int; 
  90.    --  Orientation_Property : constant Glib.Properties.Property_Enum; 
  91.    Pulse_Property : constant Glib.Properties.Property_Int; 
  92.    Text_Xalign_Property : constant Glib.Properties.Property_Float; 
  93.    Text_Yalign_Property : constant Glib.Properties.Property_Float; 
  94.  
  95. private 
  96.    pragma Import (C, Get_Type, "gtk_cell_renderer_progress_get_type"); 
  97.  
  98.    Text_Property : constant Glib.Properties.Property_String := 
  99.      Glib.Properties.Build ("text"); 
  100.    Value_Property : constant Glib.Properties.Property_Int := 
  101.      Glib.Properties.Build ("value"); 
  102.    --  Orientation_Property : constant Glib.Properties.Property_Enum := 
  103.    --    Glib.Properties.Build ("orientation"); 
  104.    Pulse_Property : constant Glib.Properties.Property_Int := 
  105.      Glib.Properties.Build ("pulse"); 
  106.    Text_Xalign_Property : constant Glib.Properties.Property_Float := 
  107.      Glib.Properties.Build ("text-xalign"); 
  108.    Text_Yalign_Property : constant Glib.Properties.Property_Float := 
  109.      Glib.Properties.Build ("text-yalign"); 
  110.  
  111. end Gtk.Cell_Renderer_Progress;