## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --              GtkAda - Ada95 binding for Gtk+/Gnome                --

3.     --                                                                   --

4.     --                Copyright (C) 2006-2010, 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.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  A Gtk_Cell_View displays a single row of a Gtk_Tree_Model, using cell

31.     --  renderers just like Gtk_Tree_View. Gtk_Cell_View doesn't support some of

32.     --  the more complex features of Gtk_Tree_View, like cell editing and drag and

33.     --  drop.

34.     --  </description>

35.     --  <c_version>2.14</c_version>

36.     --  <group>Trees and Lists</group>

37.     --  <testgtk>create_cell_view.adb</testgtk>

39.     with Glib.PropertiesTo API docTo specTo body;

40.     with Glib.TypesTo API docTo specTo body;

41.     with Gdk.ColorTo API docTo specTo body;

42.     with Gdk.PixbufTo API docTo specTo body;

43.     with Gtk.Cell_RendererTo API docTo specTo body;

44.     with Gtk.Cell_LayoutTo API docTo specTo body;

45.     with Gtk.Tree_ModelTo API docTo specTo body;

46.     with Gtk.WidgetTo API docTo specTo body;

48.     package Gtk.Cell_ViewTo API docTo specTo body is

49.        type Gtk_Cell_View_Record is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body

50.           with null record;

51.        type Gtk_Cell_View is access all Gtk_Cell_View_RecordTo API docTo spec'Class;

53.        procedure Gtk_NewTo API docTo body    (View : out Gtk_Cell_ViewTo API docTo spec);

54.        procedure InitializeTo API docTo body (View : access Gtk_Cell_View_RecordTo API docTo spec'Class);

55.        --  Creates or initializes a new Gtk_Cell_View

57.        procedure Gtk_New_With_TextTo API docTo body (View : out Gtk_Cell_ViewTo API docTo spec; Text : String);

58.        procedure Initialize_With_TextTo API docTo body

59.          (View : access Gtk_Cell_View_RecordTo API docTo spec'Class; Text : String);

60.        --  Creates a new Gtk_Cell_View widget, adds a Gtk_Cell_Renderer_Text to it,

61.        --  and makes it show Text.

63.        procedure Gtk_New_With_MarkupTo API docTo body (View : out Gtk_Cell_ViewTo API docTo spec; Markup : String);

64.        procedure Initialize_With_MarkupTo API docTo body

65.          (View : access Gtk_Cell_View_RecordTo API docTo spec'Class; Markup : String);

66.        --  Creates a new Gtk_Cell_View widget, adds a Gtk_Cell_Renderer_Text to it,

67.        --  and makes its show Markup. The text can be marked up with the Pango text

68.        --  markup language.

70.        procedure Gtk_New_With_PixbufTo API docTo body

71.          (View : out Gtk_Cell_ViewTo API docTo spec; Pixbuf : Gdk.Pixbuf.Gdk_PixbufTo API docTo spec);

72.        procedure Initialize_With_PixbufTo API docTo body

73.          (View   : access Gtk_Cell_View_RecordTo API docTo spec'Class;

74.           Pixbuf : Gdk.Pixbuf.Gdk_PixbufTo API docTo spec);

75.        --  Creates a new Gtk_Cell_View widget, adds a Gtk_Cell_Renderer_Pixbuf

76.        --  to it, and makes its show Pixbuf.

78.        function Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

79.        --  Returns the internal value used for Gtk_Cell_View

81.        procedure Set_Displayed_RowTo API docTo body

82.          (Cell_View : access Gtk_Cell_View_RecordTo API docTo spec;

83.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec);

84.        --  Sets the row of the model that is currently displayed by the

85.        --  Gtk_Cell_View. If the path is unset, then the contents of the cellview

86.        --  "stick" at their last value; this is not normally a desired result, but

87.        --  may be a needed intermediate state if say, the model for the

88.        --  Gtk_Cell_View becomes temporarily empty.

90.        function Get_Displayed_RowTo API docTo body

91.          (Cell_View : access Gtk_Cell_View_RecordTo API docTo spec)

92.           return Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

93.        --  Returns a Gtk_Tree_Path referring to the currently displayed row. If no

94.        --  row is currently displayed, null is returned.

96.        function Get_Size_Of_RowTo API docTo body

97.          (Cell_View   : access Gtk_Cell_View_RecordTo API docTo spec;

98.           Path        : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec)

99.           return Gtk.Widget.Gtk_RequisitionTo API docTo spec;

100.        --  Return the size needed by Cell_View to display the model row pointed to

101.        --  by Path.

103.        procedure Set_Background_ColorTo API docTo body

104.          (Cell_View : access Gtk_Cell_View_RecordTo API docTo spec;

105.           ColorTo API docTo body     : Gdk.Color.Gdk_ColorTo API docTo specTo body);

106.        --  Sets the background color of View.

108.        procedure Set_ModelTo API docTo body

109.          (Cell_View : access Gtk_Cell_View_RecordTo API docTo spec;

110.           Model     : Gtk.Tree_Model.Gtk_Tree_ModelTo API docTo spec);

111.        --  Sets the model for Cell_View.  If Cell_View already has a model

112.        --  set, it will remove it before setting the new model.  If Model is

113.        --  null, then it will unset the old model.

115.        function Get_ModelTo API docTo body

116.          (Cell_View : access Gtk_Cell_View_RecordTo API docTo spec)

117.           return Gtk.Tree_Model.Gtk_Tree_ModelTo API docTo spec;

118.        --  Returns the model for Cell_View.  If no model is used, null is

119.        --  returned.

121.        function Get_Cell_RenderersTo API docTo body

122.          (Cell_View : access Gtk_Cell_View_RecordTo API docTo spec)

123.          return Gtk.Cell_Renderer.Cell_Renderer_List.GlistTo API docTo specTo body;

124.        --  Returns the cell renderers which have been added to Cell_View.

125.        --  Return value: a list of cell renderers.

126.        --  The list must be freed by the caller.

128.        ----------------

129.        -- Interfaces --

130.        ----------------

131.        --  This class implements several interfaces. See Glib.Types

132.        --

133.        --  - "Gtk_Cell_Layout"

134.        --    This interface should be used to add new renderers to the view, to

135.        --    render various columns of the model

137.        package Implements_Cell_Layout is new Glib.Types.ImplementsTo API docTo specTo body

138.          (Gtk.Cell_Layout.Gtk_Cell_LayoutTo API docTo spec, Gtk_Cell_View_RecordTo API docTo spec, Gtk_Cell_ViewTo API docTo spec);

139.        function "+"

140.          (View : access Gtk_Cell_View_RecordTo API docTo spec'Class)

141.           return Gtk.Cell_Layout.Gtk_Cell_LayoutTo API docTo spec

142.           renames Implements_Cell_Layout.To_InterfaceTo API docTo specTo body;

143.        function "-"

144.          (Layout : Gtk.Cell_Layout.Gtk_Cell_LayoutTo API docTo spec)

145.           return Gtk_Cell_ViewTo API docTo spec

146.           renames Implements_Cell_Layout.To_ObjectTo API docTo specTo body;

147.        --  Converts to and from the Gtk_Cell_Layout interface

149.        ----------------

150.        -- Properties --

151.        ----------------

152.        --  The following properties are defined for this widget. See

153.        --  Glib.Properties for more information on properties.

155.        --  <properties>

156.        --  Name:  Background_Property

157.        --  Type:  String`

158.        --  Descr: Background color as a string

159.        --

160.        --  Name:  Background_Gdk_Property

161.        --  Type:  Boxed

162.        --  Descr: Background color as a GdkColor

163.        --

164.        --  Name:  Model_Property

165.        --  Type:  Object

166.        --  Descr: The model for cell view

167.        --  </properties>

169.        Background_Property     : constant Glib.Properties.Property_StringTo API docTo spec;

170.        --  Background_Gdk_Property : constant Glib.Properties.Property_Boxed;

171.        Model_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

173.     private

174.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_cell_view_get_type");

176.        Background_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

177.          Glib.Properties.BuildTo API docTo specTo body ("background");

178.        Model_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

179.          Glib.Properties.BuildTo API docTo specTo body ("model");

180.     --     Background_Gdk_Property : constant Glib.Properties.Property_Boxed :=

181.     --       Glib.Properties.Build ("background-gdk");

183.     end Gtk.Cell_ViewTo API docTo specTo body;