File: gtk-list.ads

package info (click to toggle)
libgtkada2 2.8.1-6lenny3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,496 kB
  • ctags: 3,886
  • sloc: ada: 103,189; ansic: 45,411; perl: 5,500; sh: 2,812; makefile: 1,169; xml: 19
file content (158 lines) | stat: -rw-r--r-- 5,500 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
-----------------------------------------------------------------------
--          GtkAda - Ada95 binding for the Gimp Toolkit              --
--                                                                   --
--                     Copyright (C) 1998-1999                       --
--        Emmanuel Briot, Joel Brobecker and Arnaud Charlet          --
--                     Copyright 2000-2006 AdaCore                   --
--                                                                   --
-- This library is free software; you can redistribute it and/or     --
-- modify it under the terms of the GNU General Public               --
-- License as published by the Free Software Foundation; either      --
-- version 2 of the License, or (at your option) any later version.  --
--                                                                   --
-- This library is distributed in the hope that it will be useful,   --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of    --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --
-- General Public License for more details.                          --
--                                                                   --
-- You should have received a copy of the GNU General Public         --
-- License along with this library; if not, write to the             --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --
-- Boston, MA 02111-1307, USA.                                       --
--                                                                   --
-----------------------------------------------------------------------

--  <c_version>2.8.17</c_version>
--  <doc_ignore>
--  <group>Obsolescent widgets</group>
--  <testgtk>create_list.adb</testgtk>

with Gtk.Container;
with Gtk.Enums;  use Gtk.Enums;
with Gtk.Widget; use Gtk.Widget;

package Gtk.List is
   pragma Obsolescent;  --  Gtk.List

   type Gtk_List_Record is new Gtk.Container.Gtk_Container_Record with private;
   type Gtk_List is access all Gtk_List_Record'Class;

   function Get_Type return Gtk.Gtk_Type;
   --  Return the internal value associated with a Gtk_List.

   procedure Append_Items
     (List  : access Gtk_List_Record;
      Items : in Widget_List.Glist);

   function Child_Position
     (List   : access Gtk_List_Record;
      Child  : in Gtk.Widget.Gtk_Widget) return Gint;

   procedure Clear_Items
     (List    : access Gtk_List_Record;
      Start   : in Gint;
      The_End : in Gint);
   --  Remove some items from the list.
   --  if The_End is negative, it is assigned the position of the last item
   --  in the list.
   --  The first item in the list has an index of 0.

   function Get_Children
     (Widget : access Gtk.List.Gtk_List_Record) return Widget_List.Glist;
   --  The returned list mustn't be freed by the caller, it references internal
   --  data of gtk+

   function Get_Selection
     (Widget : access Gtk.List.Gtk_List_Record) return Widget_List.Glist;

   procedure Gtk_New (Widget : out Gtk_List);

   procedure Initialize (Widget : access Gtk_List_Record'Class);

   procedure Insert_Items
     (List     : access Gtk_List_Record;
      Items    : in Widget_List.Glist;
      Position : in Gint);

   procedure Prepend_Items
     (List  : access Gtk_List_Record;
      Items : in Widget_List.Glist);

   procedure Remove_Items
     (List  : access Gtk_List_Record;
      Items : in Widget_List.Glist);

   procedure Remove_Items_No_Unref
     (List  : access Gtk_List_Record;
      Items : in Widget_List.Glist);

   procedure Select_Child
     (List  : access Gtk_List_Record;
      Child : in Gtk.Widget.Gtk_Widget);

   procedure Select_Item
     (List : access Gtk_List_Record;
      Item : in Gint);

   procedure Set_Selection_Mode
     (List : access Gtk_List_Record;
      Mode : in Gtk_Selection_Mode);

   procedure Unselect_Child
     (List  : access Gtk_List_Record;
      Child : in Gtk.Widget.Gtk_Widget);

   procedure Unselect_Item
     (List : access Gtk_List_Record;
      Item : in Gint);

   ----------------
   -- Properties --
   ----------------

   --  <properties>
   --  The following properties are defined for this widget. See
   --  Glib.Properties for more information on properties.
   --
   --  </properties>

   -------------
   -- Signals --
   -------------

   --  <signals>
   --  The following new signals are defined for this widget:
   --
   --  - "select_child"
   --  - "selection_changed"
   --  - "unselect_child"
   --
   --  </signals>

   Signal_Select_Child      : constant String := "select_child";
   Signal_Selection_Changed : constant String := "selection_changed";
   Signal_Unselect_Child    : constant String := "unselect_child";

private
   type Gtk_List_Record is new Gtk.Container.Gtk_Container_Record
     with null record;

   pragma Import (C, Get_Type, "gtk_list_get_type");
end Gtk.List;

--  </doc_ignore>

--  These subprograms have never been bound, and the whole package is now
--  obsolescent anyway
--  No binding: gtk_list_end_drag_selection
--  No binding: gtk_list_end_selection
--  No binding: gtk_list_extend_selection
--  No binding: gtk_list_scroll_horizontal
--  No binding: gtk_list_scroll_vertical
--  No binding: gtk_list_select_all
--  No binding: gtk_list_start_selection
--  No binding: gtk_list_toggle_add_mode
--  No binding: gtk_list_toggle_focus_row
--  No binding: gtk_list_toggle_row
--  No binding: gtk_list_undo_selection
--  No binding: gtk_list_unselect_all