agpl_1.0.0_b5da3320/src/agpl-gdk/agpl-gdk-widget_bundle.ads

 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
with Gtk.Widget; use Gtk.Widget;

private with Ada.Containers.Indefinite_Ordered_Maps;

package Agpl.Gdk.Widget_Bundle is

   --  pragma Preelaborate;

   type Object is tagged private;

   procedure Set_Root (This : in out Object; W : access Gtk_Widget_Record'Class);
   function  Get_Root (This : Object) return access Gtk_Widget_Record'Class;

   procedure Set (This : in out Object; Name : String; W : access Gtk_Widget_Record'Class);
   function  Get (This : Object; Name : String) return access Gtk_Widget_Record'Class;

private

   package Widget_Maps is
     new Ada.Containers.Indefinite_Ordered_Maps (String, Gtk_Widget);

   use Widget_Maps;

   type Object is tagged record
      Root    : Gtk_Widget;
      Widgets : Widget_Maps.Map;
   end record;

end Agpl.Gdk.Widget_Bundle;