File: my_dialog.adb

package info (click to toggle)
libgtkada 2.24.4dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,208 kB
  • ctags: 1,676
  • sloc: ada: 119,686; ansic: 4,719; sh: 3,003; makefile: 690; xml: 338; perl: 70
file content (31 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (6)
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
with Gtk.Separator;
with Gtk.Enums;

package body My_Dialog is

   procedure Gtk_New (Dialog : out My_Dialog) is
   begin
      Dialog := new My_Dialog_Record;
      Initialize (Dialog);
   end Gtk_New;

   procedure Initialize (Dialog : access My_Dialog_Record'Class) is
      Sep : Gtk.Separator.Gtk_Separator;
   begin
      Gtk.Window.Initialize (Dialog, Gtk.Enums.Window_Toplevel);

      Gtk.Box.Gtk_New_Vbox (Dialog.Vbox, False, 0);
      Add (Dialog, Dialog.Vbox);
      Gtk.Box.Show (Dialog.Vbox);

      Gtk.Box.Gtk_New_Hbox (Dialog.Action_Area, True, 5);
      Gtk.Box.Set_Border_Width (Dialog.Action_Area, 10);
      Gtk.Box.Pack_End (Dialog.Vbox, Dialog.Action_Area, False, True, 0);
      Gtk.Box.Show (Dialog.Action_Area);

      Gtk.Separator.Gtk_New_Hseparator (Sep);
      Gtk.Box.Pack_End (Dialog.Vbox, Sep, False, True, 0);
      Gtk.Separator.Show (Sep);
   end Initialize;

end My_Dialog;