1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  Dialog boxes are a convenient way to prompt the user for a small amount of 
  26. --  input, e.g. to display a message, ask a question, or anything else that 
  27. --  does not require extensive effort on the user's part. 
  28. -- 
  29. --  GTK+ treats a dialog as a window split vertically. The top section is a 
  30. --  Gtk.Box.Gtk_Vbox, and is where widgets such as a Gtk.Label.Gtk_Label or a 
  31. --  Gtk.GEntry.Gtk_Entry should be packed. The bottom area is known as the 
  32. --  <structfield>action_area</structfield>. This is generally used for packing 
  33. --  buttons into the dialog which may perform functions such as cancel, ok, or 
  34. --  apply. 
  35. -- 
  36. --  Gtk.Dialog.Gtk_Dialog boxes are created with a call to Gtk.Dialog.Gtk_New 
  37. --  or gtk_dialog_new_with_buttons. gtk_dialog_new_with_buttons is recommended; 
  38. --  it allows you to set the dialog title, some convenient flags, and add 
  39. --  simple buttons. 
  40. -- 
  41. --  If 'dialog' is a newly created dialog, the two primary areas of the window 
  42. --  can be accessed through Gtk.Dialog.Get_Content_Area and 
  43. --  Gtk.Dialog.Get_Action_Area, as can be seen from the example below. 
  44. -- 
  45. --  A 'modal' dialog (that is, one which freezes the rest of the application 
  46. --  from user input), can be created by calling Gtk.Window.Set_Modal on the 
  47. --  dialog. Use the GTK_WINDOW macro to cast the widget returned from 
  48. --  Gtk.Dialog.Gtk_New into a Gtk.Window.Gtk_Window. When using 
  49. --  gtk_dialog_new_with_buttons you can also pass the GTK_DIALOG_MODAL flag to 
  50. --  make a dialog modal. 
  51. -- 
  52. --  If you add buttons to Gtk.Dialog.Gtk_Dialog using 
  53. --  gtk_dialog_new_with_buttons, Gtk.Dialog.Add_Button, gtk_dialog_add_buttons, 
  54. --  or Gtk.Dialog.Add_Action_Widget, clicking the button will emit a signal 
  55. --  called Gtk.Dialog.Gtk_Dialog::response with a response ID that you 
  56. --  specified. GTK+ will never assign a meaning to positive response IDs; these 
  57. --  are entirely user-defined. But for convenience, you can use the response 
  58. --  IDs in the Gtk_Response_Type enumeration (these all have values less than 
  59. --  zero). If a dialog receives a delete event, the 
  60. --  Gtk.Dialog.Gtk_Dialog::response signal will be emitted with a response ID 
  61. --  of GTK_RESPONSE_DELETE_EVENT. 
  62. -- 
  63. --  If you want to block waiting for a dialog to return before returning 
  64. --  control flow to your code, you can call Gtk.Dialog.Run. This function 
  65. --  enters a recursive main loop and waits for the user to respond to the 
  66. --  dialog, returning the response ID corresponding to the button the user 
  67. --  clicked. 
  68. -- 
  69. --  For the simple dialog in the following example, in reality you'd probably 
  70. --  use Gtk.Message_Dialog.Gtk_Message_Dialog to save yourself some effort. But 
  71. --  you'd need to create the dialog contents manually if you had more than a 
  72. --  simple message in the dialog. 
  73. -- 
  74. --  == Simple GtkDialog usage == 
  75. -- 
  76. --    /* Function to open a dialog box displaying the message provided. */ 
  77. --    void 
  78. --    quick_message (gchar *message) 
  79. --    { 
  80. --       GtkWidget *dialog, *label, *content_area; 
  81. --       /* Create the widgets */ 
  82. --       dialog = gtk_dialog_new_with_buttons ("Message", 
  83. --          main_application_window, 
  84. --          GTK_DIALOG_DESTROY_WITH_PARENT, 
  85. --          GTK_STOCK_OK, 
  86. --          GTK_RESPONSE_NONE, 
  87. --          NULL); 
  88. --       content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); 
  89. --       label = gtk_label_new (message); 
  90. --       /* Ensure that the dialog box is destroyed when the user responds */ 
  91. --       g_signal_connect_swapped (dialog, 
  92. --          "response", 
  93. --          G_CALLBACK (gtk_widget_destroy), 
  94. --          dialog); 
  95. --       /* Add the label, and show everything we've added to the dialog */ 
  96. --       gtk_container_add (GTK_CONTAINER (content_area), label); 
  97. --       gtk_widget_show_all (dialog); 
  98. --    } 
  99. -- 
  100. --  == GtkDialog as GtkBuildable == 
  101. -- 
  102. --  The GtkDialog implementation of the Gtk.Buildable.Gtk_Buildable interface 
  103. --  exposes the Vbox and Action_Area as internal children with the names "vbox" 
  104. --  and "action_area". 
  105. -- 
  106. --  GtkDialog supports a custom <action-widgets> element, which can contain 
  107. --  multiple <action-widget> elements. The "response" attribute specifies a 
  108. --  numeric response, and the content of the element is the id of widget (which 
  109. --  should be a child of the dialogs Action_Area). 
  110. -- 
  111. --  == A <structname>GtkDialog</structname> UI definition fragment. == 
  112. -- 
  113. --    <object class="GtkDialog" id="dialog1"> 
  114. --    <child internal-child="vbox">" 
  115. --    <object class="GtkVBox" id="vbox"> 
  116. --    <child internal-child="action_area"> 
  117. --    <object class="GtkHButtonBox" id="button_box"> 
  118. --    <child> 
  119. --    <object class="GtkButton" id="button_cancel"/> 
  120. --    </child> 
  121. --    <child> 
  122. --    <object class="GtkButton" id="button_ok"/> 
  123. --    </child> 
  124. --    </object> 
  125. --    </child> 
  126. --    </object> 
  127. --    </child> 
  128. --    <action-widgets> 
  129. --    <action-widget response="3">button_ok</action-widget> 
  130. --    <action-widget response="-5">button_cancel</action-widget> 
  131. --    </action-widgets> 
  132. --    </object> 
  133. --  </description> 
  134. --  <description> 
  135. --  See Gtkada.Dialogs for a higher level dialog interface. 
  136. -- 
  137. --  </description> 
  138. --  <screenshot>gtk-dialog</screenshot> 
  139. --  <group>Windows</group> 
  140. --  <testgtk>create_dialog.adb</testgtk> 
  141. pragma Ada_2005; 
  142.  
  143. pragma Warnings (Off, "*is already use-visible*"); 
  144. with Gdk.Screen;    use Gdk.Screen; 
  145. with Glib;          use Glib; 
  146. with Glib.Object;   use Glib.Object; 
  147. with Glib.Types;    use Glib.Types; 
  148. with Gtk.Box;       use Gtk.Box; 
  149. with Gtk.Buildable; use Gtk.Buildable; 
  150. with Gtk.Widget;    use Gtk.Widget; 
  151. with Gtk.Window;    use Gtk.Window; 
  152.  
  153. package Gtk.Dialog is 
  154.  
  155.    type Gtk_Dialog_Record is new Gtk_Window_Record with null record; 
  156.    type Gtk_Dialog is access all Gtk_Dialog_Record'Class; 
  157.  
  158.    type Gtk_Dialog_Flags is mod 8; 
  159.    for Gtk_Dialog_Flags'Size use Gint'Size; 
  160.    pragma Convention (C, Gtk_Dialog_Flags); 
  161.    Modal               : constant Gtk_Dialog_Flags := 2 ** 0; 
  162.    Destroy_With_Parent : constant Gtk_Dialog_Flags := 2 ** 1; 
  163.    No_Separator        : constant Gtk_Dialog_Flags := 2 ** 2; 
  164.    --  Various flags that can be set for the dialog, with the following 
  165.    --  implications: 
  166.    --     - Modal : the dialog is modal, see Gtk.Window.Set_Modal 
  167.    --     - Destroy_With_Parent: The dialog is destroyed if its parent is 
  168.    --       destroyed. See Gtk.Window.Set_Destroy_With_Parent 
  169.    --     - No_Separator: No separator bar above the buttons. 
  170.  
  171.    type Gtk_Response_Type is new Gint; 
  172.    --  Type used for Response_Id's. 
  173.    --  Positive values are totally user-interpreted. 
  174.    --  GtkAda will sometimes return Gtk_Response_None if no Response_Id is 
  175.    --  available. 
  176.    -- 
  177.    --  Typical usage is: 
  178.    --    if Gtk.Dialog.Run (Dialog) = Gtk_Response_Accept then 
  179.    --       blah; 
  180.    --    end if; 
  181.  
  182.    Gtk_Response_None : constant Gtk_Response_Type := -1; 
  183.    --  GtkAda returns this if a response widget has no Response_Id, 
  184.    --  or if the dialog gets programmatically hidden or destroyed. 
  185.  
  186.    Gtk_Response_Reject : constant Gtk_Response_Type := -2; 
  187.    Gtk_Response_Accept : constant Gtk_Response_Type := -3; 
  188.    --  GtkAda won't return these unless you pass them in 
  189.    --  as the response for an action widget. They are 
  190.    --  for your convenience. 
  191.  
  192.    Gtk_Response_Delete_Event : constant Gtk_Response_Type := -4; 
  193.    --  If the dialog is deleted through the button in the titlebar 
  194.  
  195.    Gtk_Response_OK     : constant Gtk_Response_Type := -5; 
  196.    Gtk_Response_Cancel : constant Gtk_Response_Type := -6; 
  197.    Gtk_Response_Close  : constant Gtk_Response_Type := -7; 
  198.    Gtk_Response_Yes    : constant Gtk_Response_Type := -8; 
  199.    Gtk_Response_No     : constant Gtk_Response_Type := -9; 
  200.    Gtk_Response_Apply  : constant Gtk_Response_Type := -10; 
  201.    Gtk_Response_Help   : constant Gtk_Response_Type := -11; 
  202.    --  These are returned from dialogs, and you can also use them 
  203.    --  yourself if you like. 
  204.  
  205.    type Response_Type_Array is array (Natural range <>) of Gtk_Response_Type; 
  206.  
  207.    ------------------ 
  208.    -- Constructors -- 
  209.    ------------------ 
  210.  
  211.    procedure Gtk_New (Dialog : out Gtk_Dialog); 
  212.    procedure Initialize (Dialog : not null access Gtk_Dialog_Record'Class); 
  213.    --  Creates a new dialog box. 
  214.    --  Widgets should not be packed into this Gtk.Window.Gtk_Window directly, 
  215.    --  but into the Vbox and Action_Area, as described above. 
  216.  
  217.    function Gtk_Dialog_New return Gtk_Dialog; 
  218.    --  Creates a new dialog box. 
  219.    --  Widgets should not be packed into this Gtk.Window.Gtk_Window directly, 
  220.    --  but into the Vbox and Action_Area, as described above. 
  221.  
  222.    function Gtk_Dialog_New 
  223.       (Title  : UTF8_String; 
  224.        Parent : Gtk.Window.Gtk_Window := null; 
  225.        Flags  : Gtk_Dialog_Flags) return Gtk_Dialog; 
  226.    --  Create a new dialog with a specific title, and specific attributes. 
  227.    --  Parent is the transient parent for the dialog (ie the one that is used 
  228.    --  for reference for the flag Destroy_With_Parent, or to compute the 
  229.    --  initial position of the dialog). 
  230.    --  Since: gtk+ GtkAda 1.0 
  231.  
  232.    procedure Gtk_New 
  233.       (Dialog : out Gtk_Dialog; 
  234.        Title  : UTF8_String; 
  235.        Parent : Gtk.Window.Gtk_Window := null; 
  236.        Flags  : Gtk_Dialog_Flags); 
  237.    procedure Initialize 
  238.       (Dialog : not null access Gtk_Dialog_Record'Class; 
  239.        Title  : UTF8_String; 
  240.        Parent : Gtk.Window.Gtk_Window := null; 
  241.        Flags  : Gtk_Dialog_Flags); 
  242.    --  Create a new dialog with a specific title, and specific attributes. 
  243.    --  Parent is the transient parent for the dialog (ie the one that is used 
  244.    --  for reference for the flag Destroy_With_Parent, or to compute the 
  245.    --  initial position of the dialog). 
  246.    --  Since: gtk+ GtkAda 1.0 
  247.  
  248.    function Get_Type return Glib.GType; 
  249.    pragma Import (C, Get_Type, "gtk_dialog_get_type"); 
  250.  
  251.    ------------- 
  252.    -- Methods -- 
  253.    ------------- 
  254.  
  255.    procedure Add_Action_Widget 
  256.       (Dialog      : not null access Gtk_Dialog_Record; 
  257.        Child       : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  258.        Response_Id : Gtk_Response_Type); 
  259.    --  Adds an activatable widget to the action area of a 
  260.    --  Gtk.Dialog.Gtk_Dialog, connecting a signal handler that will emit the 
  261.    --  Gtk.Dialog.Gtk_Dialog::response signal on the dialog when the widget is 
  262.    --  activated. The widget is appended to the end of the dialog's action 
  263.    --  area. If you want to add a non-activatable widget, simply pack it into 
  264.    --  the Action_Area field of the Gtk.Dialog.Gtk_Dialog struct. 
  265.    --  "child": an activatable widget 
  266.    --  "response_id": response ID for Child 
  267.  
  268.    function Add_Button 
  269.       (Dialog      : not null access Gtk_Dialog_Record; 
  270.        Text        : UTF8_String; 
  271.        Response_Id : Gtk_Response_Type) return Gtk.Widget.Gtk_Widget; 
  272.    --  Adds a button with the given text (or a stock button, if Button_Text is 
  273.    --  a stock ID) and sets things up so that clicking the button will emit the 
  274.    --  Gtk.Dialog.Gtk_Dialog::response signal with the given Response_Id. The 
  275.    --  button is appended to the end of the dialog's action area. The button 
  276.    --  widget is returned, but usually you don't need it. 
  277.    --  "text": text of button, or stock ID 
  278.    --  "response_id": response ID for the button 
  279.  
  280.    function Get_Action_Area 
  281.       (Dialog : not null access Gtk_Dialog_Record) return Gtk.Box.Gtk_Box; 
  282.    --  Returns the action area of Dialog. 
  283.    --  Since: gtk+ 2.14 
  284.  
  285.    function Get_Content_Area 
  286.       (Dialog : not null access Gtk_Dialog_Record) return Gtk.Box.Gtk_Box; 
  287.    --  Returns the content area of Dialog. 
  288.    --  Since: gtk+ 2.14 
  289.  
  290.    function Get_Response_For_Widget 
  291.       (Dialog : not null access Gtk_Dialog_Record; 
  292.        Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  293.        return Gtk_Response_Type; 
  294.    --  Gets the response id of a widget in the action area of a dialog. 
  295.    --  Since: gtk+ 2.8 
  296.    --  "widget": a widget in the action area of Dialog 
  297.  
  298.    function Get_Widget_For_Response 
  299.       (Dialog      : not null access Gtk_Dialog_Record; 
  300.        Response_Id : Gtk_Response_Type) return Gtk.Widget.Gtk_Widget; 
  301.    --  Gets the widget button that uses the given response ID in the action 
  302.    --  area of a dialog. 
  303.    --  Since: gtk+ 2.20 
  304.    --  "response_id": the response ID used by the Dialog widget 
  305.  
  306.    procedure Response 
  307.       (Dialog      : not null access Gtk_Dialog_Record; 
  308.        Response_Id : Gtk_Response_Type); 
  309.    --  Emits the Gtk.Dialog.Gtk_Dialog::response signal with the given 
  310.    --  response ID. Used to indicate that the user has responded to the dialog 
  311.    --  in some way; typically either you or Gtk.Dialog.Run will be monitoring 
  312.    --  the ::response signal and take appropriate action. 
  313.    --  "response_id": response ID 
  314.  
  315.    function Run 
  316.       (Dialog : not null access Gtk_Dialog_Record) return Gtk_Response_Type; 
  317.    --  Blocks in a recursive main loop until the Dialog either emits the 
  318.    --  Gtk.Dialog.Gtk_Dialog::response signal, or is destroyed. If the dialog 
  319.    --  is destroyed during the call to Gtk.Dialog.Run, Gtk.Dialog.Run returns 
  320.    --  GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the 
  321.    --  ::response signal emission. 
  322.    --  Before entering the recursive main loop, Gtk.Dialog.Run calls 
  323.    --  Gtk.Widget.Show on the dialog for you. Note that you still need to show 
  324.    --  any children of the dialog yourself. 
  325.    --  During Gtk.Dialog.Run, the default behavior of 
  326.    --  Gtk.Widget.Gtk_Widget::delete-event is disabled; if the dialog receives 
  327.    --  ::delete_event, it will not be destroyed as windows usually are, and 
  328.    --  Gtk.Dialog.Run will return GTK_RESPONSE_DELETE_EVENT. Also, during 
  329.    --  Gtk.Dialog.Run the dialog will be modal. You can force Gtk.Dialog.Run to 
  330.    --  return at any time by calling Gtk.Dialog.Response to emit the ::response 
  331.    --  signal. Destroying the dialog during Gtk.Dialog.Run is a very bad idea, 
  332.    --  because your post-run code won't know whether the dialog was destroyed 
  333.    --  or not. 
  334.    --  After Gtk.Dialog.Run returns, you are responsible for hiding or 
  335.    --  destroying the dialog if you wish to do so. 
  336.    --  Typical usage of this function might be: |[ gint result = 
  337.    --  gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case 
  338.    --  GTK_RESPONSE_ACCEPT: do_application_specific_something (); break; 
  339.    --  default: do_nothing_since_dialog_was_cancelled (); break; } 
  340.    --  gtk_widget_destroy (dialog); ]| 
  341.    --  Note that even though the recursive main loop gives the effect of a 
  342.    --  modal dialog (it prevents the user from interacting with other windows 
  343.    --  in the same window group while the dialog is run), callbacks such as 
  344.    --  timeouts, IO channel watches, DND drops, etc, *will* be triggered during 
  345.    --  a Gtk.Dialog.Run call. 
  346.  
  347.    procedure Set_Default_Response 
  348.       (Dialog      : not null access Gtk_Dialog_Record; 
  349.        Response_Id : Gtk_Response_Type); 
  350.    --  Sets the last widget in the dialog's action area with the given 
  351.    --  Response_Id as the default widget for the dialog. Pressing "Enter" 
  352.    --  normally activates the default widget. 
  353.    --  "response_id": a response ID 
  354.  
  355.    procedure Set_Response_Sensitive 
  356.       (Dialog      : not null access Gtk_Dialog_Record; 
  357.        Response_Id : Gtk_Response_Type; 
  358.        Setting     : Boolean); 
  359.    --  Calls 'gtk_widget_set_sensitive (widget, Setting)' for each widget in 
  360.    --  the dialog's action area with the given Response_Id. A convenient way to 
  361.    --  sensitize/desensitize dialog buttons. 
  362.    --  "response_id": a response ID 
  363.    --  "setting": True for sensitive 
  364.  
  365.    ---------------------- 
  366.    -- GtkAda additions -- 
  367.    ---------------------- 
  368.  
  369.    procedure Set_Alternative_Button_Order_From_Array 
  370.      (Dialog    : access Gtk_Dialog_Record; 
  371.       New_Order : Response_Type_Array); 
  372.    --  Sets an alternative button order. If the gtk-alternative-button-order 
  373.    --  setting is set to %TRUE, the dialog buttons are reordered according to 
  374.    --  the order of the response ids passed to this function. 
  375.    -- 
  376.    --  By default, GTK+ dialogs use the button order advocated by the Gnome 
  377.    --  Human Interface Guidelines with the affirmative button at the far right, 
  378.    --  and the cancel button left of it. But the builtin GTK+ dialogs and 
  379.    --  message dialogs' do provide an alternative button order, which is more 
  380.    --  suitable on some platforms, e.g. Windows. 
  381.    -- 
  382.    --  Use this function after adding all the buttons to your dialog. 
  383.  
  384.    function Gtk_Alternative_Dialog_Button_Order 
  385.      (Screen : Gdk.Screen.Gdk_Screen := null)  return Boolean; 
  386.    --  Returns True if dialogs are expected to use an alternative button order 
  387.    --  on the given screen (or current screen if null) . See 
  388.    --  Set_Alternative_Button_Order_From_Array for more details about 
  389.    --  alternative button order. 
  390.    -- 
  391.    --  If you need to use this function, you should probably connect to the 
  392.    --  ::notify:gtk-alternative-button-order signal on the Gtk_Settings object 
  393.    --  associated to Screen, in order to be notified if the button order 
  394.    --  setting changes. 
  395.    -- 
  396.    --  Returns: Whether the alternative button order should be used 
  397.  
  398.    ------------- 
  399.    -- Signals -- 
  400.    ------------- 
  401.  
  402.    type Cb_Gtk_Dialog_Void is not null access procedure (Self : access Gtk_Dialog_Record'Class); 
  403.  
  404.    type Cb_GObject_Void is not null access procedure 
  405.      (Self : access Glib.Object.GObject_Record'Class); 
  406.  
  407.    Signal_Close : constant Glib.Signal_Name := "close"; 
  408.    procedure On_Close 
  409.       (Self  : not null access Gtk_Dialog_Record; 
  410.        Call  : Cb_Gtk_Dialog_Void; 
  411.        After : Boolean := False); 
  412.    procedure On_Close 
  413.       (Self  : not null access Gtk_Dialog_Record; 
  414.        Call  : Cb_GObject_Void; 
  415.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  416.        After : Boolean := False); 
  417.    --  The ::close signal is a <link linkend="keybinding-signals">keybinding 
  418.    --  signal</link> which gets emitted when the user uses a keybinding to 
  419.    --  close the dialog. 
  420.    -- 
  421.    --  The default binding for this signal is the Escape key. 
  422.  
  423.    type Cb_Gtk_Dialog_Gtk_Response_Type_Void is not null access procedure 
  424.      (Self        : access Gtk_Dialog_Record'Class; 
  425.       Response_Id : Gtk_Response_Type); 
  426.  
  427.    type Cb_GObject_Gtk_Response_Type_Void is not null access procedure 
  428.      (Self        : access Glib.Object.GObject_Record'Class; 
  429.       Response_Id : Gtk_Response_Type); 
  430.  
  431.    Signal_Response : constant Glib.Signal_Name := "response"; 
  432.    procedure On_Response 
  433.       (Self  : not null access Gtk_Dialog_Record; 
  434.        Call  : Cb_Gtk_Dialog_Gtk_Response_Type_Void; 
  435.        After : Boolean := False); 
  436.    procedure On_Response 
  437.       (Self  : not null access Gtk_Dialog_Record; 
  438.        Call  : Cb_GObject_Gtk_Response_Type_Void; 
  439.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  440.        After : Boolean := False); 
  441.    --  Emitted when an action widget is clicked, the dialog receives a delete 
  442.    --  event, or the application programmer calls Gtk.Dialog.Response. On a 
  443.    --  delete event, the response ID is GTK_RESPONSE_DELETE_EVENT. Otherwise, 
  444.    --  it depends on which action widget was clicked. 
  445.  
  446.    ---------------- 
  447.    -- Interfaces -- 
  448.    ---------------- 
  449.    --  This class implements several interfaces. See Glib.Types 
  450.    -- 
  451.    --  - "Buildable" 
  452.  
  453.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  454.      (Gtk.Buildable.Gtk_Buildable, Gtk_Dialog_Record, Gtk_Dialog); 
  455.    function "+" 
  456.      (Widget : access Gtk_Dialog_Record'Class) 
  457.    return Gtk.Buildable.Gtk_Buildable 
  458.    renames Implements_Gtk_Buildable.To_Interface; 
  459.    function "-" 
  460.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  461.    return Gtk_Dialog 
  462.    renames Implements_Gtk_Buildable.To_Object; 
  463.  
  464. end Gtk.Dialog;