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. --  A Gtk.Cell_View.Gtk_Cell_View displays a single row of a 
  26. --  Gtk.Tree_Model.Gtk_Tree_Model using a Gtk.Cell_Area.Gtk_Cell_Area and 
  27. --  Gtk.Cell_Area_Context.Gtk_Cell_Area_Context. A 
  28. --  Gtk.Cell_Area_Context.Gtk_Cell_Area_Context can be provided to the 
  29. --  Gtk.Cell_View.Gtk_Cell_View at construction time in order to keep the 
  30. --  cellview in context of a group of cell views, this ensures that the 
  31. --  renderers displayed will be properly aligned with eachother (like the 
  32. --  aligned cells in the menus of Gtk.Combo_Box.Gtk_Combo_Box). 
  33. -- 
  34. --  Gtk.Cell_View.Gtk_Cell_View is Gtk.Orientable.Gtk_Orientable in order to 
  35. --  decide in which orientation the underlying 
  36. --  Gtk.Cell_Area_Context.Gtk_Cell_Area_Context should be allocated. Taking the 
  37. --  Gtk.Combo_Box.Gtk_Combo_Box menu as an example, cellviews should be 
  38. --  oriented horizontally if the menus are listed top-to-bottom and thus all 
  39. --  share the same width but may have separate individual heights 
  40. --  (left-to-right menus should be allocated vertically since they all share 
  41. --  the same height but may have variable widths). 
  42. -- 
  43. --  </description> 
  44. pragma Ada_2005; 
  45.  
  46. pragma Warnings (Off, "*is already use-visible*"); 
  47. with Gdk.Color;             use Gdk.Color; 
  48. with Gdk.Pixbuf;            use Gdk.Pixbuf; 
  49. with Gdk.RGBA;              use Gdk.RGBA; 
  50. with Glib;                  use Glib; 
  51. with Glib.Object;           use Glib.Object; 
  52. with Glib.Properties;       use Glib.Properties; 
  53. with Glib.Types;            use Glib.Types; 
  54. with Gtk.Buildable;         use Gtk.Buildable; 
  55. with Gtk.Cell_Area;         use Gtk.Cell_Area; 
  56. with Gtk.Cell_Area_Context; use Gtk.Cell_Area_Context; 
  57. with Gtk.Cell_Layout;       use Gtk.Cell_Layout; 
  58. with Gtk.Cell_Renderer;     use Gtk.Cell_Renderer; 
  59. with Gtk.Enums;             use Gtk.Enums; 
  60. with Gtk.Orientable;        use Gtk.Orientable; 
  61. with Gtk.Tree_Model;        use Gtk.Tree_Model; 
  62. with Gtk.Widget;            use Gtk.Widget; 
  63.  
  64. package Gtk.Cell_View is 
  65.  
  66.    type Gtk_Cell_View_Record is new Gtk_Widget_Record with null record; 
  67.    type Gtk_Cell_View is access all Gtk_Cell_View_Record'Class; 
  68.  
  69.    --------------- 
  70.    -- Callbacks -- 
  71.    --------------- 
  72.  
  73.    type Gtk_Cell_Layout_Data_Func is access procedure 
  74.      (Cell_Layout : Gtk.Cell_Layout.Gtk_Cell_Layout; 
  75.       Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  76.       Tree_Model  : Gtk.Tree_Model.Gtk_Tree_Model; 
  77.       Iter        : Gtk.Tree_Model.Gtk_Tree_Iter); 
  78.    --  A function which should set the value of Cell_Layout's cell renderer(s) 
  79.    --  as appropriate. 
  80.    --  "cell_layout": a Gtk.Cell_Layout.Gtk_Cell_Layout 
  81.    --  "cell": the cell renderer whose value is to be set 
  82.    --  "tree_model": the model 
  83.    --  "iter": a Gtk.Tree_Model.Gtk_Tree_Iter indicating the row to set the 
  84.    --  value for 
  85.  
  86.    ------------------ 
  87.    -- Constructors -- 
  88.    ------------------ 
  89.  
  90.    procedure Gtk_New (Cell_View : out Gtk_Cell_View); 
  91.    procedure Initialize 
  92.       (Cell_View : not null access Gtk_Cell_View_Record'Class); 
  93.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget. 
  94.    --  Since: gtk+ 2.6 
  95.  
  96.    function Gtk_Cell_View_New return Gtk_Cell_View; 
  97.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget. 
  98.    --  Since: gtk+ 2.6 
  99.  
  100.    procedure Gtk_New_With_Context 
  101.       (Cell_View : out Gtk_Cell_View; 
  102.        Area      : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class; 
  103.        Context   : not null access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class); 
  104.    procedure Initialize_With_Context 
  105.       (Cell_View : not null access Gtk_Cell_View_Record'Class; 
  106.        Area      : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class; 
  107.        Context   : not null access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class); 
  108.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget with a specific 
  109.    --  Gtk.Cell_Area.Gtk_Cell_Area to layout cells and a specific 
  110.    --  Gtk.Cell_Area_Context.Gtk_Cell_Area_Context. 
  111.    --  Specifying the same context for a handfull of cells lets the underlying 
  112.    --  area synchronize the geometry for those cells, in this way alignments 
  113.    --  with cellviews for other rows are possible. 
  114.    --  Since: gtk+ 2.6 
  115.    --  "area": the Gtk.Cell_Area.Gtk_Cell_Area to layout cells 
  116.    --  "context": the Gtk.Cell_Area_Context.Gtk_Cell_Area_Context in which to 
  117.    --  calculate cell geometry 
  118.  
  119.    function Gtk_Cell_View_New_With_Context 
  120.       (Area    : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class; 
  121.        Context : not null access Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record'Class) 
  122.        return Gtk_Cell_View; 
  123.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget with a specific 
  124.    --  Gtk.Cell_Area.Gtk_Cell_Area to layout cells and a specific 
  125.    --  Gtk.Cell_Area_Context.Gtk_Cell_Area_Context. 
  126.    --  Specifying the same context for a handfull of cells lets the underlying 
  127.    --  area synchronize the geometry for those cells, in this way alignments 
  128.    --  with cellviews for other rows are possible. 
  129.    --  Since: gtk+ 2.6 
  130.    --  "area": the Gtk.Cell_Area.Gtk_Cell_Area to layout cells 
  131.    --  "context": the Gtk.Cell_Area_Context.Gtk_Cell_Area_Context in which to 
  132.    --  calculate cell geometry 
  133.  
  134.    procedure Gtk_New_With_Markup 
  135.       (Cell_View : out Gtk_Cell_View; 
  136.        Markup    : UTF8_String); 
  137.    procedure Initialize_With_Markup 
  138.       (Cell_View : not null access Gtk_Cell_View_Record'Class; 
  139.        Markup    : UTF8_String); 
  140.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a 
  141.    --  Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show 
  142.    --  Markup. The text can be marked up with the <link 
  143.    --  linkend="PangoMarkupFormat">Pango text markup language</link>. 
  144.    --  Since: gtk+ 2.6 
  145.    --  "markup": the text to display in the cell view 
  146.  
  147.    function Gtk_Cell_View_New_With_Markup 
  148.       (Markup : UTF8_String) return Gtk_Cell_View; 
  149.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a 
  150.    --  Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show 
  151.    --  Markup. The text can be marked up with the <link 
  152.    --  linkend="PangoMarkupFormat">Pango text markup language</link>. 
  153.    --  Since: gtk+ 2.6 
  154.    --  "markup": the text to display in the cell view 
  155.  
  156.    procedure Gtk_New_With_Pixbuf 
  157.       (Cell_View : out Gtk_Cell_View; 
  158.        Pixbuf    : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  159.    procedure Initialize_With_Pixbuf 
  160.       (Cell_View : not null access Gtk_Cell_View_Record'Class; 
  161.        Pixbuf    : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  162.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a 
  163.    --  Gtk.Cell_Renderer_Pixbuf.Gtk_Cell_Renderer_Pixbuf to it, and makes it 
  164.    --  show Pixbuf. 
  165.    --  Since: gtk+ 2.6 
  166.    --  "pixbuf": the image to display in the cell view 
  167.  
  168.    function Gtk_Cell_View_New_With_Pixbuf 
  169.       (Pixbuf : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class) 
  170.        return Gtk_Cell_View; 
  171.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a 
  172.    --  Gtk.Cell_Renderer_Pixbuf.Gtk_Cell_Renderer_Pixbuf to it, and makes it 
  173.    --  show Pixbuf. 
  174.    --  Since: gtk+ 2.6 
  175.    --  "pixbuf": the image to display in the cell view 
  176.  
  177.    procedure Gtk_New_With_Text 
  178.       (Cell_View : out Gtk_Cell_View; 
  179.        Text      : UTF8_String); 
  180.    procedure Initialize_With_Text 
  181.       (Cell_View : not null access Gtk_Cell_View_Record'Class; 
  182.        Text      : UTF8_String); 
  183.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a 
  184.    --  Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show 
  185.    --  Text. 
  186.    --  Since: gtk+ 2.6 
  187.    --  "text": the text to display in the cell view 
  188.  
  189.    function Gtk_Cell_View_New_With_Text 
  190.       (Text : UTF8_String) return Gtk_Cell_View; 
  191.    --  Creates a new Gtk.Cell_View.Gtk_Cell_View widget, adds a 
  192.    --  Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text to it, and makes it show 
  193.    --  Text. 
  194.    --  Since: gtk+ 2.6 
  195.    --  "text": the text to display in the cell view 
  196.  
  197.    function Get_Type return Glib.GType; 
  198.    pragma Import (C, Get_Type, "gtk_cell_view_get_type"); 
  199.  
  200.    ------------- 
  201.    -- Methods -- 
  202.    ------------- 
  203.  
  204.    function Get_Displayed_Row 
  205.       (Cell_View : not null access Gtk_Cell_View_Record) 
  206.        return Gtk.Tree_Model.Gtk_Tree_Path; 
  207.    --  Returns a Gtk.Tree_Model.Gtk_Tree_Path referring to the currently 
  208.    --  displayed row. If no row is currently displayed, null is returned. 
  209.    --  Since: gtk+ 2.6 
  210.  
  211.    procedure Set_Displayed_Row 
  212.       (Cell_View : not null access Gtk_Cell_View_Record; 
  213.        Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  214.    --  Sets the row of the model that is currently displayed by the 
  215.    --  Gtk.Cell_View.Gtk_Cell_View. If the path is unset, then the contents of 
  216.    --  the cellview "stick" at their last value; this is not normally a desired 
  217.    --  result, but may be a needed intermediate state if say, the model for the 
  218.    --  Gtk.Cell_View.Gtk_Cell_View becomes temporarily empty. 
  219.    --  Since: gtk+ 2.6 
  220.    --  "path": a Gtk.Tree_Model.Gtk_Tree_Path or null to unset. 
  221.  
  222.    function Get_Draw_Sensitive 
  223.       (Cell_View : not null access Gtk_Cell_View_Record) return Boolean; 
  224.    --  Gets whether Cell_View is configured to draw all of its cells in a 
  225.    --  sensitive state. 
  226.    --  Since: gtk+ 3.0 
  227.  
  228.    procedure Set_Draw_Sensitive 
  229.       (Cell_View      : not null access Gtk_Cell_View_Record; 
  230.        Draw_Sensitive : Boolean); 
  231.    --  Sets whether Cell_View should draw all of its cells in a sensitive 
  232.    --  state, this is used by Gtk.Combo_Box.Gtk_Combo_Box menus to ensure that 
  233.    --  rows with insensitive cells that contain children appear sensitive in 
  234.    --  the parent menu item. 
  235.    --  Since: gtk+ 3.0 
  236.    --  "draw_sensitive": whether to draw all cells in a sensitive state. 
  237.  
  238.    function Get_Fit_Model 
  239.       (Cell_View : not null access Gtk_Cell_View_Record) return Boolean; 
  240.    --  Gets whether Cell_View is configured to request space to fit the entire 
  241.    --  Gtk.Tree_Model.Gtk_Tree_Model. 
  242.    --  Since: gtk+ 3.0 
  243.  
  244.    procedure Set_Fit_Model 
  245.       (Cell_View : not null access Gtk_Cell_View_Record; 
  246.        Fit_Model : Boolean); 
  247.    --  Sets whether Cell_View should request space to fit the entire 
  248.    --  Gtk.Tree_Model.Gtk_Tree_Model. 
  249.    --  This is used by Gtk.Combo_Box.Gtk_Combo_Box to ensure that the cell 
  250.    --  view displayed on the combo box's button always gets enough space and 
  251.    --  does not resize when selection changes. 
  252.    --  Since: gtk+ 3.0 
  253.    --  "fit_model": whether Cell_View should request space for the whole 
  254.    --  model. 
  255.  
  256.    function Get_Model 
  257.       (Cell_View : not null access Gtk_Cell_View_Record) 
  258.        return Gtk.Tree_Model.Gtk_Tree_Model; 
  259.    --  Returns the model for Cell_View. If no model is used null is returned. 
  260.    --  Since: gtk+ 2.16 
  261.  
  262.    procedure Set_Model 
  263.       (Cell_View : not null access Gtk_Cell_View_Record; 
  264.        Model     : Gtk.Tree_Model.Gtk_Tree_Model); 
  265.    --  Sets the model for Cell_View. If Cell_View already has a model set, it 
  266.    --  will remove it before setting the new model. If Model is null, then it 
  267.    --  will unset the old model. 
  268.    --  Since: gtk+ 2.6 
  269.    --  "model": a Gtk.Tree_Model.Gtk_Tree_Model 
  270.  
  271.    function Get_Size_Of_Row 
  272.       (Cell_View   : not null access Gtk_Cell_View_Record; 
  273.        Path        : Gtk.Tree_Model.Gtk_Tree_Path; 
  274.        Requisition : access Gtk.Widget.Gtk_Requisition) return Boolean; 
  275.    pragma Obsolescent (Get_Size_Of_Row); 
  276.    --  Sets Requisition to the size needed by Cell_View to display the model 
  277.    --  row pointed to by Path. 
  278.    --  Since: gtk+ 2.6 
  279.    --  Deprecated since 3.0, Combo box formerly used this to calculate the 
  280.    --  sizes for cellviews, now you can achieve this by either using the 
  281.    --  Gtk.Cell_View.Gtk_Cell_View:fit-model property or by setting the 
  282.    --  currently displayed row of the Gtk.Cell_View.Gtk_Cell_View and using 
  283.    --  Gtk.Widget.Get_Preferred_Size. 
  284.    --  "path": a Gtk.Tree_Model.Gtk_Tree_Path 
  285.    --  "requisition": return location for the size 
  286.  
  287.    procedure Set_Background_Color 
  288.       (Cell_View : not null access Gtk_Cell_View_Record; 
  289.        Color     : Gdk.Color.Gdk_Color); 
  290.    pragma Obsolescent (Set_Background_Color); 
  291.    --  Sets the background color of View. 
  292.    --  Since: gtk+ 2.6 
  293.    --  Deprecated since 3.4, Use Gtk.Cell_View.Set_Background_Rgba instead. 
  294.    --  "color": the new background color 
  295.  
  296.    procedure Set_Background_Rgba 
  297.       (Cell_View : not null access Gtk_Cell_View_Record; 
  298.        Rgba      : Gdk.RGBA.Gdk_RGBA); 
  299.    --  Sets the background color of Cell_View. 
  300.    --  Since: gtk+ 3.0 
  301.    --  "rgba": the new background color 
  302.  
  303.    procedure Set_Cell_Data_Func 
  304.       (Cell_Layout : not null access Gtk_Cell_View_Record; 
  305.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  306.        Func        : Gtk_Cell_Layout_Data_Func); 
  307.    --  Sets the Gtk_Cell_Layout_Data_Func to use for Cell_Layout. 
  308.    --  This function is used instead of the standard attributes mapping for 
  309.    --  setting the column value, and should set the value of Cell_Layout's cell 
  310.    --  renderer(s) as appropriate. 
  311.    --  Func may be null to remove a previously set function. 
  312.    --  Since: gtk+ 2.4 
  313.    --  "cell": a Gtk.Cell_Renderer.Gtk_Cell_Renderer 
  314.    --  "func": the Gtk_Cell_Layout_Data_Func to use, or null 
  315.  
  316.    generic 
  317.       type User_Data_Type (<>) is private; 
  318.       with procedure Destroy (Data : in out User_Data_Type) is null; 
  319.    package Set_Cell_Data_Func_User_Data is 
  320.  
  321.       type Gtk_Cell_Layout_Data_Func is access procedure 
  322.         (Cell_Layout : Gtk.Cell_Layout.Gtk_Cell_Layout; 
  323.          Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  324.          Tree_Model  : Gtk.Tree_Model.Gtk_Tree_Model; 
  325.          Iter        : Gtk.Tree_Model.Gtk_Tree_Iter; 
  326.          Data        : User_Data_Type); 
  327.       --  A function which should set the value of Cell_Layout's cell renderer(s) 
  328.       --  as appropriate. 
  329.       --  "cell_layout": a Gtk.Cell_Layout.Gtk_Cell_Layout 
  330.       --  "cell": the cell renderer whose value is to be set 
  331.       --  "tree_model": the model 
  332.       --  "iter": a Gtk.Tree_Model.Gtk_Tree_Iter indicating the row to set the 
  333.       --  value for 
  334.       --  "data": user data passed to Gtk.Cell_Layout.Set_Cell_Data_Func 
  335.  
  336.       procedure Set_Cell_Data_Func 
  337.          (Cell_Layout : not null access Gtk.Cell_View.Gtk_Cell_View_Record'Class; 
  338.           Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  339.           Func        : Gtk_Cell_Layout_Data_Func; 
  340.           Func_Data   : User_Data_Type); 
  341.       --  Sets the Gtk_Cell_Layout_Data_Func to use for Cell_Layout. 
  342.       --  This function is used instead of the standard attributes mapping for 
  343.       --  setting the column value, and should set the value of Cell_Layout's 
  344.       --  cell renderer(s) as appropriate. 
  345.       --  Func may be null to remove a previously set function. 
  346.       --  Since: gtk+ 2.4 
  347.       --  "cell": a Gtk.Cell_Renderer.Gtk_Cell_Renderer 
  348.       --  "func": the Gtk_Cell_Layout_Data_Func to use, or null 
  349.       --  "func_data": user data for Func 
  350.  
  351.    end Set_Cell_Data_Func_User_Data; 
  352.  
  353.    --------------------------------------------- 
  354.    -- Inherited subprograms (from interfaces) -- 
  355.    --------------------------------------------- 
  356.    --  Methods inherited from the Buildable interface are not duplicated here 
  357.    --  since they are meant to be used by tools, mostly. If you need to call 
  358.    --  them, use an explicit cast through the "-" operator below. 
  359.  
  360.    procedure Add_Attribute 
  361.       (Cell_Layout : not null access Gtk_Cell_View_Record; 
  362.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  363.        Attribute   : UTF8_String; 
  364.        Column      : Gint); 
  365.  
  366.    procedure Clear (Cell_Layout : not null access Gtk_Cell_View_Record); 
  367.  
  368.    procedure Clear_Attributes 
  369.       (Cell_Layout : not null access Gtk_Cell_View_Record; 
  370.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); 
  371.  
  372.    function Get_Cells 
  373.       (Cell_Layout : not null access Gtk_Cell_View_Record) 
  374.        return Glib.Object.Object_Simple_List.Glist; 
  375.  
  376.    procedure Pack_End 
  377.       (Cell_Layout : not null access Gtk_Cell_View_Record; 
  378.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  379.        Expand      : Boolean); 
  380.  
  381.    procedure Pack_Start 
  382.       (Cell_Layout : not null access Gtk_Cell_View_Record; 
  383.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  384.        Expand      : Boolean); 
  385.  
  386.    procedure Reorder 
  387.       (Cell_Layout : not null access Gtk_Cell_View_Record; 
  388.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  389.        Position    : Gint); 
  390.  
  391.    function Get_Orientation 
  392.       (Self : not null access Gtk_Cell_View_Record) 
  393.        return Gtk.Enums.Gtk_Orientation; 
  394.  
  395.    procedure Set_Orientation 
  396.       (Self        : not null access Gtk_Cell_View_Record; 
  397.        Orientation : Gtk.Enums.Gtk_Orientation); 
  398.  
  399.    ---------------- 
  400.    -- Properties -- 
  401.    ---------------- 
  402.    --  The following properties are defined for this widget. See 
  403.    --  Glib.Properties for more information on properties) 
  404.  
  405.    Background_Property : constant Glib.Properties.Property_String; 
  406.    --  Flags: write 
  407.  
  408.    Background_Gdk_Property : constant Gdk.Color.Property_Gdk_Color; 
  409.    --  Type: Gdk.Color.Gdk_Color 
  410.    --  The background color as a Gdk.Color.Gdk_Color 
  411.  
  412.    Background_Rgba_Property : constant Gdk.RGBA.Property_RGBA; 
  413.    --  Type: Gdk.RGBA.Gdk_RGBA 
  414.    --  The background color as a Gdk.RGBA.Gdk_RGBA 
  415.  
  416.    Background_Set_Property : constant Glib.Properties.Property_Boolean; 
  417.  
  418.    Cell_Area_Property : constant Glib.Properties.Property_Object; 
  419.    --  Type: Gtk.Cell_Area.Gtk_Cell_Area 
  420.    --  The Gtk.Cell_Area.Gtk_Cell_Area rendering cells 
  421.    -- 
  422.    --  If no area is specified when creating the cell view with 
  423.    --  Gtk.Cell_View.Gtk_New_With_Context a horizontally oriented 
  424.    --  Gtk.Cell_Area_Box.Gtk_Cell_Area_Box will be used. 
  425.    -- 
  426.    --  since 3.0 
  427.  
  428.    Cell_Area_Context_Property : constant Glib.Properties.Property_Object; 
  429.    --  Type: Gtk.Cell_Area_Context.Gtk_Cell_Area_Context 
  430.    --  The Gtk.Cell_Area_Context.Gtk_Cell_Area_Context used to compute the 
  431.    --  geometry of the cell view. 
  432.    -- 
  433.    --  A group of cell views can be assigned the same context in order to 
  434.    --  ensure the sizes and cell alignments match across all the views with the 
  435.    --  same context. 
  436.    -- 
  437.    --  Gtk.Combo_Box.Gtk_Combo_Box menus uses this to assign the same context 
  438.    --  to all cell views in the menu items for a single menu (each submenu 
  439.    --  creates its own context since the size of each submenu does not depend 
  440.    --  on parent or sibling menus). 
  441.    -- 
  442.    --  since 3.0 
  443.  
  444.    Draw_Sensitive_Property : constant Glib.Properties.Property_Boolean; 
  445.    --  Whether all cells should be draw as sensitive for this view regardless 
  446.    --  of the actual cell properties (used to make menus with submenus appear 
  447.    --  sensitive when the items in submenus might be insensitive). 
  448.    -- 
  449.    --  since 3.0 
  450.  
  451.    Fit_Model_Property : constant Glib.Properties.Property_Boolean; 
  452.    --  Whether the view should request enough space to always fit the size of 
  453.    --  every row in the model (used by the combo box to ensure the combo box 
  454.    --  size doesnt change when different items are selected). 
  455.    -- 
  456.    --  since 3.0 
  457.  
  458.    Model_Property : constant Glib.Properties.Property_Interface; 
  459.    --  Type: Gtk.Tree_Model.Gtk_Tree_Model 
  460.    --  The model for cell view 
  461.    -- 
  462.    --  since 2.10 
  463.  
  464.    ---------------- 
  465.    -- Interfaces -- 
  466.    ---------------- 
  467.    --  This class implements several interfaces. See Glib.Types 
  468.    -- 
  469.    --  - "Buildable" 
  470.    -- 
  471.    --  - "CellLayout" 
  472.    -- 
  473.    --  - "Orientable" 
  474.  
  475.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  476.      (Gtk.Buildable.Gtk_Buildable, Gtk_Cell_View_Record, Gtk_Cell_View); 
  477.    function "+" 
  478.      (Widget : access Gtk_Cell_View_Record'Class) 
  479.    return Gtk.Buildable.Gtk_Buildable 
  480.    renames Implements_Gtk_Buildable.To_Interface; 
  481.    function "-" 
  482.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  483.    return Gtk_Cell_View 
  484.    renames Implements_Gtk_Buildable.To_Object; 
  485.  
  486.    package Implements_Gtk_Cell_Layout is new Glib.Types.Implements 
  487.      (Gtk.Cell_Layout.Gtk_Cell_Layout, Gtk_Cell_View_Record, Gtk_Cell_View); 
  488.    function "+" 
  489.      (Widget : access Gtk_Cell_View_Record'Class) 
  490.    return Gtk.Cell_Layout.Gtk_Cell_Layout 
  491.    renames Implements_Gtk_Cell_Layout.To_Interface; 
  492.    function "-" 
  493.      (Interf : Gtk.Cell_Layout.Gtk_Cell_Layout) 
  494.    return Gtk_Cell_View 
  495.    renames Implements_Gtk_Cell_Layout.To_Object; 
  496.  
  497.    package Implements_Gtk_Orientable is new Glib.Types.Implements 
  498.      (Gtk.Orientable.Gtk_Orientable, Gtk_Cell_View_Record, Gtk_Cell_View); 
  499.    function "+" 
  500.      (Widget : access Gtk_Cell_View_Record'Class) 
  501.    return Gtk.Orientable.Gtk_Orientable 
  502.    renames Implements_Gtk_Orientable.To_Interface; 
  503.    function "-" 
  504.      (Interf : Gtk.Orientable.Gtk_Orientable) 
  505.    return Gtk_Cell_View 
  506.    renames Implements_Gtk_Orientable.To_Object; 
  507.  
  508. private 
  509.    Model_Property : constant Glib.Properties.Property_Interface := 
  510.      Glib.Properties.Build ("model"); 
  511.    Fit_Model_Property : constant Glib.Properties.Property_Boolean := 
  512.      Glib.Properties.Build ("fit-model"); 
  513.    Draw_Sensitive_Property : constant Glib.Properties.Property_Boolean := 
  514.      Glib.Properties.Build ("draw-sensitive"); 
  515.    Cell_Area_Context_Property : constant Glib.Properties.Property_Object := 
  516.      Glib.Properties.Build ("cell-area-context"); 
  517.    Cell_Area_Property : constant Glib.Properties.Property_Object := 
  518.      Glib.Properties.Build ("cell-area"); 
  519.    Background_Set_Property : constant Glib.Properties.Property_Boolean := 
  520.      Glib.Properties.Build ("background-set"); 
  521.    Background_Rgba_Property : constant Gdk.RGBA.Property_RGBA := 
  522.      Gdk.RGBA.Build ("background-rgba"); 
  523.    Background_Gdk_Property : constant Gdk.Color.Property_Gdk_Color := 
  524.      Gdk.Color.Build ("background-gdk"); 
  525.    Background_Property : constant Glib.Properties.Property_String := 
  526.      Glib.Properties.Build ("background"); 
  527. end Gtk.Cell_View;