## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

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

5.     --                Copyright (C) 2000-2007 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.     --  This widget is an abstract widget designed to support the common

32.     --  functionalities of all widgets for editing text. It provides general

33.     --  services to manipulate an editable widget, a large number of action

34.     --  signals used for key bindings, and several signals that an

35.     --  application can connect to to modify the behavior of a widget.

36.     --  </description>

37.     --  <c_version>2.8.17</c_version>

38.     --  <group>Obsolescent widgets</group>

40.     with Gtk.WidgetTo API docTo specTo body;

42.     package Gtk.Old_EditableTo API docTo specTo body is

43.        pragma Obsolescent;

45.        type Gtk_Old_Editable_RecordTo API docTo body is new

46.          Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body with private;

47.        type Gtk_Old_Editable is access all Gtk_Old_Editable_RecordTo API docTo specTo body'Class;

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

50.        --  Return the internal value associated with a Gtk_Old_Editable.

52.        procedure ChangedTo API docTo body (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body);

53.        --  Cause the "changed" signal to be emitted.

55.        procedure Claim_SelectionTo API docTo body

56.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body;

57.           Claim    : in Boolean := True;

58.           Time     : in Guint32To API docTo spec);

59.        --  If Claim is set to True, claim the ownership of the primary X selection.

60.        --  Otherwise, release it. "Time" should be set to the

61.        --  time of the last-change time for the specified selection. It is

62.        --  discarded if it is earlier than the current last-change time, or

63.        --  later than the current X server time.

65.        procedure Copy_ClipboardTo API docTo body

66.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body;

67.           Time     : in Guint32To API docTo spec);

68.        --  Copy the characters in the current selection to the clipboard.

70.        procedure Cut_ClipboardTo API docTo body

71.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body;

72.           Time     : Guint32To API docTo spec);

73.        --  Copy the characters in the current selection to the clipboard.

74.        --  The selection is then deleted.

76.        procedure Delete_SelectionTo API docTo body (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body);

77.        --  Disclaim and delete the current selection.

79.        procedure Delete_TextTo API docTo body

80.          (Editable  : access Gtk_Old_Editable_RecordTo API docTo specTo body;

81.           Start_Pos : GintTo API docTo spec := 0;

82.           End_Pos   : GintTo API docTo spec := -1);

83.        --  Delete the characters from Start_Pos to End_Pos.

84.        --  If End_Pos is negative, the characters are deleted from Start_Pos to the

85.        --  end of the text.

87.        function Get_CharsTo API docTo body

88.          (Editable  : access Gtk_Old_Editable_RecordTo API docTo specTo body;

89.           Start_Pos : GintTo API docTo spec := 0;

90.           End_Pos   : GintTo API docTo spec := -1) return UTF8_StringTo API docTo spec;

91.        --  Get the text from Start_Pos to End_Pos.

92.        --  If End_Pos is negative, the text from Start_Pos to the end is returned.

94.        function Get_Clipboard_TextTo API docTo body

95.          (Widget : access Gtk_Old_Editable_RecordTo API docTo specTo body) return UTF8_StringTo API docTo spec;

96.        --  Return the last text copied from the clipboard.

98.        function Get_EditableTo API docTo body

99.          (Widget : access Gtk_Old_Editable_RecordTo API docTo specTo body) return Boolean;

100.        --  Return True if the widget is editable by the user.

102.        procedure Set_EditableTo API docTo body

103.          (Widget   : access Gtk_Old_Editable_RecordTo API docTo specTo body;

104.           Editable : Boolean := True);

105.        --  Set the editable status of the entry.

106.        --  If Editable is False, the user can not modify the contents of the entry.

107.        --  This does not affect the user of the insertion functions above.

109.        function Get_Has_SelectionTo API docTo body

110.          (Widget : access Gtk_Old_Editable_RecordTo API docTo specTo body) return Boolean;

111.        --  Return True if the selection is owned by the widget.

113.        function Get_Selection_End_PosTo API docTo body

114.          (Widget : access Gtk_Old_Editable_RecordTo API docTo specTo body) return GuintTo API docTo spec;

115.        --  Return the position of the end of the current selection.

117.        function Get_Selection_Start_PosTo API docTo body

118.          (Widget : access Gtk_Old_Editable_RecordTo API docTo specTo body) return GuintTo API docTo spec;

119.        --  Return the position of the beginning of the current selection.

121.        procedure Insert_TextTo API docTo body

122.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body;

123.           New_Text : UTF8_StringTo API docTo spec;

124.           Position : in out GintTo API docTo spec);

125.        --  Insert the given string at the given position.

126.        --  Position is set to the new cursor position.

128.        procedure Paste_ClipboardTo API docTo body

129.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body;

130.           Time     : Guint32To API docTo spec);

131.        --  The contents of the clipboard is pasted into the given widget at

132.        --  the current cursor position.

134.        procedure Select_RegionTo API docTo body

135.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body;

136.           Start    : GintTo API docTo spec;

137.           The_End  : GintTo API docTo spec := -1);

138.        --  Select the region of text from Start to The_End.

139.        --  The characters that are selected are those characters at positions

140.        --  from Start up to, but not including The_End. If The_End_Pos is

141.        --  negative, then the characters selected will be those characters

142.        --  from Start to the end of the text.

144.        procedure Set_PositionTo API docTo body

145.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body;

146.           Position : GintTo API docTo spec);

147.        --  Change the position of the cursor in the entry.

148.        --  The cursor is displayed before the character with the given

149.        --  index in the widget (the first character has index 0). The

150.        --  value must be less than or equal to the number of characters in the

151.        --  widget. A value of -1 indicates that the position

152.        --  should be set after the last character in the entry.

153.        --  Note that this position is in characters, not in bytes.

155.        function Get_PositionTo API docTo body

156.          (Editable : access Gtk_Old_Editable_RecordTo API docTo specTo body) return GintTo API docTo spec;

157.        --  Return the position of the cursor.

159.        ---------------

160.        --  Signals  --

161.        ---------------

163.        --  <signals>

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

165.        --

166.        --  - "changed"

167.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class);

168.        --

169.        --    emitted when the user has changed the text of the widget.

170.        --

171.        --  - "insert_text"

172.        --    procedure Handler (Widget   : access Gtk_Old_Editable_Record'Class;

173.        --                       Text     : in UTF8_String;

174.        --                       Length   : in Gint;

175.        --                       Position : in Gint_Access);

176.        --

177.        --    Emitted when some text is inserted inside the widget by the

178.        --    user. The default handler inserts the text into the widget.

179.        --    By connecting a handler to this signal, and then by stopping

180.        --    the signal with Gtk.Handlers.Emit_Stop_By_Name, it is possible

181.        --    to modify the inserted text, or even prevent it from being

182.        --    inserted.

183.        --    Position.all should be modified by the callback, and indicates

184.        --    the new position of the cursor after the text has been inserted.

185.        --

186.        --  - "delete_text"

187.        --    procedure Handler (Widget    : access Gtk_Old_Editable_Record'Class;

188.        --                       Start_Pos : in Gint;

189.        --                       End_Pos   : in Gint);

190.        --

191.        --    Emitted when some text is deleted by the user. As for the

192.        --    "insert-text" handler, it is possible to override the default

193.        --    behavior by connecting a handler to this signal, and then

194.        --    stopping the signal.

195.        --

196.        --  - "activate"

197.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class);

198.        --

199.        --    Emitted when the user has activated the widget in some fashion.

200.        --

201.        --  - "set-editable"

202.        --    procedure Handler (Widget     : access Gtk_Old_Editable_Record'Class;

203.        --                       Is_Editable: in Boolean);

204.        --

205.        --    Emitting this signal is equivalent to calling Set_Old_Editable.

206.        --

207.        --  - "move_cursor"

208.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class;

209.        --                       X, Y   : in Gint);

210.        --

211.        --    Emitting this signal will move the cursor position for X

212.        --    characters horizontally, and Y characters vertically.

213.        --

214.        --  - "move_word"

215.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class;

216.        --                       N      : in Gint);

217.        --

218.        --    Emitting this signal will move the cursor by N words (N can be

219.        --    negative).

220.        --

221.        --  - "move_page"

222.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class;

223.        --                       X, Y   : in Gint);

224.        --

225.        --    Emitting this signal will move the cursor for X pages

226.        --    horizontally, and Y pages vertically.

227.        --

228.        --  - "move_to_row"

229.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class;

230.        --                       Row    : in Gint);

231.        --

232.        --    Emitting this signal will move the cursor to the given row.

233.        --

234.        --  - "move_to_column"

235.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class;

236.        --                       Column : in Gint);

237.        --

238.        --    Emitting this signal will move the cursor to the given column.

239.        --

240.        --  - "kill_char"

241.        --    procedure Handler (Widget    : access Gtk_Old_Editable_Record'Class;

242.        --                       Direction : in Gint);

243.        --

244.        --    Emitting this signal deletes a single character. If Direction

245.        --    is positive, delete forward, else delete backward.

246.        --

247.        --  - "kill_word"

248.        --    procedure Handler (Widget    : access Gtk_Old_Editable_Record'Class;

249.        --                       Direction : in Gint);

250.        --

251.        --    Emitting this signal deletes a single word. If Direction is

252.        --    positive, delete forward, otherwise delete backward.

253.        --

254.        --  - "kill_line"

255.        --    procedure Handler (Widget    : access Gtk_Old_Editable_Record'Class;

256.        --                       Direction : in Gint);

257.        --

258.        --    Emitting this signal deletes a single line. If Direction is

259.        --    positive, delete forward, otherwise delete backward.

260.        --

261.        --  - "cut_clipboard"

262.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class);

263.        --

264.        --    Emitting this signal will cut the current selection to the

265.        --    clipboard.

266.        --

267.        --  - "copy_clipboard"

268.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class);

269.        --

270.        --    Emitting this signal will copy the current selection to the

271.        --    clipboard.

272.        --

273.        --  - "paste_clipboard"

274.        --    procedure Handler (Widget : access Gtk_Old_Editable_Record'Class);

275.        --

276.        --    Emitting this signal will paste the clipboard into the text

277.        --    of the widget at the current cursor position.

278.        --

279.        --  </signals>

281.        Signal_Activate        : constant Glib.Signal_NameTo API docTo spec := "activate";

282.        Signal_Copy_Clipboard  : constant Glib.Signal_NameTo API docTo spec := "copy_clipboard";

283.        Signal_Cut_Clipboard   : constant Glib.Signal_NameTo API docTo spec := "cut_clipboard";

284.        Signal_Kill_Char       : constant Glib.Signal_NameTo API docTo spec := "kill_char";

285.        Signal_Kill_Line       : constant Glib.Signal_NameTo API docTo spec := "kill_line";

286.        Signal_Kill_Word       : constant Glib.Signal_NameTo API docTo spec := "kill_word";

287.        Signal_Move_Cursor     : constant Glib.Signal_NameTo API docTo spec := "move_cursor";

288.        Signal_Move_Page       : constant Glib.Signal_NameTo API docTo spec := "move_page";

289.        Signal_Move_To_Column  : constant Glib.Signal_NameTo API docTo spec := "move_to_column";

290.        Signal_Move_To_Row     : constant Glib.Signal_NameTo API docTo spec := "move_to_row";

291.        Signal_Move_Word       : constant Glib.Signal_NameTo API docTo spec := "move_word";

292.        Signal_Paste_Clipboard : constant Glib.Signal_NameTo API docTo spec := "paste_clipboard";

293.        Signal_Set_Editable    : constant Glib.Signal_NameTo API docTo spec := "set-editable";

295.     private

296.        type Gtk_Old_Editable_RecordTo API docTo spec is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body

297.          with null record;

298.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_old_editable_get_type");

299.     end Gtk.Old_EditableTo API docTo specTo body;