1. ----------------------------------------------------------------------- 
  2. --              GtkAda - Ada95 binding for Gtk+/Gnome                -- 
  3. --                                                                   -- 
  4. --                Copyright (C) 2006-2013, 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. -- As a special exception, if other files instantiate generics from  -- 
  22. -- this unit, or you link this unit with other files to produce an   -- 
  23. -- executable, this  unit  does not  by itself cause  the resulting  -- 
  24. -- executable to be covered by the GNU General Public License. This  -- 
  25. -- exception does not however invalidate any other reasons why the   -- 
  26. -- executable file  might be covered by the  GNU Public License.     -- 
  27. ----------------------------------------------------------------------- 
  28.  
  29. --  <description> 
  30. --  A Gtk_Cell_Renderer_Progress can be used to render a progress bar in a cell 
  31. --  </description> 
  32. --  <c_version>2.8.17</c_version> 
  33. --  <group>Trees and Lists</group> 
  34.  
  35. with Glib.Properties; 
  36. with Gtk.Cell_Renderer; 
  37.  
  38. package Gtk.Cell_Renderer_Progress is 
  39.  
  40.    type Gtk_Cell_Renderer_Progress_Record is 
  41.      new Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record with null record; 
  42.    type Gtk_Cell_Renderer_Progress is 
  43.      access all Gtk_Cell_Renderer_Progress_Record'Class; 
  44.  
  45.    procedure Gtk_New    (Render : out Gtk_Cell_Renderer_Progress); 
  46.    procedure Initialize 
  47.      (Render : access Gtk_Cell_Renderer_Progress_Record'Class); 
  48.    --  Creates or initializes a new renderer. 
  49.    --  Adjust how text is drawn using object properties. 
  50.    --  Properties can be set either directly on the renderer, or in combination 
  51.    --  with a Gtk_Tree_View_Column so that the property is bound to a value 
  52.    --  in the Gtk_Tree_Model. 
  53.  
  54.    function Get_Type return GType; 
  55.    --  Returns the internal value associated with this renderer 
  56.  
  57.    ---------------- 
  58.    -- Properties -- 
  59.    ---------------- 
  60.  
  61.    --  <properties> 
  62.    --  The following properties are defined for this widget. See 
  63.    --  Glib.Properties for more information on properties. 
  64.    -- 
  65.    --  Name:  Text_Property 
  66.    --  Type:  String 
  67.    --  Descr: Text on the progress bar 
  68.    -- 
  69.    --  Name:  Value_Property 
  70.    --  Type:  Int 
  71.    --  Descr: Value of the progress bar 
  72.    -- 
  73.    --  Name:  Orientation_Property 
  74.    --  Type:  Enum 
  75.    --  Descr: Orientation and growth direction of the progress bar 
  76.    -- 
  77.    --  Name:  Pulse_Property 
  78.    --  Type:  Int 
  79.    --  Descr: Set this to positive values to indicate that some progress is 
  80.    --  made, but you don't know how much. 
  81.    -- 
  82.    --  Name:  Text_Xalign_Property 
  83.    --  Type:  Float 
  84.    --  Descr: The horizontal text alignment, from 0 (left) to 1 (right). 
  85.    --  Reversed for RTL layouts. 
  86.    -- 
  87.    --  Name:  Text_Yalign_Property 
  88.    --  Type:  Float 
  89.    --  Descr: The vertical text alignment, from 0 (top) to 1 (bottom). 
  90.    -- 
  91.    --  </properties> 
  92.  
  93.    Text_Property  : constant Glib.Properties.Property_String; 
  94.    Value_Property : constant Glib.Properties.Property_Int; 
  95.    --  Orientation_Property : constant Glib.Properties.Property_Enum; 
  96.    Pulse_Property : constant Glib.Properties.Property_Int; 
  97.    Text_Xalign_Property : constant Glib.Properties.Property_Float; 
  98.    Text_Yalign_Property : constant Glib.Properties.Property_Float; 
  99.  
  100. private 
  101.    pragma Import (C, Get_Type, "gtk_cell_renderer_progress_get_type"); 
  102.  
  103.    Text_Property : constant Glib.Properties.Property_String := 
  104.      Glib.Properties.Build ("text"); 
  105.    Value_Property : constant Glib.Properties.Property_Int := 
  106.      Glib.Properties.Build ("value"); 
  107.    --  Orientation_Property : constant Glib.Properties.Property_Enum := 
  108.    --    Glib.Properties.Build ("orientation"); 
  109.    Pulse_Property : constant Glib.Properties.Property_Int := 
  110.      Glib.Properties.Build ("pulse"); 
  111.    Text_Xalign_Property : constant Glib.Properties.Property_Float := 
  112.      Glib.Properties.Build ("text-xalign"); 
  113.    Text_Yalign_Property : constant Glib.Properties.Property_Float := 
  114.      Glib.Properties.Build ("text-yalign"); 
  115.  
  116. end Gtk.Cell_Renderer_Progress;