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. --  A Gtk.Assistant.Gtk_Assistant is a widget used to represent a generally 
  26. --  complex operation splitted in several steps, guiding the user through its 
  27. --  pages and controlling the page flow to collect the necessary data. 
  28. -- 
  29. --  The design of GtkAssistant is that it controls what buttons to show and to 
  30. --  make sensitive, based on what it knows about the page sequence and the 
  31. --  <link linkend="GtkAssistantPageType">type</link> of each page, in addition 
  32. --  to state information like the page <link 
  33. --  linkend="gtk-assistant-set-page-complete">completion</link> and <link 
  34. --  linkend="gtk-assistant-commit">committed</link> status. 
  35. -- 
  36. --  If you have a case that doesn't quite fit in Gtk_Assistants way of 
  37. --  handling buttons, you can use the GTK_ASSISTANT_PAGE_CUSTOM page type and 
  38. --  handle buttons yourself. 
  39. -- 
  40. --  == GtkAssistant as GtkBuildable == 
  41. -- 
  42. --  The GtkAssistant implementation of the GtkBuildable interface exposes the 
  43. --  Action_Area as internal children with the name "action_area". 
  44. -- 
  45. --  To add pages to an assistant in GtkBuilder, simply add it as a <child> to 
  46. --  the GtkAssistant object, and set its child properties as necessary. 
  47. -- 
  48. -- 
  49. --  </description> 
  50. --  <group>Windows</group> 
  51. --  <testgtk>create_assistant.adb</testgtk> 
  52. pragma Ada_2005; 
  53.  
  54. pragma Warnings (Off, "*is already use-visible*"); 
  55. with Gdk.Pixbuf;              use Gdk.Pixbuf; 
  56. with Glib;                    use Glib; 
  57. with Glib.Generic_Properties; use Glib.Generic_Properties; 
  58. with Glib.Object;             use Glib.Object; 
  59. with Glib.Types;              use Glib.Types; 
  60. with Gtk.Buildable;           use Gtk.Buildable; 
  61. with Gtk.Widget;              use Gtk.Widget; 
  62. with Gtk.Window;              use Gtk.Window; 
  63.  
  64. package Gtk.Assistant is 
  65.  
  66.    type Gtk_Assistant_Record is new Gtk_Window_Record with null record; 
  67.    type Gtk_Assistant is access all Gtk_Assistant_Record'Class; 
  68.  
  69.    type Gtk_Assistant_Page_Type is ( 
  70.       Gtk_Assistant_Page_Content, 
  71.       Gtk_Assistant_Page_Intro, 
  72.       Gtk_Assistant_Page_Confirm, 
  73.       Gtk_Assistant_Page_Summary, 
  74.       Gtk_Assistant_Page_Progress, 
  75.       Gtk_Assistant_Page_Custom); 
  76.    pragma Convention (C, Gtk_Assistant_Page_Type); 
  77.    --  An enum for determining the page role inside the 
  78.    --  Gtk.Assistant.Gtk_Assistant. It's used to handle buttons sensitivity and 
  79.    --  visibility. 
  80.    -- 
  81.    --  Note that an assistant needs to end its page flow with a page of type 
  82.    --  Gtk.Assistant.Gtk_Assistant_Page_Confirm, 
  83.    --  Gtk.Assistant.Gtk_Assistant_Page_Summary or 
  84.    --  Gtk.Assistant.Gtk_Assistant_Page_Progress to be correct. 
  85.    -- 
  86.    --  The Cancel button will only be shown if the page isn't "committed". See 
  87.    --  Gtk.Assistant.Commit for details. 
  88.  
  89.    --------------- 
  90.    -- Callbacks -- 
  91.    --------------- 
  92.  
  93.    type Gtk_Assistant_Page_Func is access function (Current_Page : Gint) return Gint; 
  94.    --  A function used by Gtk.Assistant.Set_Forward_Page_Func to know which is 
  95.    --  the next page given a current one. It's called both for computing the 
  96.    --  next page when the user presses the "forward" button and for handling 
  97.    --  the behavior of the "last" button. 
  98.    --  "current_page": The page number used to calculate the next page. 
  99.  
  100.    ---------------------------- 
  101.    -- Enumeration Properties -- 
  102.    ---------------------------- 
  103.  
  104.    package Gtk_Assistant_Page_Type_Properties is 
  105.       new Generic_Internal_Discrete_Property (Gtk_Assistant_Page_Type); 
  106.    type Property_Gtk_Assistant_Page_Type is new Gtk_Assistant_Page_Type_Properties.Property; 
  107.  
  108.    ------------------ 
  109.    -- Constructors -- 
  110.    ------------------ 
  111.  
  112.    procedure Gtk_New (Assistant : out Gtk_Assistant); 
  113.    procedure Initialize 
  114.       (Assistant : not null access Gtk_Assistant_Record'Class); 
  115.    --  Creates a new Gtk.Assistant.Gtk_Assistant. 
  116.    --  Since: gtk+ 2.10 
  117.  
  118.    function Gtk_Assistant_New return Gtk_Assistant; 
  119.    --  Creates a new Gtk.Assistant.Gtk_Assistant. 
  120.    --  Since: gtk+ 2.10 
  121.  
  122.    function Get_Type return Glib.GType; 
  123.    pragma Import (C, Get_Type, "gtk_assistant_get_type"); 
  124.  
  125.    ------------- 
  126.    -- Methods -- 
  127.    ------------- 
  128.  
  129.    procedure Add_Action_Widget 
  130.       (Assistant : not null access Gtk_Assistant_Record; 
  131.        Child     : not null access Gtk.Widget.Gtk_Widget_Record'Class); 
  132.    --  Adds a widget to the action area of a Gtk.Assistant.Gtk_Assistant. 
  133.    --  Since: gtk+ 2.10 
  134.    --  "child": a Gtk.Widget.Gtk_Widget 
  135.  
  136.    function Append_Page 
  137.       (Assistant : not null access Gtk_Assistant_Record; 
  138.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  139.        return Gint; 
  140.    --  Appends a page to the Assistant. 
  141.    --  Since: gtk+ 2.10 
  142.    --  "page": a Gtk.Widget.Gtk_Widget 
  143.  
  144.    procedure Commit (Assistant : not null access Gtk_Assistant_Record); 
  145.    --  Erases the visited page history so the back button is not shown on the 
  146.    --  current page, and removes the cancel button from subsequent pages. 
  147.    --  Use this when the information provided up to the current page is 
  148.    --  hereafter deemed permanent and cannot be modified or undone. For 
  149.    --  example, showing a progress page to track a long-running, unreversible 
  150.    --  operation after the user has clicked apply on a confirmation page. 
  151.    --  Since: gtk+ 2.22 
  152.  
  153.    function Get_Current_Page 
  154.       (Assistant : not null access Gtk_Assistant_Record) return Gint; 
  155.    --  Returns the page number of the current page. 
  156.    --  Since: gtk+ 2.10 
  157.  
  158.    procedure Set_Current_Page 
  159.       (Assistant : not null access Gtk_Assistant_Record; 
  160.        Page_Num  : Gint); 
  161.    --  Switches the page to Page_Num. 
  162.    --  Note that this will only be necessary in custom buttons, as the 
  163.    --  Assistant flow can be set with Gtk.Assistant.Set_Forward_Page_Func. 
  164.    --  Since: gtk+ 2.10 
  165.    --  "page_num": index of the page to switch to, starting from 0. If 
  166.    --  negative, the last page will be used. If greater than the number of 
  167.    --  pages in the Assistant, nothing will be done. 
  168.  
  169.    function Get_N_Pages 
  170.       (Assistant : not null access Gtk_Assistant_Record) return Gint; 
  171.    --  Returns the number of pages in the Assistant 
  172.    --  Since: gtk+ 2.10 
  173.  
  174.    function Get_Nth_Page 
  175.       (Assistant : not null access Gtk_Assistant_Record; 
  176.        Page_Num  : Gint) return Gtk.Widget.Gtk_Widget; 
  177.    --  Returns the child widget contained in page number Page_Num. 
  178.    --  Since: gtk+ 2.10 
  179.    --  "page_num": the index of a page in the Assistant, or -1 to get the last 
  180.    --  page 
  181.  
  182.    function Get_Page_Complete 
  183.       (Assistant : not null access Gtk_Assistant_Record; 
  184.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  185.        return Boolean; 
  186.    --  Gets whether Page is complete. 
  187.    --  Since: gtk+ 2.10 
  188.    --  "page": a page of Assistant 
  189.  
  190.    procedure Set_Page_Complete 
  191.       (Assistant : not null access Gtk_Assistant_Record; 
  192.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  193.        Complete  : Boolean); 
  194.    --  Sets whether Page contents are complete. 
  195.    --  This will make Assistant update the buttons state to be able to 
  196.    --  continue the task. 
  197.    --  Since: gtk+ 2.10 
  198.    --  "page": a page of Assistant 
  199.    --  "complete": the completeness status of the page 
  200.  
  201.    function Get_Page_Header_Image 
  202.       (Assistant : not null access Gtk_Assistant_Record; 
  203.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  204.        return Gdk.Pixbuf.Gdk_Pixbuf; 
  205.    pragma Obsolescent (Get_Page_Header_Image); 
  206.    --  Gets the header image for Page. 
  207.    --  Since: gtk+ 2.10 
  208.    --  Deprecated since 3.2, Since GTK+ 3.2, a header is no longer shown; add 
  209.    --  your header decoration to the page content instead. 
  210.    --  "page": a page of Assistant 
  211.  
  212.    procedure Set_Page_Header_Image 
  213.       (Assistant : not null access Gtk_Assistant_Record; 
  214.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  215.        Pixbuf    : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  216.    pragma Obsolescent (Set_Page_Header_Image); 
  217.    --  Sets a header image for Page. 
  218.    --  Since: gtk+ 2.10 
  219.    --  Deprecated since 3.2, Since GTK+ 3.2, a header is no longer shown; add 
  220.    --  your header decoration to the page content instead. 
  221.    --  "page": a page of Assistant 
  222.    --  "pixbuf": the new header image Page 
  223.  
  224.    function Get_Page_Side_Image 
  225.       (Assistant : not null access Gtk_Assistant_Record; 
  226.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  227.        return Gdk.Pixbuf.Gdk_Pixbuf; 
  228.    pragma Obsolescent (Get_Page_Side_Image); 
  229.    --  Gets the side image for Page. 
  230.    --  Since: gtk+ 2.10 
  231.    --  Deprecated since 3.2, Since GTK+ 3.2, sidebar images are not shown 
  232.    --  anymore. 
  233.    --  "page": a page of Assistant 
  234.  
  235.    procedure Set_Page_Side_Image 
  236.       (Assistant : not null access Gtk_Assistant_Record; 
  237.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  238.        Pixbuf    : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  239.    pragma Obsolescent (Set_Page_Side_Image); 
  240.    --  Sets a side image for Page. 
  241.    --  This image used to be displayed in the side area of the assistant when 
  242.    --  Page is the current page. 
  243.    --  Since: gtk+ 2.10 
  244.    --  Deprecated since 3.2, Since GTK+ 3.2, sidebar images are not shown 
  245.    --  anymore. 
  246.    --  "page": a page of Assistant 
  247.    --  "pixbuf": the new side image Page 
  248.  
  249.    function Get_Page_Title 
  250.       (Assistant : not null access Gtk_Assistant_Record; 
  251.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  252.        return UTF8_String; 
  253.    --  Gets the title for Page. 
  254.    --  Since: gtk+ 2.10 
  255.    --  "page": a page of Assistant 
  256.  
  257.    procedure Set_Page_Title 
  258.       (Assistant : not null access Gtk_Assistant_Record; 
  259.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  260.        Title     : UTF8_String); 
  261.    --  Sets a title for Page. 
  262.    --  The title is displayed in the header area of the assistant when Page is 
  263.    --  the current page. 
  264.    --  Since: gtk+ 2.10 
  265.    --  "page": a page of Assistant 
  266.    --  "title": the new title for Page 
  267.  
  268.    function Get_Page_Type 
  269.       (Assistant : not null access Gtk_Assistant_Record; 
  270.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  271.        return Gtk_Assistant_Page_Type; 
  272.    --  Gets the page type of Page. 
  273.    --  Since: gtk+ 2.10 
  274.    --  "page": a page of Assistant 
  275.  
  276.    procedure Set_Page_Type 
  277.       (Assistant : not null access Gtk_Assistant_Record; 
  278.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  279.        The_Type  : Gtk_Assistant_Page_Type); 
  280.    --  Sets the page type for Page. 
  281.    --  The page type determines the page behavior in the Assistant. 
  282.    --  Since: gtk+ 2.10 
  283.    --  "page": a page of Assistant 
  284.    --  "type": the new type for Page 
  285.  
  286.    function Insert_Page 
  287.       (Assistant : not null access Gtk_Assistant_Record; 
  288.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class; 
  289.        Position  : Gint) return Gint; 
  290.    --  Inserts a page in the Assistant at a given position. 
  291.    --  Since: gtk+ 2.10 
  292.    --  "page": a Gtk.Widget.Gtk_Widget 
  293.    --  "position": the index (starting at 0) at which to insert the page, or 
  294.    --  -1 to append the page to the Assistant 
  295.  
  296.    procedure Next_Page (Assistant : not null access Gtk_Assistant_Record); 
  297.    --  Navigate to the next page. 
  298.    --  It is a programming error to call this function when there is no next 
  299.    --  page. 
  300.    --  This function is for use when creating pages of the 
  301.    --  GTK_ASSISTANT_PAGE_CUSTOM type. 
  302.    --  Since: gtk+ 3.0 
  303.  
  304.    function Prepend_Page 
  305.       (Assistant : not null access Gtk_Assistant_Record; 
  306.        Page      : not null access Gtk.Widget.Gtk_Widget_Record'Class) 
  307.        return Gint; 
  308.    --  Prepends a page to the Assistant. 
  309.    --  Since: gtk+ 2.10 
  310.    --  "page": a Gtk.Widget.Gtk_Widget 
  311.  
  312.    procedure Previous_Page 
  313.       (Assistant : not null access Gtk_Assistant_Record); 
  314.    --  Navigate to the previous visited page. 
  315.    --  It is a programming error to call this function when no previous page 
  316.    --  is available. 
  317.    --  This function is for use when creating pages of the 
  318.    --  GTK_ASSISTANT_PAGE_CUSTOM type. 
  319.    --  Since: gtk+ 3.0 
  320.  
  321.    procedure Remove_Action_Widget 
  322.       (Assistant : not null access Gtk_Assistant_Record; 
  323.        Child     : not null access Gtk.Widget.Gtk_Widget_Record'Class); 
  324.    --  Removes a widget from the action area of a Gtk.Assistant.Gtk_Assistant. 
  325.    --  Since: gtk+ 2.10 
  326.    --  "child": a Gtk.Widget.Gtk_Widget 
  327.  
  328.    procedure Remove_Page 
  329.       (Assistant : not null access Gtk_Assistant_Record; 
  330.        Page_Num  : Gint); 
  331.    --  Removes the Page_Num's page from Assistant. 
  332.    --  Since: gtk+ 3.2 
  333.    --  "page_num": the index of a page in the Assistant, or -1 to remove the 
  334.    --  last page 
  335.  
  336.    procedure Set_Forward_Page_Func 
  337.       (Assistant : not null access Gtk_Assistant_Record; 
  338.        Page_Func : Gtk_Assistant_Page_Func); 
  339.    --  Sets the page forwarding function to be Page_Func. 
  340.    --  This function will be used to determine what will be the next page when 
  341.    --  the user presses the forward button. Setting Page_Func to null will make 
  342.    --  the assistant to use the default forward function, which just goes to 
  343.    --  the next visible page. 
  344.    --  Since: gtk+ 2.10 
  345.    --  "page_func": the Gtk_Assistant_Page_Func, or null to use the default 
  346.    --  one 
  347.  
  348.    generic 
  349.       type User_Data_Type (<>) is private; 
  350.       with procedure Destroy (Data : in out User_Data_Type) is null; 
  351.    package Set_Forward_Page_Func_User_Data is 
  352.  
  353.       type Gtk_Assistant_Page_Func is access function (Current_Page : Gint; Data : User_Data_Type) return Gint; 
  354.       --  A function used by Gtk.Assistant.Set_Forward_Page_Func to know which is 
  355.       --  the next page given a current one. It's called both for computing the 
  356.       --  next page when the user presses the "forward" button and for handling 
  357.       --  the behavior of the "last" button. 
  358.       --  "current_page": The page number used to calculate the next page. 
  359.       --  "data": user data. 
  360.  
  361.       procedure Set_Forward_Page_Func 
  362.          (Assistant : not null access Gtk.Assistant.Gtk_Assistant_Record'Class; 
  363.           Page_Func : Gtk_Assistant_Page_Func; 
  364.           Data      : User_Data_Type); 
  365.       --  Sets the page forwarding function to be Page_Func. 
  366.       --  This function will be used to determine what will be the next page 
  367.       --  when the user presses the forward button. Setting Page_Func to null 
  368.       --  will make the assistant to use the default forward function, which 
  369.       --  just goes to the next visible page. 
  370.       --  Since: gtk+ 2.10 
  371.       --  "page_func": the Gtk_Assistant_Page_Func, or null to use the default 
  372.       --  one 
  373.       --  "data": user data for Page_Func 
  374.  
  375.    end Set_Forward_Page_Func_User_Data; 
  376.  
  377.    procedure Update_Buttons_State 
  378.       (Assistant : not null access Gtk_Assistant_Record); 
  379.    --  Forces Assistant to recompute the buttons state. 
  380.    --  GTK+ automatically takes care of this in most situations, e.g. when the 
  381.    --  user goes to a different page, or when the visibility or completeness of 
  382.    --  a page changes. 
  383.    --  One situation where it can be necessary to call this function is when 
  384.    --  changing a value on the current page affects the future page flow of the 
  385.    --  assistant. 
  386.    --  Since: gtk+ 2.10 
  387.  
  388.    ------------- 
  389.    -- Signals -- 
  390.    ------------- 
  391.  
  392.    type Cb_Gtk_Assistant_Void is not null access procedure (Self : access Gtk_Assistant_Record'Class); 
  393.  
  394.    type Cb_GObject_Void is not null access procedure 
  395.      (Self : access Glib.Object.GObject_Record'Class); 
  396.  
  397.    Signal_Apply : constant Glib.Signal_Name := "apply"; 
  398.    procedure On_Apply 
  399.       (Self  : not null access Gtk_Assistant_Record; 
  400.        Call  : Cb_Gtk_Assistant_Void; 
  401.        After : Boolean := False); 
  402.    procedure On_Apply 
  403.       (Self  : not null access Gtk_Assistant_Record; 
  404.        Call  : Cb_GObject_Void; 
  405.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  406.        After : Boolean := False); 
  407.    --  The ::apply signal is emitted when the apply button is clicked. 
  408.    -- 
  409.    --  The default behavior of the Gtk.Assistant.Gtk_Assistant is to switch to 
  410.    --  the page after the current page, unless the current page is the last 
  411.    --  one. 
  412.    -- 
  413.    --  A handler for the ::apply signal should carry out the actions for which 
  414.    --  the wizard has collected data. If the action takes a long time to 
  415.    --  complete, you might consider putting a page of type 
  416.    --  Gtk.Assistant.Gtk_Assistant_Page_Progress after the confirmation page 
  417.    --  and handle this operation within the 
  418.    --  Gtk.Assistant.Gtk_Assistant::prepare signal of the progress page. 
  419.  
  420.    Signal_Cancel : constant Glib.Signal_Name := "cancel"; 
  421.    procedure On_Cancel 
  422.       (Self  : not null access Gtk_Assistant_Record; 
  423.        Call  : Cb_Gtk_Assistant_Void; 
  424.        After : Boolean := False); 
  425.    procedure On_Cancel 
  426.       (Self  : not null access Gtk_Assistant_Record; 
  427.        Call  : Cb_GObject_Void; 
  428.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  429.        After : Boolean := False); 
  430.    --  The ::cancel signal is emitted when then the cancel button is clicked. 
  431.  
  432.    Signal_Close : constant Glib.Signal_Name := "close"; 
  433.    procedure On_Close 
  434.       (Self  : not null access Gtk_Assistant_Record; 
  435.        Call  : Cb_Gtk_Assistant_Void; 
  436.        After : Boolean := False); 
  437.    procedure On_Close 
  438.       (Self  : not null access Gtk_Assistant_Record; 
  439.        Call  : Cb_GObject_Void; 
  440.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  441.        After : Boolean := False); 
  442.    --  The ::close signal is emitted either when the close button of a summary 
  443.    --  page is clicked, or when the apply button in the last page in the flow 
  444.    --  (of type Gtk.Assistant.Gtk_Assistant_Page_Confirm) is clicked. 
  445.  
  446.    type Cb_Gtk_Assistant_Gtk_Widget_Void is not null access procedure 
  447.      (Self : access Gtk_Assistant_Record'Class; 
  448.       Page : not null access Gtk.Widget.Gtk_Widget_Record'Class); 
  449.  
  450.    type Cb_GObject_Gtk_Widget_Void is not null access procedure 
  451.      (Self : access Glib.Object.GObject_Record'Class; 
  452.       Page : not null access Gtk.Widget.Gtk_Widget_Record'Class); 
  453.  
  454.    Signal_Prepare : constant Glib.Signal_Name := "prepare"; 
  455.    procedure On_Prepare 
  456.       (Self  : not null access Gtk_Assistant_Record; 
  457.        Call  : Cb_Gtk_Assistant_Gtk_Widget_Void; 
  458.        After : Boolean := False); 
  459.    procedure On_Prepare 
  460.       (Self  : not null access Gtk_Assistant_Record; 
  461.        Call  : Cb_GObject_Gtk_Widget_Void; 
  462.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  463.        After : Boolean := False); 
  464.    --  The ::prepare signal is emitted when a new page is set as the 
  465.    --  assistant's current page, before making the new page visible. 
  466.    -- 
  467.    --  A handler for this signal can do any preparations which are necessary 
  468.    --  before showing Page. 
  469.  
  470.    ---------------- 
  471.    -- Interfaces -- 
  472.    ---------------- 
  473.    --  This class implements several interfaces. See Glib.Types 
  474.    -- 
  475.    --  - "Buildable" 
  476.  
  477.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  478.      (Gtk.Buildable.Gtk_Buildable, Gtk_Assistant_Record, Gtk_Assistant); 
  479.    function "+" 
  480.      (Widget : access Gtk_Assistant_Record'Class) 
  481.    return Gtk.Buildable.Gtk_Buildable 
  482.    renames Implements_Gtk_Buildable.To_Interface; 
  483.    function "-" 
  484.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  485.    return Gtk_Assistant 
  486.    renames Implements_Gtk_Buildable.To_Object; 
  487.  
  488. end Gtk.Assistant;