## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

5.     --                Copyright (C) 2000-2011, AdaCore                   --

6.     --                                                                   --

7.     -- This library is free software; you can redistribute it and/or     --

8.     -- modify it under the terms of the GNU General Public               --

9.     -- License as published by the Free Software Foundation; either      --

10.     -- version 2 of the License, or (at your option) any later version.  --

11.     --                                                                   --

12.     -- This library is distributed in the hope that it will be useful,   --

13.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

14.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

15.     -- General Public License for more details.                          --

16.     --                                                                   --

17.     -- You should have received a copy of the GNU General Public         --

18.     -- License along with this library; if not, write to the             --

19.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

20.     -- Boston, MA 02111-1307, USA.                                       --

21.     --                                                                   --

22.     -- As a special exception, if other files instantiate generics from  --

23.     -- this unit, or you link this unit with other files to produce an   --

24.     -- executable, this  unit  does not  by itself cause  the resulting  --

25.     -- executable to be covered by the GNU General Public License. This  --

26.     -- exception does not however invalidate any other reasons why the   --

27.     -- executable file  might be covered by the  GNU Public License.     --

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --  A Gtk_Label is a light widget associated with some text you want to

32.     --  display on the screen. You can change the text dynamically if needed.

33.     --

34.     --  The text can be on multiple lines if you separate each line with the

35.     --  ASCII.LF character. However, this is not the recommended way to display

36.     --  long texts (see the Gtk_Text widget instead).

37.     --

38.     --  == Mnemonics ==

39.     --

40.     --  Labels may contain mnemonics. Mnemonics are underlined characters in the

41.     --  label, used for keyboard navigation. Mnemonics are created by providing

42.     --  string with an underscore before the mnemonic character, such as "_File",

43.     --  to the functions gtk_new_with_mnemonic or set_text_with_mnemonic().

44.     --

45.     --  Mnemonics automatically activate any activatable widget the label is

46.     --  inside, such as a Gtk_Button; if the label is not inside the mnemonic's

47.     --  target widget, you have to tell the label about the target using

48.     --  set_mnemonic_widget(). For instance: declare Button : Gtk_Button; Label :

49.     --  Gtk_Label; begin Gtk_New (Button); Gtk_New_With_Mnemonic (Label, "_File");

50.     --  Add (Button, Label); end; However, there exists a convenience function in

51.     --  Gtk.Button to create such a button already.

52.     --

53.     --  == Markup ==

54.     --

55.     --  To make it easy to format text in a label (changing colors, fonts, etc.),

56.     --  label text can be provided in a simple markup format. Here's how to create

57.     --  a label with a small font: Gtk_New (Label, "<small>hello</small>");

58.     --

59.     --  The markup must be valid, and <>& characters must be escaped with &lt;

60.     --  &gt; and &amp;

61.     --

62.     --  Markup strings are just a convenient way to set the Pango_Attr_List on

63.     --  label; Set_Attributes() may be a simpler way to set attributes in some

64.     --  cases. Be careful though; Pango_Attr_List tends to cause

65.     --  internationalization problems, unless you're applying attributes to the

66.     --  entire string (i.e. unless you set the range of each attribute to [0,

67.     --  G_MAXINT)). The reason is that specifying the start_index and end_index for

68.     --  a Pango_Attribute requires knowledge of the exact string being displayed,

69.     --  so translations will cause problems.

70.     --

71.     --  == Selectable labels ==

72.     --

73.     --  Labels can be made selectable with Set_Selectable. Selectable labels allow

74.     --  the user to copy the label contents to the clipboard. Only should be made

75.     --  selectable.

76.     --

77.     --  </description>

78.     --  <screenshot>gtk-label</screenshot>

79.     --  <group>Display widgets</group>

80.     --  <testgtk>create_label.adb</testgtk>

82.     pragma Warnings (Off, "*is already use-visible*");

83.     with GlibTo API docTo specTo body;             use GlibTo API docTo specTo body;

84.     with Glib.PropertiesTo API docTo specTo body;  use Glib.PropertiesTo API docTo specTo body;

85.     with Glib.TypesTo API docTo specTo body;       use Glib.TypesTo API docTo specTo body;

86.     with Gtk.BuildableTo API docTo specTo body;    use Gtk.BuildableTo API docTo specTo body;

87.     with Gtk.EnumsTo API docTo specTo body;        use Gtk.EnumsTo API docTo specTo body;

88.     with Gtk.MiscTo API docTo specTo body;         use Gtk.MiscTo API docTo specTo body;

89.     with Gtk.WidgetTo API docTo specTo body;       use Gtk.WidgetTo API docTo specTo body;

90.     with Pango.AttributesTo API docTo specTo body; use Pango.AttributesTo API docTo specTo body;

91.     with Pango.LayoutTo API docTo specTo body;     use Pango.LayoutTo API docTo specTo body;

93.     package Gtk.LabelTo API docTo specTo body is

95.        type Gtk_Label_Record is new Gtk_Misc_RecordTo API docTo spec with null record;

96.        type Gtk_Label is access all Gtk_Label_RecordTo API docTo spec'Class;

98.        ------------------

99.        -- Constructors --

100.        ------------------

102.        procedure Gtk_NewTo API docTo body (Label : out Gtk_LabelTo API docTo spec; Str : UTF8_StringTo API docTo spec := "");

103.        procedure InitializeTo API docTo body

104.           (Label : access Gtk_Label_RecordTo API docTo spec'Class;

105.            Str   : UTF8_StringTo API docTo spec := "");

106.        --  Creates a new label with the given text inside it. You can pass null to

107.        --  get an empty label widget.

108.        --  "str": The text of the label

110.        procedure Gtk_New_With_MnemonicTo API docTo body

111.           (Label : out Gtk_LabelTo API docTo spec;

112.            Str   : UTF8_StringTo API docTo spec);

113.        procedure Initialize_With_MnemonicTo API docTo body

114.           (Label : access Gtk_Label_RecordTo API docTo spec'Class;

115.            Str   : UTF8_StringTo API docTo spec);

116.        --  Creates a new Gtk.Label.Gtk_Label, containing the text in Str. If

117.        --  characters in Str are preceded by an underscore, they are underlined. If

118.        --  you need a literal underscore character in a label, use '__' (two

119.        --  underscores). The first underlined character represents a keyboard

120.        --  accelerator called a mnemonic. The mnemonic key can be used to activate

121.        --  another widget, chosen automatically, or explicitly using

122.        --  Gtk.Label.Set_Mnemonic_Widget. If Gtk.Label.Set_Mnemonic_Widget is not

123.        --  called, then the first activatable ancestor of the Gtk.Label.Gtk_Label

124.        --  will be chosen as the mnemonic widget. For instance, if the label is

125.        --  inside a button or menu item, the button or menu item will automatically

126.        --  become the mnemonic widget and be activated by the mnemonic.

127.        --  "str": The text of the label, with an underscore in front of the

128.        --  mnemonic character

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

131.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_label_get_type");

133.        -------------

134.        -- Methods --

135.        -------------

137.        function Get_AngleTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec) return GdoubleTo API docTo spec;

138.        procedure Set_AngleTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec; Angle : GdoubleTo API docTo spec);

139.        --  Sets the angle of rotation for the label. An angle of 90 reads from

140.        --  from bottom to top, an angle of 270, from top to bottom. The angle

141.        --  setting for the label is ignored if the label is selectable, wrapped, or

142.        --  ellipsized.

143.        --  Since: gtk+ 2.6

144.        --  "angle": the angle that the baseline of the label makes with the

145.        --  horizontal, in degrees, measured counterclockwise

147.        function Get_AttributesTo API docTo body

148.           (Label : access Gtk_Label_RecordTo API docTo spec)

149.            return Pango.Attributes.Pango_Attr_ListTo API docTo spec;

150.        procedure Set_AttributesTo API docTo body

151.           (Label : access Gtk_Label_RecordTo API docTo spec;

152.            Attrs : out Pango.Attributes.Pango_Attr_ListTo API docTo spec);

153.        --  Sets a Pango.Attributes.Pango_Attr_List; the attributes in the list are

154.        --  applied to the label text.

155.        --  Note: The attributes set with this function will be applied and merged

156.        --  with any other attributes previously effected by way of the

157.        --  Gtk.Label.Gtk_Label:use-underline or Gtk.Label.Gtk_Label:use-markup

158.        --  properties. While it is not recommended to mix markup strings with

159.        --  manually set attributes, if you must; know that the attributes will be

160.        --  applied to the label after the markup string is parsed.

161.        --  "attrs": a Pango.Attributes.Pango_Attr_List

163.        function Get_Current_UriTo API docTo body

164.           (Label : access Gtk_Label_RecordTo API docTo spec) return UTF8_StringTo API docTo spec;

165.        --  Returns the URI for the currently active link in the label. The active

166.        --  link is the one under the mouse pointer or, in a selectable label, the

167.        --  link in which the text cursor is currently positioned. This function is

168.        --  intended for use in a Gtk.Label.Gtk_Label::activate-link handler or for

169.        --  use in a Gtk.Widget.Gtk_Widget::query-tooltip handler. not be freed or

170.        --  modified.

171.        --  Since: gtk+ 2.18

173.        function Get_EllipsizeTo API docTo body

174.           (Label : access Gtk_Label_RecordTo API docTo spec)

175.            return Pango.Layout.Pango_Ellipsize_ModeTo API docTo spec;

176.        procedure Set_EllipsizeTo API docTo body

177.           (Label : access Gtk_Label_RecordTo API docTo spec;

178.            ModeTo API docTo body  : Pango.Layout.Pango_Ellipsize_ModeTo API docTo spec);

179.        --  if there is not enough space to render the entire string.

180.        --  Since: gtk+ 2.6

181.        --  "mode": a Pango.Layout.Pango_Ellipsize_Mode

183.        function Get_JustifyTo API docTo body

184.           (Label : access Gtk_Label_RecordTo API docTo spec) return Gtk.Enums.Gtk_JustificationTo API docTo spec;

185.        procedure Set_JustifyTo API docTo body

186.           (Label : access Gtk_Label_RecordTo API docTo spec;

187.            JtypeTo API docTo body : Gtk.Enums.Gtk_JustificationTo API docTo spec);

188.        --  Sets the alignment of the lines in the text of the label relative to

189.        --  each other. %GTK_JUSTIFY_LEFT is the default value when the widget is

190.        --  first created with Gtk.Label.Gtk_New. If you instead want to set the

191.        --  alignment of the label as a whole, use Gtk.Misc.Set_Alignment instead.

192.        --  Gtk.Label.Set_Justify has no effect on labels containing only a single

193.        --  line.

194.        --  "jtype": a Gtk.Enums.Gtk_Justification

196.        function Get_LabelTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec) return UTF8_StringTo API docTo spec;

197.        procedure Set_LabelTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec; Str : UTF8_StringTo API docTo spec);

198.        --  Sets the text of the label. The label is interpreted as including

199.        --  embedded underlines and/or Pango markup depending on the values of the

200.        --  Gtk.Label.Gtk_Label:use-underline" and Gtk.Label.Gtk_Label:use-markup

201.        --  properties.

202.        --  "str": the new text to set for the label

204.        function Get_LayoutTo API docTo body

205.           (Label : access Gtk_Label_RecordTo API docTo spec) return Pango.Layout.Pango_LayoutTo API docTo spec;

206.        --  Gets the Pango.Layout.Pango_Layout used to display the label. The

207.        --  layout is useful to e.g. convert text positions to pixel positions, in

208.        --  combination with Gtk.Label.Get_Layout_Offsets. The returned layout is

209.        --  owned by the label so need not be freed by the caller.

211.        procedure Get_Layout_OffsetsTo API docTo body

212.           (Label : access Gtk_Label_RecordTo API docTo spec;

213.            X     : out GintTo API docTo spec;

214.            Y     : out GintTo API docTo spec);

215.        --  Obtains the coordinates where the label will draw the

216.        --  Pango.Layout.Pango_Layout representing the text in the label; useful to

217.        --  convert mouse events into coordinates inside the

218.        --  Pango.Layout.Pango_Layout, e.g. to take some action if some part of the

219.        --  label is clicked. Of course you will need to create a

220.        --  Gtk.Event_Box.Gtk_Event_Box to receive the events, and pack the label

221.        --  inside it, since labels are a GTK_NO_WINDOW widget. Remember when using

222.        --  the Pango.Layout.Pango_Layout functions you need to convert to and from

223.        --  pixels using PANGO_PIXELS or PANGO_SCALE.

224.        --  "x": location to store X offset of layout, or null

225.        --  "y": location to store Y offset of layout, or null

227.        function Get_Line_WrapTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec) return Boolean;

228.        procedure Set_Line_WrapTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec; Wrap : Boolean);

229.        --  Toggles line wrapping within the Gtk.Label.Gtk_Label widget. True makes

230.        --  it break lines if text exceeds the widget's size. False lets the text

231.        --  get cut off by the edge of the widget if it exceeds the widget size.

232.        --  Note that setting line wrapping to True does not make the label wrap at

233.        --  its parent container's width, because GTK+ widgets conceptually can't

234.        --  make their requisition depend on the parent container's size. For a

235.        --  label that wraps at a specific position, set the label's width using

236.        --  Gtk.Widget.Set_Size_Request.

237.        --  "wrap": the setting

239.        function Get_Line_Wrap_ModeTo API docTo body

240.           (Label : access Gtk_Label_RecordTo API docTo spec) return Pango.Layout.Pango_Wrap_ModeTo API docTo spec;

241.        procedure Set_Line_Wrap_ModeTo API docTo body

242.           (Label     : access Gtk_Label_RecordTo API docTo spec;

243.            Wrap_ModeTo API docTo body : Pango.Layout.Pango_Wrap_ModeTo API docTo spec);

244.        --  If line wrapping is on (see Gtk.Label.Set_Line_Wrap) this controls how

245.        --  the line wrapping is done. The default is %PANGO_WRAP_WORD which means

246.        --  wrap on word boundaries.

247.        --  Since: gtk+ 2.10

248.        --  "wrap_mode": the line wrapping mode

250.        function Get_Max_Width_CharsTo API docTo body

251.           (Label : access Gtk_Label_RecordTo API docTo spec) return GintTo API docTo spec;

252.        procedure Set_Max_Width_CharsTo API docTo body

253.           (Label   : access Gtk_Label_RecordTo API docTo spec;

254.            N_Chars : GintTo API docTo spec);

255.        --  Sets the desired maximum width in characters of Label to N_Chars.

256.        --  Since: gtk+ 2.6

257.        --  "n_chars": the new desired maximum width, in characters.

259.        function Get_Mnemonic_KeyvalTo API docTo body

260.           (Label : access Gtk_Label_RecordTo API docTo spec) return GuintTo API docTo spec;

261.        --  If the label has been set so that it has an mnemonic key this function

262.        --  returns the keyval used for the mnemonic accelerator. If there is no

263.        --  mnemonic set up it returns GDK_VoidSymbol.

265.        function Get_Mnemonic_WidgetTo API docTo body

266.           (Label : access Gtk_Label_RecordTo API docTo spec) return Gtk.Widget.Gtk_WidgetTo API docTo spec;

267.        procedure Set_Mnemonic_WidgetTo API docTo body

268.           (Label  : access Gtk_Label_RecordTo API docTo spec;

269.            Widget : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

270.        --  If the label has been set so that it has an mnemonic key (using i.e.

271.        --  Gtk.Label.Set_Markup_With_Mnemonic, Gtk.Label.Set_Text_With_Mnemonic,

272.        --  Gtk.Label.Gtk_New_With_Mnemonic or the "use_underline" property) the

273.        --  label can be associated with a widget that is the target of the

274.        --  mnemonic. When the label is inside a widget (like a

275.        --  Gtk.Button.Gtk_Button or a Gtk.Notebook.Gtk_Notebook tab) it is

276.        --  automatically associated with the correct widget, but sometimes (i.e.

277.        --  when the target is a Gtk.GEntry.Gtk_Entry next to the label) you need to

278.        --  set it explicitly using this function. The target widget will be

279.        --  accelerated by emitting the GtkWidget::mnemonic-activate signal on it.

280.        --  The default handler for this signal will activate the widget if there

281.        --  are no mnemonic collisions and toggle focus between the colliding

282.        --  widgets otherwise.

283.        --  "widget": the target Gtk.Widget.Gtk_Widget

285.        function Get_SelectableTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec) return Boolean;

286.        procedure Set_SelectableTo API docTo body

287.           (Label   : access Gtk_Label_RecordTo API docTo spec;

288.            Setting : Boolean);

289.        --  Selectable labels allow the user to select text from the label, for

290.        --  copy-and-paste.

291.        --  "setting": True to allow selecting text in the label

293.        procedure Get_Selection_BoundsTo API docTo body

294.           (Label         : access Gtk_Label_RecordTo API docTo spec;

295.            Start         : out GintTo API docTo spec;

296.            The_End       : out GintTo API docTo spec;

297.            Has_Selection : out Boolean);

298.        --  Gets the selected range of characters in the label, returning True if

299.        --  there's a selection.

300.        --  "start": return location for start of selection, as a character offset

301.        --  "end": return location for end of selection, as a character offset

303.        function Get_Single_Line_ModeTo API docTo body

304.           (Label : access Gtk_Label_RecordTo API docTo spec) return Boolean;

305.        procedure Set_Single_Line_ModeTo API docTo body

306.           (Label            : access Gtk_Label_RecordTo API docTo spec;

307.            Single_Line_Mode : Boolean);

308.        --  Sets whether the label is in single line mode.

309.        --  Since: gtk+ 2.6

310.        --  "single_line_mode": True if the label should be in single line mode

312.        function Get_TextTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec) return UTF8_StringTo API docTo spec;

313.        procedure Set_TextTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec; Str : UTF8_StringTo API docTo spec);

314.        --  Sets the text within the Gtk.Label.Gtk_Label widget. It overwrites any

315.        --  text that was there before. This will also clear any previously set

316.        --  mnemonic accelerators.

317.        --  "str": The text you want to set

319.        function Get_Track_Visited_LinksTo API docTo body

320.           (Label : access Gtk_Label_RecordTo API docTo spec) return Boolean;

321.        procedure Set_Track_Visited_LinksTo API docTo body

322.           (Label       : access Gtk_Label_RecordTo API docTo spec;

323.            Track_Links : Boolean);

324.        --  Sets whether the label should keep track of clicked links (and use a

325.        --  different color for them).

326.        --  Since: gtk+ 2.18

327.        --  "track_links": True to track visited links

329.        function Get_Use_MarkupTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec) return Boolean;

330.        procedure Set_Use_MarkupTo API docTo body

331.           (Label   : access Gtk_Label_RecordTo API docTo spec;

332.            Setting : Boolean);

333.        --  Sets whether the text of the label contains markup in <link

334.        --  linkend="PangoMarkupFormat">Pango's text markup language</link>. See

335.        --  Gtk.Label.Set_Markup.

336.        --  "setting": True if the label's text should be parsed for markup.

338.        function Get_Use_UnderlineTo API docTo body

339.           (Label : access Gtk_Label_RecordTo API docTo spec) return Boolean;

340.        procedure Set_Use_UnderlineTo API docTo body

341.           (Label   : access Gtk_Label_RecordTo API docTo spec;

342.            Setting : Boolean);

343.        --  If true, an underline in the text indicates the next character should

344.        --  be used for the mnemonic accelerator key.

345.        --  "setting": True if underlines in the text indicate mnemonics

347.        function Get_Width_CharsTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec) return GintTo API docTo spec;

348.        procedure Set_Width_CharsTo API docTo body

349.           (Label   : access Gtk_Label_RecordTo API docTo spec;

350.            N_Chars : GintTo API docTo spec);

351.        --  Sets the desired width in characters of Label to N_Chars.

352.        --  Since: gtk+ 2.6

353.        --  "n_chars": the new desired width, in characters.

355.        function Parse_UlineTo API docTo body

356.           (Label  : access Gtk_Label_RecordTo API docTo spec;

357.            String : UTF8_StringTo API docTo spec) return GuintTo API docTo spec;

359.        procedure Select_RegionTo API docTo body

360.           (Label        : access Gtk_Label_RecordTo API docTo spec;

361.            Start_Offset : GintTo API docTo spec := -1;

362.            End_Offset   : GintTo API docTo spec := -1);

363.        --  Selects a range of characters in the label, if the label is selectable.

364.        --  See Gtk.Label.Set_Selectable. If the label is not selectable, this

365.        --  function has no effect. If Start_Offset or

366.        --  "start_offset": start offset (in characters not bytes)

367.        --  "end_offset": end offset (in characters not bytes)

369.        procedure Set_MarkupTo API docTo body (Label : access Gtk_Label_RecordTo API docTo spec; Str : UTF8_StringTo API docTo spec);

370.        --  Parses Str which is marked up with the <link

371.        --  linkend="PangoMarkupFormat">Pango text markup language</link>, setting

372.        --  the label's text and attribute list based on the parse results. If the

373.        --  Str is external data, you may need to escape it with

374.        --  g_markup_escape_text or g_markup_printf_escaped<!-- -->: |[ char

375.        --  *markup; markup = g_markup_printf_escaped ("&lt;span

376.        --  style=\"italic\"&gt;&percnt;s&lt;/span&gt;", str); gtk_label_set_markup

377.        --  (GTK_LABEL (label), markup); g_free (markup); ]|

378.        --  "str": a markup string (see <link linkend="PangoMarkupFormat">Pango

379.        --  markup format</link>)

381.        procedure Set_Markup_With_MnemonicTo API docTo body

382.           (Label : access Gtk_Label_RecordTo API docTo spec;

383.            Str   : UTF8_StringTo API docTo spec);

384.        --  Parses Str which is marked up with the <link

385.        --  linkend="PangoMarkupFormat">Pango text markup language</link>, setting

386.        --  the label's text and attribute list based on the parse results. If

387.        --  characters in Str are preceded by an underscore, they are underlined

388.        --  indicating that they represent a keyboard accelerator called a mnemonic.

389.        --  The mnemonic key can be used to activate another widget, chosen

390.        --  automatically, or explicitly using Gtk.Label.Set_Mnemonic_Widget.

391.        --  "str": a markup string (see <link linkend="PangoMarkupFormat">Pango

392.        --  markup format</link>)

394.        procedure Set_PatternTo API docTo body

395.           (Label   : access Gtk_Label_RecordTo API docTo spec;

396.            Pattern : UTF8_StringTo API docTo spec);

397.        --  Change the underlines pattern.

398.        --  Pattern is a simple string made of underscore and space characters,

399.        --  matching the ones in the string. GtkAda will underline every letter that

400.        --  matches an underscore.

401.        --  An empty string disables the underlines.

402.        --  example: If the text is FooBarBaz and the Pattern is "___ ___" then

403.        --  both "Foo" and "Baz" will be underlined, but not "Bar".

405.        procedure Set_Text_With_MnemonicTo API docTo body

406.           (Label : access Gtk_Label_RecordTo API docTo spec;

407.            Str   : UTF8_StringTo API docTo spec);

408.        --  Sets the label's text from the string Str. If characters in Str are

409.        --  preceded by an underscore, they are underlined indicating that they

410.        --  represent a keyboard accelerator called a mnemonic. The mnemonic key can

411.        --  be used to activate another widget, chosen automatically, or explicitly

412.        --  using Gtk.Label.Set_Mnemonic_Widget.

413.        --  "str": a string

415.        ----------------

416.        -- Interfaces --

417.        ----------------

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

419.        --

420.        --  - "Buildable"

422.        package Implements_Buildable is new Glib.Types.ImplementsTo API docTo specTo body

423.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Label_RecordTo API docTo spec, Gtk_LabelTo API docTo spec);

424.        function "+"

425.          (Widget : access Gtk_Label_RecordTo API docTo spec'Class)

426.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

427.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

428.        function "-"

429.          (Interf : Gtk.Buildable.Gtk_BuildableTo API docTo spec)

430.        return Gtk_LabelTo API docTo spec

431.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

433.        ----------------

434.        -- Properties --

435.        ----------------

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

437.        --  Glib.Properties for more information on properties)

438.        --

439.        --  Name: Angle_Property

440.        --  Type: Gdouble

441.        --  Flags: read-write

442.        --  The angle that the baseline of the label makes with the horizontal, in

443.        --  degrees, measured counterclockwise. An angle of 90 reads from from

444.        --  bottom to top, an angle of 270, from top to bottom. Ignored if the label

445.        --  is selectable, wrapped, or ellipsized.

446.        --

447.        --  Name: Cursor_Position_Property

448.        --  Type: Gint

449.        --  Flags: read-write

450.        --

451.        --  Name: Justify_Property

452.        --  Type: Gtk.Enums.Gtk_Justification

453.        --  Flags: read-write

454.        --

455.        --  Name: Label_Property

456.        --  Type: UTF8_String

457.        --  Flags: read-write

458.        --

459.        --  Name: Max_Width_Chars_Property

460.        --  Type: Gint

461.        --  Flags: read-write

462.        --  The desired maximum width of the label, in characters. If this property

463.        --  is set to -1, the width will be calculated automatically, otherwise the

464.        --  label will request space for no more than the requested number of

465.        --  characters. If the Gtk.Label.Gtk_Label:width-chars property is set to a

466.        --  positive value, then the "max-width-chars" property is ignored.

467.        --

468.        --  Name: Mnemonic_Keyval_Property

469.        --  Type: Guint

470.        --  Flags: read-write

471.        --

472.        --  Name: Mnemonic_Widget_Property

473.        --  Type: Gtk.Widget.Gtk_Widget

474.        --  Flags: read-write

475.        --

476.        --  Name: Pattern_Property

477.        --  Type: UTF8_String

478.        --  Flags: write

479.        --

480.        --  Name: Selectable_Property

481.        --  Type: Boolean

482.        --  Flags: read-write

483.        --

484.        --  Name: Selection_Bound_Property

485.        --  Type: Gint

486.        --  Flags: read-write

487.        --

488.        --  Name: Single_Line_Mode_Property

489.        --  Type: Boolean

490.        --  Flags: read-write

491.        --  Whether the label is in single line mode. In single line mode, the

492.        --  height of the label does not depend on the actual text, it is always set

493.        --  to ascent + descent of the font. This can be an advantage in situations

494.        --  where resizing the label because of text changes would be distracting,

495.        --  e.g. in a statusbar.

496.        --

497.        --  Name: Track_Visited_Links_Property

498.        --  Type: Boolean

499.        --  Flags: read-write

500.        --  Set this property to True to make the label track which links have been

501.        --  clicked. It will then apply the ::visited-link-color color, instead of

502.        --  ::link-color.

503.        --

504.        --  Name: Use_Markup_Property

505.        --  Type: Boolean

506.        --  Flags: read-write

507.        --

508.        --  Name: Use_Underline_Property

509.        --  Type: Boolean

510.        --  Flags: read-write

511.        --

512.        --  Name: Width_Chars_Property

513.        --  Type: Gint

514.        --  Flags: read-write

515.        --  The desired width of the label, in characters. If this property is set

516.        --  to -1, the width will be calculated automatically, otherwise the label

517.        --  will request either 3 characters or the property value, whichever is

518.        --  greater. If the "width-chars" property is set to a positive value, then

519.        --  the Gtk.Label.Gtk_Label:max-width-chars property is ignored.

520.        --

521.        --  Name: Wrap_Property

522.        --  Type: Boolean

523.        --  Flags: read-write

525.        Angle_Property : constant Glib.Properties.Property_DoubleTo API docTo spec;

526.        Cursor_Position_Property : constant Glib.Properties.Property_IntTo API docTo spec;

527.        Justify_Property : constant Gtk.Enums.Property_Gtk_JustificationTo API docTo spec;

528.        Label_Property : constant Glib.Properties.Property_StringTo API docTo spec;

529.        Max_Width_Chars_Property : constant Glib.Properties.Property_IntTo API docTo spec;

530.        Mnemonic_Keyval_Property : constant Glib.Properties.Property_UintTo API docTo spec;

531.        Mnemonic_Widget_Property : constant Glib.Properties.Property_ObjectTo API docTo spec;

532.        Pattern_Property : constant Glib.Properties.Property_StringTo API docTo spec;

533.        Selectable_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

534.        Selection_Bound_Property : constant Glib.Properties.Property_IntTo API docTo spec;

535.        Single_Line_Mode_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

536.        Track_Visited_Links_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

537.        Use_Markup_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

538.        Use_Underline_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

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

540.        Wrap_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

542.        -------------

543.        -- Signals --

544.        -------------

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

546.        --

547.        --  "activate-current-link"

548.        --     procedure Handler (Self : access Gtk_Label_Record'Class);

549.        --  A <link linkend="keybinding-signals">keybinding signal</link> which

550.        --  gets emitted when the user activates a link in the label. Applications

551.        --  may also emit the signal with g_signal_emit_by_name if they need to

552.        --  control activation of URIs programmatically. The default bindings for

553.        --  this signal are all forms of the Enter key.

554.        --

555.        --  "activate-link"

556.        --     function Handler

557.        --       (Self : access Gtk_Label_Record'Class;

558.        --        Uri  : UTF8_String) return Boolean;

559.        --    --  "uri": the URI that is activated

560.        --  The signal which gets emitted to activate a URI. Applications may

561.        --  connect to it to override the default behaviour, which is to call

562.        --  gtk_show_uri().

563.        --  Returns True if the link has been activated

564.        --

565.        --  "copy-clipboard"

566.        --     procedure Handler (Self : access Gtk_Label_Record'Class);

567.        --  The ::copy-clipboard signal is a <link

568.        --  linkend="keybinding-signals">keybinding signal</link> which gets emitted

569.        --  to copy the selection to the clipboard. The default binding for this

570.        --  signal is Ctrl-c.

571.        --

572.        --  "move-cursor"

573.        --     procedure Handler

574.        --       (Self             : access Gtk_Label_Record'Class;

575.        --        Step             : MovementStep;

576.        --        Count            : Gint;

577.        --        Extend_Selection : Boolean);

578.        --    --  "step": the granularity of the move, as a GtkMovementStep

579.        --    --  "count": the number of Step units to move

580.        --    --  "extend_selection": True if the move should extend the selection

581.        --  The ::move-cursor signal is a <link

582.        --  linkend="keybinding-signals">keybinding signal</link> which gets emitted

583.        --  when the user initiates a cursor movement. If the cursor is not visible

584.        --  in Entry, this signal causes the viewport to be moved instead.

585.        --  Applications should not connect to it, but may emit it with

586.        --  g_signal_emit_by_name if they need to control the cursor

587.        --  programmatically. The default bindings for this signal come in two

588.        --  variants, the variant with the Shift modifier extends the selection, the

589.        --  variant without the Shift modifer does not. There are too many key

590.        --  combinations to list them all here. <itemizedlist> <listitem>Arrow keys

591.        --  move by individual characters/lines</listitem> <listitem>Ctrl-arrow key

592.        --  combinations move by words/paragraphs</listitem> <listitem>Home/End keys

593.        --  move to the ends of the buffer</listitem> </itemizedlist>

594.        --

595.        --  "populate-popup"

596.        --     procedure Handler

597.        --       (Self : access Gtk_Label_Record'Class;

598.        --        Menu : Gtk.Menu.Gtk_Menu);

599.        --    --  "menu": the menu that is being populated

600.        --  The ::populate-popup signal gets emitted before showing the context

601.        --  menu of the label. Note that only selectable labels have context menus.

602.        --  If you need to add items to the context menu, connect to this signal and

603.        --  append your menuitems to the Menu.

605.        Signal_Activate_Current_Link : constant Glib.Signal_NameTo API docTo spec := "activate-current-link";

606.        Signal_Activate_Link : constant Glib.Signal_NameTo API docTo spec := "activate-link";

607.        Signal_Copy_Clipboard : constant Glib.Signal_NameTo API docTo spec := "copy-clipboard";

608.        Signal_Move_Cursor : constant Glib.Signal_NameTo API docTo spec := "move-cursor";

609.        Signal_Populate_Popup : constant Glib.Signal_NameTo API docTo spec := "populate-popup";

611.     private

612.        Angle_PropertyTo API docTo spec : constant Glib.Properties.Property_DoubleTo API docTo spec :=

613.          Glib.Properties.BuildTo API docTo specTo body ("angle");

614.        Cursor_Position_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

615.          Glib.Properties.BuildTo API docTo specTo body ("cursor-position");

616.        Justify_PropertyTo API docTo spec : constant Gtk.Enums.Property_Gtk_JustificationTo API docTo spec :=

617.          Gtk.Enums.BuildTo API docTo specTo body ("justify");

618.        Label_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

619.          Glib.Properties.BuildTo API docTo specTo body ("label");

620.        Max_Width_Chars_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

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

622.        Mnemonic_Keyval_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

623.          Glib.Properties.BuildTo API docTo specTo body ("mnemonic-keyval");

624.        Mnemonic_Widget_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

625.          Glib.Properties.BuildTo API docTo specTo body ("mnemonic-widget");

626.        Pattern_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

627.          Glib.Properties.BuildTo API docTo specTo body ("pattern");

628.        Selectable_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

629.          Glib.Properties.BuildTo API docTo specTo body ("selectable");

630.        Selection_Bound_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

631.          Glib.Properties.BuildTo API docTo specTo body ("selection-bound");

632.        Single_Line_Mode_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

633.          Glib.Properties.BuildTo API docTo specTo body ("single-line-mode");

634.        Track_Visited_Links_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

635.          Glib.Properties.BuildTo API docTo specTo body ("track-visited-links");

636.        Use_Markup_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

637.          Glib.Properties.BuildTo API docTo specTo body ("use-markup");

638.        Use_Underline_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

639.          Glib.Properties.BuildTo API docTo specTo body ("use-underline");

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

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

642.        Wrap_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

643.          Glib.Properties.BuildTo API docTo specTo body ("wrap");

644.     end Gtk.LabelTo API docTo specTo body;