1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  The Gtk.Cell_Renderer.Gtk_Cell_Renderer is a base class of a set of 
  26. --  objects used for rendering a cell to a cairo_t. These objects are used 
  27. --  primarily by the Gtk.Tree_View.Gtk_Tree_View widget, though they aren't 
  28. --  tied to them in any specific way. It is worth noting that 
  29. --  Gtk.Cell_Renderer.Gtk_Cell_Renderer is not a Gtk.Widget.Gtk_Widget and 
  30. --  cannot be treated as such. 
  31. -- 
  32. --  The primary use of a Gtk.Cell_Renderer.Gtk_Cell_Renderer is for drawing a 
  33. --  certain graphical elements on a cairo_t. Typically, one cell renderer is 
  34. --  used to draw many cells on the screen. To this extent, it isn't expected 
  35. --  that a CellRenderer keep any permanent state around. Instead, any state is 
  36. --  set just prior to use using GObjects property system. Then, the cell is 
  37. --  measured using Gtk.Cell_Renderer.Get_Size. Finally, the cell is rendered in 
  38. --  the correct location using Gtk.Cell_Renderer.Render. 
  39. -- 
  40. --  There are a number of rules that must be followed when writing a new 
  41. --  Gtk.Cell_Renderer.Gtk_Cell_Renderer. First and foremost, it's important 
  42. --  that a certain set of properties will always yield a cell renderer of the 
  43. --  same size, barring a Gtk.Style.Gtk_Style change. The 
  44. --  Gtk.Cell_Renderer.Gtk_Cell_Renderer also has a number of generic properties 
  45. --  that are expected to be honored by all children. 
  46. -- 
  47. --  Beyond merely rendering a cell, cell renderers can optionally provide 
  48. --  active user interface elements. A cell renderer can be 'activatable' like 
  49. --  Gtk.Cell_Renderer_Toggle.Gtk_Cell_Renderer_Toggle, which toggles when it 
  50. --  gets activated by a mouse click, or it can be 'editable' like 
  51. --  Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text, which allows the user to 
  52. --  edit the text using a Gtk.GEntry.Gtk_Entry. To make a cell renderer 
  53. --  activatable or editable, you have to implement the 
  54. --  Gtk.Cell_Renderer_Class.Gtk_Cell_Renderer_Class.activate or 
  55. --  Gtk.Cell_Renderer_Class.Gtk_Cell_Renderer_Class.start_editing virtual 
  56. --  functions, respectively. 
  57. -- 
  58. --  Many properties of Gtk.Cell_Renderer.Gtk_Cell_Renderer and its subclasses 
  59. --  have a corresponding "set" property, e.g. "cell-background-set" corresponds 
  60. --  to "cell-background". These "set" properties reflect whether a property has 
  61. --  been set or not. You should not set them independently. 
  62. -- 
  63. --  </description> 
  64. pragma Ada_2005; 
  65.  
  66. pragma Warnings (Off, "*is already use-visible*"); 
  67. with Cairo;                   use Cairo; 
  68. with Gdk.Color;               use Gdk.Color; 
  69. with Gdk.Event;               use Gdk.Event; 
  70. with Gdk.RGBA;                use Gdk.RGBA; 
  71. with Gdk.Rectangle;           use Gdk.Rectangle; 
  72. with Glib;                    use Glib; 
  73. with Glib.Generic_Properties; use Glib.Generic_Properties; 
  74. with Glib.Glist;              use Glib.Glist; 
  75. with Glib.Object;             use Glib.Object; 
  76. with Glib.Properties;         use Glib.Properties; 
  77. with Gtk.Cell_Editable;       use Gtk.Cell_Editable; 
  78. with Gtk.Enums;               use Gtk.Enums; 
  79. with Gtk.Widget;              use Gtk.Widget; 
  80.  
  81. package Gtk.Cell_Renderer is 
  82.  
  83.    type Gtk_Cell_Renderer_Record is new GObject_Record with null record; 
  84.    type Gtk_Cell_Renderer is access all Gtk_Cell_Renderer_Record'Class; 
  85.  
  86.    type Gtk_Cell_Renderer_State is mod 2 ** Integer'Size; 
  87.    pragma Convention (C, Gtk_Cell_Renderer_State); 
  88.    --  Tells how a cell is to be rendered. 
  89.  
  90.    Cell_Renderer_Selected : constant Gtk_Cell_Renderer_State := 1; 
  91.    Cell_Renderer_Prelit : constant Gtk_Cell_Renderer_State := 2; 
  92.    Cell_Renderer_Insensitive : constant Gtk_Cell_Renderer_State := 4; 
  93.    Cell_Renderer_Sorted : constant Gtk_Cell_Renderer_State := 8; 
  94.    Cell_Renderer_Focused : constant Gtk_Cell_Renderer_State := 16; 
  95.    Cell_Renderer_Expandable : constant Gtk_Cell_Renderer_State := 32; 
  96.    Cell_Renderer_Expanded : constant Gtk_Cell_Renderer_State := 64; 
  97.  
  98.    type Gtk_Cell_Renderer_Mode is ( 
  99.       Cell_Renderer_Mode_Inert, 
  100.       Cell_Renderer_Mode_Activatable, 
  101.       Cell_Renderer_Mode_Editable); 
  102.    pragma Convention (C, Gtk_Cell_Renderer_Mode); 
  103.    --  Identifies how the user can interact with a particular cell. 
  104.  
  105.    function Convert (R : Gtk.Cell_Renderer.Gtk_Cell_Renderer) return System.Address; 
  106.    function Convert (R : System.Address) return Gtk.Cell_Renderer.Gtk_Cell_Renderer; 
  107.    package Cell_Renderer_List is new Generic_List (Gtk.Cell_Renderer.Gtk_Cell_Renderer); 
  108.  
  109.    ---------------------------- 
  110.    -- Enumeration Properties -- 
  111.    ---------------------------- 
  112.  
  113.    package Gtk_Cell_Renderer_State_Properties is 
  114.       new Generic_Internal_Discrete_Property (Gtk_Cell_Renderer_State); 
  115.    type Property_Gtk_Cell_Renderer_State is new Gtk_Cell_Renderer_State_Properties.Property; 
  116.  
  117.    package Gtk_Cell_Renderer_Mode_Properties is 
  118.       new Generic_Internal_Discrete_Property (Gtk_Cell_Renderer_Mode); 
  119.    type Property_Gtk_Cell_Renderer_Mode is new Gtk_Cell_Renderer_Mode_Properties.Property; 
  120.  
  121.    ------------------ 
  122.    -- Constructors -- 
  123.    ------------------ 
  124.  
  125.    function Get_Type return Glib.GType; 
  126.    pragma Import (C, Get_Type, "gtk_cell_renderer_get_type"); 
  127.  
  128.    ------------- 
  129.    -- Methods -- 
  130.    ------------- 
  131.  
  132.    function Activate 
  133.       (Cell            : not null access Gtk_Cell_Renderer_Record; 
  134.        Event           : Gdk.Event.Gdk_Event; 
  135.        Widget          : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  136.        Path            : UTF8_String; 
  137.        Background_Area : Gdk.Rectangle.Gdk_Rectangle; 
  138.        Cell_Area       : Gdk.Rectangle.Gdk_Rectangle; 
  139.        Flags           : Gtk_Cell_Renderer_State) return Boolean; 
  140.    --  Passes an activate event to the cell renderer for possible processing. 
  141.    --  Some cell renderers may use events; for example, 
  142.    --  Gtk.Cell_Renderer_Toggle.Gtk_Cell_Renderer_Toggle toggles when it gets a 
  143.    --  mouse click. 
  144.    --  "event": a Gdk.Event.Gdk_Event 
  145.    --  "widget": widget that received the event 
  146.    --  "path": widget-dependent string representation of the event location; 
  147.    --  e.g. for Gtk.Tree_View.Gtk_Tree_View, a string representation of 
  148.    --  Gtk.Tree_Model.Gtk_Tree_Path 
  149.    --  "background_area": background area as passed to 
  150.    --  Gtk.Cell_Renderer.Render 
  151.    --  "cell_area": cell area as passed to Gtk.Cell_Renderer.Render 
  152.    --  "flags": render flags 
  153.  
  154.    procedure Get_Aligned_Area 
  155.       (Cell         : not null access Gtk_Cell_Renderer_Record; 
  156.        Widget       : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  157.        Flags        : Gtk_Cell_Renderer_State; 
  158.        Cell_Area    : Gdk.Rectangle.Gdk_Rectangle; 
  159.        Aligned_Area : out Gdk.Rectangle.Gdk_Rectangle); 
  160.    --  Gets the aligned area used by Cell inside Cell_Area. Used for finding 
  161.    --  the appropriate edit and focus rectangle. 
  162.    --  Since: gtk+ 3.0 
  163.    --  "widget": the Gtk.Widget.Gtk_Widget this cell will be rendering to 
  164.    --  "flags": render flags 
  165.    --  "cell_area": cell area which would be passed to 
  166.    --  Gtk.Cell_Renderer.Render 
  167.    --  "aligned_area": the return location for the space inside Cell_Area that 
  168.    --  would acually be used to render. 
  169.  
  170.    procedure Get_Alignment 
  171.       (Cell   : not null access Gtk_Cell_Renderer_Record; 
  172.        Xalign : out Gfloat; 
  173.        Yalign : out Gfloat); 
  174.    --  Fills in Xalign and Yalign with the appropriate values of Cell. 
  175.    --  Since: gtk+ 2.18 
  176.    --  "xalign": location to fill in with the x alignment of the cell, or null 
  177.    --  "yalign": location to fill in with the y alignment of the cell, or null 
  178.  
  179.    procedure Set_Alignment 
  180.       (Cell   : not null access Gtk_Cell_Renderer_Record; 
  181.        Xalign : Gfloat; 
  182.        Yalign : Gfloat); 
  183.    --  Sets the renderer's alignment within its available space. 
  184.    --  Since: gtk+ 2.18 
  185.    --  "xalign": the x alignment of the cell renderer 
  186.    --  "yalign": the y alignment of the cell renderer 
  187.  
  188.    procedure Get_Fixed_Size 
  189.       (Cell   : not null access Gtk_Cell_Renderer_Record; 
  190.        Width  : out Gint; 
  191.        Height : out Gint); 
  192.    --  Fills in Width and Height with the appropriate size of Cell. 
  193.    --  "width": location to fill in with the fixed width of the cell, or null 
  194.    --  "height": location to fill in with the fixed height of the cell, or 
  195.    --  null 
  196.  
  197.    procedure Set_Fixed_Size 
  198.       (Cell   : not null access Gtk_Cell_Renderer_Record; 
  199.        Width  : Gint; 
  200.        Height : Gint); 
  201.    --  Sets the renderer size to be explicit, independent of the properties 
  202.    --  set. 
  203.    --  "width": the width of the cell renderer, or -1 
  204.    --  "height": the height of the cell renderer, or -1 
  205.  
  206.    procedure Get_Padding 
  207.       (Cell : not null access Gtk_Cell_Renderer_Record; 
  208.        Xpad : out Gint; 
  209.        Ypad : out Gint); 
  210.    --  Fills in Xpad and Ypad with the appropriate values of Cell. 
  211.    --  Since: gtk+ 2.18 
  212.    --  "xpad": location to fill in with the x padding of the cell, or null 
  213.    --  "ypad": location to fill in with the y padding of the cell, or null 
  214.  
  215.    procedure Set_Padding 
  216.       (Cell : not null access Gtk_Cell_Renderer_Record; 
  217.        Xpad : Gint; 
  218.        Ypad : Gint); 
  219.    --  Sets the renderer's padding. 
  220.    --  Since: gtk+ 2.18 
  221.    --  "xpad": the x padding of the cell renderer 
  222.    --  "ypad": the y padding of the cell renderer 
  223.  
  224.    procedure Get_Preferred_Height 
  225.       (Cell         : not null access Gtk_Cell_Renderer_Record; 
  226.        Widget       : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  227.        Minimum_Size : out Gint; 
  228.        Natural_Size : out Gint); 
  229.    --  Retreives a renderer's natural size when rendered to Widget. 
  230.    --  Since: gtk+ 3.0 
  231.    --  "widget": the Gtk.Widget.Gtk_Widget this cell will be rendering to 
  232.    --  "minimum_size": location to store the minimum size, or null 
  233.    --  "natural_size": location to store the natural size, or null 
  234.  
  235.    procedure Get_Preferred_Height_For_Width 
  236.       (Cell           : not null access Gtk_Cell_Renderer_Record; 
  237.        Widget         : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  238.        Width          : Gint; 
  239.        Minimum_Height : out Gint; 
  240.        Natural_Height : out Gint); 
  241.    --  Retreives a cell renderers's minimum and natural height if it were 
  242.    --  rendered to Widget with the specified Width. 
  243.    --  Since: gtk+ 3.0 
  244.    --  "widget": the Gtk.Widget.Gtk_Widget this cell will be rendering to 
  245.    --  "width": the size which is available for allocation 
  246.    --  "minimum_height": location for storing the minimum size, or null 
  247.    --  "natural_height": location for storing the preferred size, or null 
  248.  
  249.    procedure Get_Preferred_Size 
  250.       (Cell         : not null access Gtk_Cell_Renderer_Record; 
  251.        Widget       : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  252.        Minimum_Size : out Gtk.Widget.Gtk_Requisition; 
  253.        Natural_Size : out Gtk.Widget.Gtk_Requisition); 
  254.    --  Retrieves the minimum and natural size of a cell taking into account 
  255.    --  the widget's preference for height-for-width management. 
  256.    --  Since: gtk+ 3.0 
  257.    --  "widget": the Gtk.Widget.Gtk_Widget this cell will be rendering to 
  258.    --  "minimum_size": location for storing the minimum size, or null 
  259.    --  "natural_size": location for storing the natural size, or null 
  260.  
  261.    procedure Get_Preferred_Width 
  262.       (Cell         : not null access Gtk_Cell_Renderer_Record; 
  263.        Widget       : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  264.        Minimum_Size : out Gint; 
  265.        Natural_Size : out Gint); 
  266.    --  Retreives a renderer's natural size when rendered to Widget. 
  267.    --  Since: gtk+ 3.0 
  268.    --  "widget": the Gtk.Widget.Gtk_Widget this cell will be rendering to 
  269.    --  "minimum_size": location to store the minimum size, or null 
  270.    --  "natural_size": location to store the natural size, or null 
  271.  
  272.    procedure Get_Preferred_Width_For_Height 
  273.       (Cell          : not null access Gtk_Cell_Renderer_Record; 
  274.        Widget        : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  275.        Height        : Gint; 
  276.        Minimum_Width : out Gint; 
  277.        Natural_Width : out Gint); 
  278.    --  Retreives a cell renderers's minimum and natural width if it were 
  279.    --  rendered to Widget with the specified Height. 
  280.    --  Since: gtk+ 3.0 
  281.    --  "widget": the Gtk.Widget.Gtk_Widget this cell will be rendering to 
  282.    --  "height": the size which is available for allocation 
  283.    --  "minimum_width": location for storing the minimum size, or null 
  284.    --  "natural_width": location for storing the preferred size, or null 
  285.  
  286.    function Get_Request_Mode 
  287.       (Cell : not null access Gtk_Cell_Renderer_Record) 
  288.        return Gtk.Enums.Gtk_Size_Request_Mode; 
  289.    --  Gets whether the cell renderer prefers a height-for-width layout or a 
  290.    --  width-for-height layout. 
  291.    --  Since: gtk+ 3.0 
  292.  
  293.    function Get_Sensitive 
  294.       (Cell : not null access Gtk_Cell_Renderer_Record) return Boolean; 
  295.    --  Returns the cell renderer's sensitivity. 
  296.    --  Since: gtk+ 2.18 
  297.  
  298.    procedure Set_Sensitive 
  299.       (Cell      : not null access Gtk_Cell_Renderer_Record; 
  300.        Sensitive : Boolean); 
  301.    --  Sets the cell renderer's sensitivity. 
  302.    --  Since: gtk+ 2.18 
  303.    --  "sensitive": the sensitivity of the cell 
  304.  
  305.    procedure Get_Size 
  306.       (Cell      : not null access Gtk_Cell_Renderer_Record; 
  307.        Widget    : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  308.        Cell_Area : in out Gdk.Rectangle.Gdk_Rectangle; 
  309.        X_Offset  : out Gint; 
  310.        Y_Offset  : out Gint; 
  311.        Width     : out Gint; 
  312.        Height    : out Gint); 
  313.    pragma Obsolescent (Get_Size); 
  314.    --  Obtains the width and height needed to render the cell. Used by view 
  315.    --  widgets to determine the appropriate size for the cell_area passed to 
  316.    --  Gtk.Cell_Renderer.Render. If Cell_Area is not null, fills in the x and y 
  317.    --  offsets (if set) of the cell relative to this location. 
  318.    --  Please note that the values set in Width and Height, as well as those 
  319.    --  in X_Offset and Y_Offset are inclusive of the xpad and ypad properties. 
  320.    --  Deprecated since 3.0, Use Gtk.Cell_Renderer.Get_Preferred_Size instead. 
  321.    --  "widget": the widget the renderer is rendering to 
  322.    --  "cell_area": The area a cell will be allocated, or null 
  323.    --  "x_offset": location to return x offset of cell relative to Cell_Area, 
  324.    --  or null 
  325.    --  "y_offset": location to return y offset of cell relative to Cell_Area, 
  326.    --  or null 
  327.    --  "width": location to return width needed to render a cell, or null 
  328.    --  "height": location to return height needed to render a cell, or null 
  329.  
  330.    function Get_State 
  331.       (Cell       : not null access Gtk_Cell_Renderer_Record; 
  332.        Widget     : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  333.        Cell_State : Gtk_Cell_Renderer_State) 
  334.        return Gtk.Enums.Gtk_State_Flags; 
  335.    --  Translates the cell renderer state to Gtk.Enums.Gtk_State_Flags, based 
  336.    --  on the cell renderer and widget sensitivity, and the given 
  337.    --  Gtk.Cell_Renderer.Gtk_Cell_Renderer_State. 
  338.    --  Since: gtk+ 3.0 
  339.    --  "widget": a Gtk.Widget.Gtk_Widget, or null 
  340.    --  "cell_state": cell renderer state 
  341.  
  342.    function Get_Visible 
  343.       (Cell : not null access Gtk_Cell_Renderer_Record) return Boolean; 
  344.    --  Returns the cell renderer's visibility. 
  345.    --  Since: gtk+ 2.18 
  346.  
  347.    procedure Set_Visible 
  348.       (Cell    : not null access Gtk_Cell_Renderer_Record; 
  349.        Visible : Boolean); 
  350.    --  Sets the cell renderer's visibility. 
  351.    --  Since: gtk+ 2.18 
  352.    --  "visible": the visibility of the cell 
  353.  
  354.    function Is_Activatable 
  355.       (Cell : not null access Gtk_Cell_Renderer_Record) return Boolean; 
  356.    --  Checks whether the cell renderer can do something when activated. 
  357.    --  Since: gtk+ 3.0 
  358.  
  359.    procedure Render 
  360.       (Cell            : not null access Gtk_Cell_Renderer_Record; 
  361.        Cr              : Cairo.Cairo_Context; 
  362.        Widget          : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  363.        Background_Area : Gdk.Rectangle.Gdk_Rectangle; 
  364.        Cell_Area       : Gdk.Rectangle.Gdk_Rectangle; 
  365.        Flags           : Gtk_Cell_Renderer_State); 
  366.    --  Invokes the virtual render function of the 
  367.    --  Gtk.Cell_Renderer.Gtk_Cell_Renderer. The three passed-in rectangles are 
  368.    --  areas in Cr. Most renderers will draw within Cell_Area; the xalign, 
  369.    --  yalign, xpad, and ypad fields of the Gtk.Cell_Renderer.Gtk_Cell_Renderer 
  370.    --  should be honored with respect to Cell_Area. Background_Area includes 
  371.    --  the blank space around the cell, and also the area containing the tree 
  372.    --  expander; so the Background_Area rectangles for all cells tile to cover 
  373.    --  the entire Window. 
  374.    --  "cr": a cairo context to draw to 
  375.    --  "widget": the widget owning Window 
  376.    --  "background_area": entire cell area (including tree expanders and maybe 
  377.    --  padding on the sides) 
  378.    --  "cell_area": area normally rendered by a cell renderer 
  379.    --  "flags": flags that affect rendering 
  380.  
  381.    function Start_Editing 
  382.       (Cell            : not null access Gtk_Cell_Renderer_Record; 
  383.        Event           : Gdk.Event.Gdk_Event; 
  384.        Widget          : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  385.        Path            : UTF8_String; 
  386.        Background_Area : Gdk.Rectangle.Gdk_Rectangle; 
  387.        Cell_Area       : Gdk.Rectangle.Gdk_Rectangle; 
  388.        Flags           : Gtk_Cell_Renderer_State) 
  389.        return Gtk.Cell_Editable.Gtk_Cell_Editable; 
  390.    --  Passes an activate event to the cell renderer for possible processing. 
  391.    --  "event": a Gdk.Event.Gdk_Event 
  392.    --  "widget": widget that received the event 
  393.    --  "path": widget-dependent string representation of the event location; 
  394.    --  e.g. for Gtk.Tree_View.Gtk_Tree_View, a string representation of 
  395.    --  Gtk.Tree_Model.Gtk_Tree_Path 
  396.    --  "background_area": background area as passed to 
  397.    --  Gtk.Cell_Renderer.Render 
  398.    --  "cell_area": cell area as passed to Gtk.Cell_Renderer.Render 
  399.    --  "flags": render flags 
  400.  
  401.    procedure Stop_Editing 
  402.       (Cell     : not null access Gtk_Cell_Renderer_Record; 
  403.        Canceled : Boolean); 
  404.    --  Informs the cell renderer that the editing is stopped. If Canceled is 
  405.    --  True, the cell renderer will emit the 
  406.    --  Gtk.Cell_Renderer.Gtk_Cell_Renderer::editing-canceled signal. 
  407.    --  This function should be called by cell renderer implementations in 
  408.    --  response to the Gtk.Cell_Editable.Gtk_Cell_Editable::editing-done signal 
  409.    --  of Gtk.Cell_Editable.Gtk_Cell_Editable. 
  410.    --  Since: gtk+ 2.6 
  411.    --  "canceled": True if the editing has been canceled 
  412.  
  413.    ---------------- 
  414.    -- Properties -- 
  415.    ---------------- 
  416.    --  The following properties are defined for this widget. See 
  417.    --  Glib.Properties for more information on properties) 
  418.  
  419.    Cell_Background_Property : constant Glib.Properties.Property_String; 
  420.    --  Flags: write 
  421.  
  422.    Cell_Background_Gdk_Property : constant Gdk.Color.Property_Gdk_Color; 
  423.    --  Type: Gdk.Color.Gdk_Color 
  424.    --  Cell background as a Gdk.Color.Gdk_Color 
  425.  
  426.    Cell_Background_Rgba_Property : constant Gdk.RGBA.Property_RGBA; 
  427.    --  Type: Gdk.RGBA.Gdk_RGBA 
  428.    --  Cell background as a Gdk.RGBA.Gdk_RGBA 
  429.  
  430.    Cell_Background_Set_Property : constant Glib.Properties.Property_Boolean; 
  431.  
  432.    Editing_Property : constant Glib.Properties.Property_Boolean; 
  433.  
  434.    Height_Property : constant Glib.Properties.Property_Int; 
  435.  
  436.    Is_Expanded_Property : constant Glib.Properties.Property_Boolean; 
  437.  
  438.    Is_Expander_Property : constant Glib.Properties.Property_Boolean; 
  439.  
  440.    Mode_Property : constant Gtk.Cell_Renderer.Property_Gtk_Cell_Renderer_Mode; 
  441.    --  Type: Gtk_Cell_Renderer_Mode 
  442.  
  443.    Sensitive_Property : constant Glib.Properties.Property_Boolean; 
  444.  
  445.    Visible_Property : constant Glib.Properties.Property_Boolean; 
  446.  
  447.    Width_Property : constant Glib.Properties.Property_Int; 
  448.  
  449.    Xalign_Property : constant Glib.Properties.Property_Float; 
  450.  
  451.    Xpad_Property : constant Glib.Properties.Property_Uint; 
  452.  
  453.    Yalign_Property : constant Glib.Properties.Property_Float; 
  454.  
  455.    Ypad_Property : constant Glib.Properties.Property_Uint; 
  456.  
  457.    ------------- 
  458.    -- Signals -- 
  459.    ------------- 
  460.  
  461.    type Cb_Gtk_Cell_Renderer_Void is not null access procedure 
  462.      (Self : access Gtk_Cell_Renderer_Record'Class); 
  463.  
  464.    type Cb_GObject_Void is not null access procedure 
  465.      (Self : access Glib.Object.GObject_Record'Class); 
  466.  
  467.    Signal_Editing_Canceled : constant Glib.Signal_Name := "editing-canceled"; 
  468.    procedure On_Editing_Canceled 
  469.       (Self  : not null access Gtk_Cell_Renderer_Record; 
  470.        Call  : Cb_Gtk_Cell_Renderer_Void; 
  471.        After : Boolean := False); 
  472.    procedure On_Editing_Canceled 
  473.       (Self  : not null access Gtk_Cell_Renderer_Record; 
  474.        Call  : Cb_GObject_Void; 
  475.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  476.        After : Boolean := False); 
  477.    --  This signal gets emitted when the user cancels the process of editing a 
  478.    --  cell. For example, an editable cell renderer could be written to cancel 
  479.    --  editing when the user presses Escape. 
  480.    -- 
  481.    --  See also: Gtk.Cell_Renderer.Stop_Editing. 
  482.  
  483.    type Cb_Gtk_Cell_Renderer_Gtk_Cell_Editable_UTF8_String_Void is not null access procedure 
  484.      (Self     : access Gtk_Cell_Renderer_Record'Class; 
  485.       Editable : Gtk.Cell_Editable.Gtk_Cell_Editable; 
  486.       Path     : UTF8_String); 
  487.  
  488.    type Cb_GObject_Gtk_Cell_Editable_UTF8_String_Void is not null access procedure 
  489.      (Self     : access Glib.Object.GObject_Record'Class; 
  490.       Editable : Gtk.Cell_Editable.Gtk_Cell_Editable; 
  491.       Path     : UTF8_String); 
  492.  
  493.    Signal_Editing_Started : constant Glib.Signal_Name := "editing-started"; 
  494.    procedure On_Editing_Started 
  495.       (Self  : not null access Gtk_Cell_Renderer_Record; 
  496.        Call  : Cb_Gtk_Cell_Renderer_Gtk_Cell_Editable_UTF8_String_Void; 
  497.        After : Boolean := False); 
  498.    procedure On_Editing_Started 
  499.       (Self  : not null access Gtk_Cell_Renderer_Record; 
  500.        Call  : Cb_GObject_Gtk_Cell_Editable_UTF8_String_Void; 
  501.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  502.        After : Boolean := False); 
  503.    --  This signal gets emitted when a cell starts to be edited. The intended 
  504.    --  use of this signal is to do special setup on Editable, e.g. adding a 
  505.    --  Gtk.Entry_Completion.Gtk_Entry_Completion or setting up additional 
  506.    --  columns in a Gtk.Combo_Box.Gtk_Combo_Box. 
  507.    -- 
  508.    --  Note that GTK+ doesn't guarantee that cell renderers will continue to 
  509.    --  use the same kind of widget for editing in future releases, therefore 
  510.    --  you should check the type of Editable before doing any specific setup, 
  511.    --  as in the following example: |[ static void text_editing_started 
  512.    --  (GtkCellRenderer *cell, GtkCellEditable *editable, const gchar *path, 
  513.    --  gpointer data) { if (GTK_IS_ENTRY (editable)) { GtkEntry *entry = 
  514.    --  GTK_ENTRY (editable); /* ... create a GtkEntryCompletion */ 
  515.    --  gtk_entry_set_completion (entry, completion); } } ]| 
  516.    --  
  517.    --  Callback parameters: 
  518.    --    --  "editable": the Gtk.Cell_Editable.Gtk_Cell_Editable 
  519.    --    --  "path": the path identifying the edited cell 
  520.  
  521. private 
  522.    Ypad_Property : constant Glib.Properties.Property_Uint := 
  523.      Glib.Properties.Build ("ypad"); 
  524.    Yalign_Property : constant Glib.Properties.Property_Float := 
  525.      Glib.Properties.Build ("yalign"); 
  526.    Xpad_Property : constant Glib.Properties.Property_Uint := 
  527.      Glib.Properties.Build ("xpad"); 
  528.    Xalign_Property : constant Glib.Properties.Property_Float := 
  529.      Glib.Properties.Build ("xalign"); 
  530.    Width_Property : constant Glib.Properties.Property_Int := 
  531.      Glib.Properties.Build ("width"); 
  532.    Visible_Property : constant Glib.Properties.Property_Boolean := 
  533.      Glib.Properties.Build ("visible"); 
  534.    Sensitive_Property : constant Glib.Properties.Property_Boolean := 
  535.      Glib.Properties.Build ("sensitive"); 
  536.    Mode_Property : constant Gtk.Cell_Renderer.Property_Gtk_Cell_Renderer_Mode := 
  537.      Gtk.Cell_Renderer.Build ("mode"); 
  538.    Is_Expander_Property : constant Glib.Properties.Property_Boolean := 
  539.      Glib.Properties.Build ("is-expander"); 
  540.    Is_Expanded_Property : constant Glib.Properties.Property_Boolean := 
  541.      Glib.Properties.Build ("is-expanded"); 
  542.    Height_Property : constant Glib.Properties.Property_Int := 
  543.      Glib.Properties.Build ("height"); 
  544.    Editing_Property : constant Glib.Properties.Property_Boolean := 
  545.      Glib.Properties.Build ("editing"); 
  546.    Cell_Background_Set_Property : constant Glib.Properties.Property_Boolean := 
  547.      Glib.Properties.Build ("cell-background-set"); 
  548.    Cell_Background_Rgba_Property : constant Gdk.RGBA.Property_RGBA := 
  549.      Gdk.RGBA.Build ("cell-background-rgba"); 
  550.    Cell_Background_Gdk_Property : constant Gdk.Color.Property_Gdk_Color := 
  551.      Gdk.Color.Build ("cell-background-gdk"); 
  552.    Cell_Background_Property : constant Glib.Properties.Property_String := 
  553.      Glib.Properties.Build ("cell-background"); 
  554. end Gtk.Cell_Renderer;