## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                Copyright (C) 2001-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.     -- 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_Renderer_Text renders a given text in its cell, using the font,

31.     --  color and style information provided by its properties. The text will be

32.     --  ellipsized if it is too long and the ellipsize property allows it.

33.     --

34.     --  If the mode is CELL_RENDERER_MODE_EDITABLE, the Gtk_Cell_Renderer_Text

35.     --  allows to edit its text using an entry.

36.     --  </description>

37.     --  <c_version>2.14</c_version>

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

40.     with Pango.EnumsTo API docTo specTo body;

41.     with Glib.PropertiesTo API docTo specTo body;

42.     with Gdk.ColorTo API docTo specTo body;

43.     with GtkTo API docTo spec;

44.     with Gtk.Cell_RendererTo API docTo specTo body;

46.     package Gtk.Cell_Renderer_TextTo API docTo specTo body is

48.        type Gtk_Cell_Renderer_Text_RecordTo API docTo body is

49.          new Gtk.Cell_Renderer.Gtk_Cell_Renderer_RecordTo API docTo specTo body with private;

50.        type Gtk_Cell_Renderer_Text is

51.          access all Gtk_Cell_Renderer_Text_RecordTo API docTo specTo body'Class;

53.        procedure Gtk_NewTo API docTo body (Widget : out Gtk_Cell_Renderer_TextTo API docTo spec);

54.        procedure InitializeTo API docTo body (Widget : access Gtk_Cell_Renderer_Text_RecordTo API docTo specTo body'Class);

55.        --  Creates or initializes a new renderer

57.        function Get_TypeTo API docTo body return Gtk.Gtk_TypeTo API docTo spec;

58.        --  Return the internal value associated with this widget.

60.        procedure Set_Fixed_Height_From_FontTo API docTo body

61.          (Renderer       : access Gtk_Cell_Renderer_Text_RecordTo API docTo specTo body;

62.           Number_Of_Rows : GintTo API docTo spec);

63.        --  Sets the height of a renderer to explicitly be determined by the "font"

64.        --  and "y_pad" property set on it. Further changes in these properties do

65.        --  not affect the height, so they must be accompanied by a subsequent call

66.        --  to this function. Using this function is unflexible, and should really

67.        --  only be used if calculating the size of a cell is too slow (ie, a

68.        --  massive number of cells displayed). If number_of_rows is -1, then the

69.        --  fixed height is unset, and the height is determined by the properties

70.        --  again.

72.        -------------

73.        -- Signals --

74.        -------------

76.        --  <signals>

77.        --  The following new signals are defined for this widget:

78.        --

79.        --  - "edited"

80.        --    procedure Handler

81.        --     (Widget : access Gtk_Cell_Renderer_Text_Record'Class;

82.        --       Path : UTF8_String;

83.        --       New_Text : UTF8_String);

84.        --

85.        --    Called when the text has been edited interactively . Note that you

86.        --    also need to set the attribute "editable" for users to be able to

87.        --    interactively edit the cell. If you want to take into account the

88.        --    change, you need to change the value in the model appropriately, for

89.        --    instance through a call to Set_Value

90.        --  </signals>

92.        Signal_Edited : constant Glib.Signal_NameTo API docTo spec := "edited";

94.        ----------------

95.        -- Properties --

96.        ----------------

98.        --  The following properties are defined for this cell_renderer :

99.        --  <properties>

100.        --

101.        --  Name:  Attributes_Property

102.        --  Type:  Boxed

103.        --  Descr: A list of style attributes to apply to the text of the renderer

104.        --

105.        --  Name:  Background_Property

106.        --  Type:  String

107.        --  Descr: Background color as a string

108.        --

109.        --  Name:  Background_Gdk_Property

110.        --  Type:  Boxed

111.        --  Descr: Background color as a GdkColor

112.        --

113.        --  Name:  Editable_Property

114.        --  Type:  Boolean

115.        --  Descr: Whether the text can be modified by the user

116.        --

117.        --  Name:  Ellipsize_Property

118.        --  Type:  Enum

119.        --  Descr: The preferred place to ellipsize the string,

120.        --

121.        --  Name:  Family_Property

122.        --  Type:  String

123.        --  Descr: Name of the font family, e.g. Sans, Helvetica, Times, Monospace

124.        --

125.        --  Name:  Font_Property

126.        --  Type:  String

127.        --  Descr: Font description as a string

128.        --

129.        --  Name:  Font_Desc_Property

130.        --  Type:  Boxed

131.        --  Descr: Font description as a PangoFontDescription struct

132.        --

133.        --  Name:  Foreground_Property

134.        --  Type:  String

135.        --  Descr: Foreground color as a string

136.        --

137.        --  Name:  Foreground_Gdk_Property

138.        --  Type:  Boxed

139.        --  Descr: Foreground color as a GdkColor

140.        --

141.        --  Name:  Language_Property

142.        --  Type:  String

143.        --  Descr: The language this text is in, as an ISO code.

144.        --

145.        --  Name:  Markup_Property

146.        --  Type:  String

147.        --  Descr: Marked up text to render

148.        --

149.        --  Name:  Rise_Property

150.        --  Type:  Int

151.        --  Descr: Offset of text above the baseline

152.        --

153.        --  Name:  Scale_Property

154.        --  Type:  Double

155.        --  Descr: Font scaling factor

156.        --

157.        --  Name:  Single_Paragraph_Mode_Property

158.        --  Type:  Boolean

159.        --  Descr: Whether or not to keep all text in a single paragraph

160.        --

161.        --  Name:  Size_Property

162.        --  Type:  Int

163.        --  Descr: Font size

164.        --

165.        --  Name:  Size_Points_Property

166.        --  Type:  Double

167.        --  Descr: Font size in points

168.        --

169.        --  Name:  Stretch_Property

170.        --  Type:  Enum

171.        --  Descr: Font stretch

172.        --

173.        --  Name:  Strikethrough_Property

174.        --  Type:  Boolean

175.        --  Descr: Whether to strike through the text

176.        --

177.        --  Name:  Style_Property

178.        --  Type:  Enum

179.        --  Descr: Font style

180.        --

181.        --  Name:  Text_Property

182.        --  Type:  String

183.        --  Descr: Text to render

184.        --

185.        --  Name:  Underline_Property

186.        --  Type:  Enum

187.        --  Descr: Style of underline for this text

188.        --

189.        --  Name:  Variant_Property

190.        --  Type:  Enum

191.        --  Descr: Font variant

192.        --

193.        --  Name:  Weight_Property

194.        --  Type:  Int

195.        --  Descr: Font weight

196.        --

197.        --  Name:  Width_Chars_Property

198.        --  Type:  Int

199.        --  Descr: The desired width of the label, in characters

200.        --

201.        --  Name:  Wrap_Mode_Property

202.        --  Type:  Enum

203.        --  Descr: How to break the string into multiple lines,

204.        --

205.        --  Name:  Wrap_Width_Property

206.        --  Type:  Int

207.        --  Descr: The width at which the text is wrapped

208.        --

209.        --  Name:  Alignment_Property

210.        --  Type:  Enum

211.        --  Descr: How to align the lines

212.        --

213.        --  </properties>

215.        --  Attributes_Property        : constant Glib.Properties.Property_Boxed;

216.        --  Alignment_Property : constant Glib.Properties.Property_Enum;

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

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

219.        Editable_Property              : constant Glib.Properties.Property_BooleanTo API docTo spec;

220.        --  Ellipsize_Property : constant Glib.Properties.Property_Enum;

221.        Family_Property                : constant Glib.Properties.Property_StringTo API docTo spec;

222.        Font_Property                  : constant Glib.Properties.Property_StringTo API docTo spec;

223.        --  Font_Desc_Property         : constant Glib.Properties.Property_Boxed;

224.        Foreground_Property            : constant Glib.Properties.Property_StringTo API docTo spec;

225.        Foreground_Gdk_Property        : constant Gdk.Color.Property_Gdk_ColorTo API docTo spec;

226.        Language_Property              : constant Glib.Properties.Property_StringTo API docTo spec;

227.        Markup_Property                : constant Glib.Properties.Property_StringTo API docTo spec;

228.        Rise_Property                  : constant Glib.Properties.Property_IntTo API docTo spec;

229.        Scale_Property                 : constant Glib.Properties.Property_DoubleTo API docTo spec;

230.        Single_Paragraph_Mode_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

231.        Size_Property                  : constant Glib.Properties.Property_IntTo API docTo spec;

232.        Size_Points_Property           : constant Glib.Properties.Property_DoubleTo API docTo spec;

233.        --  Stretch_Property               : constant Glib.Properties.Property_Enum;

234.        Strikethrough_Property         : constant Glib.Properties.Property_BooleanTo API docTo spec;

235.        --  Style_Property                 : constant Glib.Properties.Property_Enum;

236.        Text_Property                  : constant Glib.Properties.Property_StringTo API docTo spec;

237.        --  Underline_Property         : constant Glib.Properties.Property_Enum;

238.        --  Variant_Property           : constant Glib.Properties.Property_Enum;

239.        Weight_Property                : constant Glib.Properties.Property_IntTo API docTo spec;

240.        Width_Chars_Property           : constant Glib.Properties.Property_IntTo API docTo spec;

241.        Wrap_Mode_Property             : constant Pango.Enums.Property_Wrap_ModeTo API docTo spec;

242.        Wrap_Width_Property            : constant Glib.Properties.Property_IntTo API docTo spec;

244.        --   Attribute             Type in Model             Mode

245.        --   =========             =============             ====

246.        --

247.        --   "text"                UTF8_String               Read / Write

248.        --   "markup"              String                    Write

249.        --   "attributes"          PangoAttrList             Read / Write

250.        --   "background"          String                    Write

251.        --   "foreground"          String                    Write

252.        --   "background_gdk"      Gdk_Color                 Read / Write

253.        --   "foreground_gdk"      Gdk_Color                 Read / Write

254.        --   "font"                String                    Read / Write

255.        --   "font-desc"           Pango_Font_Description    Read / Write

256.        --   "family"              String                    Read / Write

257.        --   "style"               PangoStyle                Read / Write

258.        --   "variant"             PangoVariant              Read / Write

259.        --   "weight"              Gint                      Read / Write

260.        --   "stretch"             PangoStretch              Read / Write

261.        --   "size"                Gint                      Read / Write

262.        --   "size-points"         Gdouble                   Read / Write

263.        --   "scale"               Gdouble                   Read / Write

264.        --   "editable"            Boolean                   Read / Write

265.        --   "strikethrough"       Boolean                   Read / Write

266.        --   "underline"           PangoUnderline            Read / Write

267.        --   "rise"                Gint                      Read / Write

268.        --   "background-set"      Boolean                   Read / Write

269.        --   "foreground-set"      Boolean                   Read / Write

270.        --   "family-set"          Boolean                   Read / Write

271.        --   "style-set"           Boolean                   Read / Write

272.        --   "variant-set"         Boolean                   Read / Write

273.        --   "weight-set"          Boolean                   Read / Write

274.        --   "stretch-set"         Boolean                   Read / Write

275.        --   "size-set"            Boolean                   Read / Write

276.        --   "scale-set"           Boolean                   Read / Write

277.        --   "editable-set"        Boolean                   Read / Write

278.        --   "strikethrough-set"   Boolean                   Read / Write

279.        --   "underline-set"       Boolean                   Read / Write

280.        --   "rise-set"            Boolean                   Read / Write

282.     private

283.        type Gtk_Cell_Renderer_Text_RecordTo API docTo spec is

284.          new Gtk.Cell_Renderer.Gtk_Cell_Renderer_RecordTo API docTo specTo body with null record;

286.        --  Alignment_Property : constant Glib.Properties.Property_Enum :=

287.        --     Glib.Properties.Build ("alignment");

288.        --  Attributes_Property : constant Glib.Properties.Property_Boxed :=

289.        --     Glib.Properties.Build ("attributes");

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

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

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

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

294.        Editable_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

295.          Glib.Properties.BuildTo API docTo specTo body ("editable");

296.     --     Ellipsize_Property : constant Glib.Properties.Property_Enum :=

297.     --       Glib.Properties.Build ("ellipsize");

298.        Family_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

299.          Glib.Properties.BuildTo API docTo specTo body ("family");

300.        Font_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

301.          Glib.Properties.BuildTo API docTo specTo body ("font");

302.     --     Font_Desc_Property : constant Glib.Properties.Property_Boxed :=

303.     --       Glib.Properties.Build ("font-desc");

304.        Foreground_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

305.          Glib.Properties.BuildTo API docTo specTo body ("foreground");

306.        Foreground_Gdk_PropertyTo API docTo spec : constant Gdk.Color.Property_Gdk_ColorTo API docTo spec :=

307.          Gdk.Color.BuildTo API docTo specTo body ("foreground_gdk");

308.        Language_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

309.          Glib.Properties.BuildTo API docTo specTo body ("language");

310.        Markup_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

311.          Glib.Properties.BuildTo API docTo specTo body ("markup");

312.        Rise_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

313.          Glib.Properties.BuildTo API docTo specTo body ("rise");

314.        Scale_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

315.          Glib.Properties.BuildTo API docTo specTo body ("scale");

316.        Single_Paragraph_Mode_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec

317.          := Glib.Properties.BuildTo API docTo specTo body ("single-paragraph-mode");

318.        Size_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

319.          Glib.Properties.BuildTo API docTo specTo body ("size");

320.        Size_Points_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

321.          Glib.Properties.BuildTo API docTo specTo body ("size-points");

322.     --     Stretch_Property : constant Glib.Properties.Property_Enum :=

323.     --       Glib.Properties.Build ("stretch");

324.        Strikethrough_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

325.          Glib.Properties.BuildTo API docTo specTo body ("strikethrough");

326.     --     Style_Property : constant Glib.Properties.Property_Enum :=

327.     --       Glib.Properties.Build ("style");

328.        Text_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

329.          Glib.Properties.BuildTo API docTo specTo body ("text");

330.     --     Underline_Property : constant Glib.Properties.Property_Enum :=

331.     --       Glib.Properties.Build ("underline");

332.     --     Variant_Property : constant Glib.Properties.Property_Enum :=

333.     --       Glib.Properties.Build ("variant");

334.        Weight_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

335.          Glib.Properties.BuildTo API docTo specTo body ("weight");

336.        Width_Chars_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

337.          Glib.Properties.BuildTo API docTo specTo body ("width-chars");

338.        Wrap_Mode_PropertyTo API docTo spec : constant Pango.Enums.Property_Wrap_ModeTo API docTo spec :=

339.          Pango.Enums.Property_Wrap_ModeTo API docTo spec (Glib.BuildTo API docTo specTo body ("wrap-mode"));

340.        Wrap_Width_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

341.          Glib.Properties.BuildTo API docTo specTo body ("wrap-width");

343.        pragma Import (C, Get_TypeTo API docTo spec,  "gtk_cell_renderer_text_get_type");

344.     end Gtk.Cell_Renderer_TextTo API docTo specTo body;