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. --  The Gtk.Button.Gtk_Button widget is generally used to trigger a callback 
  26. --  function that is called when the button is pressed. The various signals and 
  27. --  how to use them are outlined below. 
  28. -- 
  29. --  The Gtk.Button.Gtk_Button widget can hold any valid child widget. That is, 
  30. --  it can hold almost any other standard Gtk.Widget.Gtk_Widget. The most 
  31. --  commonly used child is the Gtk.Label.Gtk_Label. 
  32. -- 
  33. --  </description> 
  34. --  <screenshot>gtk-button</screenshot> 
  35. --  <group>Buttons and Toggles</group> 
  36. --  <testgtk>create_buttons.adb</testgtk> 
  37. pragma Ada_2005; 
  38.  
  39. pragma Warnings (Off, "*is already use-visible*"); 
  40. with Gdk;             use Gdk; 
  41. with Glib;            use Glib; 
  42. with Glib.Object;     use Glib.Object; 
  43. with Glib.Properties; use Glib.Properties; 
  44. with Glib.Types;      use Glib.Types; 
  45. with Glib.Variant;    use Glib.Variant; 
  46. with Gtk.Action;      use Gtk.Action; 
  47. with Gtk.Actionable;  use Gtk.Actionable; 
  48. with Gtk.Activatable; use Gtk.Activatable; 
  49. with Gtk.Bin;         use Gtk.Bin; 
  50. with Gtk.Buildable;   use Gtk.Buildable; 
  51. with Gtk.Enums;       use Gtk.Enums; 
  52. with Gtk.Widget;      use Gtk.Widget; 
  53.  
  54. package Gtk.Button is 
  55.  
  56.    type Gtk_Button_Record is new Gtk_Bin_Record with null record; 
  57.    type Gtk_Button is access all Gtk_Button_Record'Class; 
  58.  
  59.    ------------------ 
  60.    -- Constructors -- 
  61.    ------------------ 
  62.  
  63.    procedure Gtk_New_From_Stock 
  64.       (Button   : out Gtk_Button; 
  65.        Stock_Id : UTF8_String); 
  66.    procedure Initialize_From_Stock 
  67.       (Button   : not null access Gtk_Button_Record'Class; 
  68.        Stock_Id : UTF8_String); 
  69.    --  Creates a new Gtk.Button.Gtk_Button containing the image and text from 
  70.    --  a stock item. Some stock ids have preprocessor macros like GTK_STOCK_OK 
  71.    --  and GTK_STOCK_APPLY. 
  72.    --  If Stock_Id is unknown, then it will be treated as a mnemonic label (as 
  73.    --  for Gtk.Button.Gtk_New_With_Mnemonic). 
  74.    --  "stock_id": the name of the stock item 
  75.  
  76.    function Gtk_Button_New_From_Stock 
  77.       (Stock_Id : UTF8_String) return Gtk_Button; 
  78.    --  Creates a new Gtk.Button.Gtk_Button containing the image and text from 
  79.    --  a stock item. Some stock ids have preprocessor macros like GTK_STOCK_OK 
  80.    --  and GTK_STOCK_APPLY. 
  81.    --  If Stock_Id is unknown, then it will be treated as a mnemonic label (as 
  82.    --  for Gtk.Button.Gtk_New_With_Mnemonic). 
  83.    --  "stock_id": the name of the stock item 
  84.  
  85.    procedure Gtk_New (Button : out Gtk_Button; Label : UTF8_String := ""); 
  86.    procedure Initialize 
  87.       (Button : not null access Gtk_Button_Record'Class; 
  88.        Label  : UTF8_String := ""); 
  89.    --  Creates a Gtk.Button.Gtk_Button widget with a Gtk.Label.Gtk_Label child 
  90.    --  containing the given text. 
  91.    --  "label": The text you want the Gtk.Label.Gtk_Label to hold. 
  92.  
  93.    function Gtk_Button_New_With_Label 
  94.       (Label : UTF8_String := "") return Gtk_Button; 
  95.    --  Creates a Gtk.Button.Gtk_Button widget with a Gtk.Label.Gtk_Label child 
  96.    --  containing the given text. 
  97.    --  "label": The text you want the Gtk.Label.Gtk_Label to hold. 
  98.  
  99.    procedure Gtk_New_With_Mnemonic 
  100.       (Button : out Gtk_Button; 
  101.        Label  : UTF8_String); 
  102.    procedure Initialize_With_Mnemonic 
  103.       (Button : not null access Gtk_Button_Record'Class; 
  104.        Label  : UTF8_String); 
  105.    --  Creates a new Gtk.Button.Gtk_Button containing a label. If characters 
  106.    --  in Label are preceded by an underscore, they are underlined. If you need 
  107.    --  a literal underscore character in a label, use '__' (two underscores). 
  108.    --  The first underlined character represents a keyboard accelerator called 
  109.    --  a mnemonic. Pressing Alt and that key activates the button. 
  110.    --  "label": The text of the button, with an underscore in front of the 
  111.    --  mnemonic character 
  112.  
  113.    function Gtk_Button_New_With_Mnemonic 
  114.       (Label : UTF8_String) return Gtk_Button; 
  115.    --  Creates a new Gtk.Button.Gtk_Button containing a label. If characters 
  116.    --  in Label are preceded by an underscore, they are underlined. If you need 
  117.    --  a literal underscore character in a label, use '__' (two underscores). 
  118.    --  The first underlined character represents a keyboard accelerator called 
  119.    --  a mnemonic. Pressing Alt and that key activates the button. 
  120.    --  "label": The text of the button, with an underscore in front of the 
  121.    --  mnemonic character 
  122.  
  123.    function Get_Type return Glib.GType; 
  124.    pragma Import (C, Get_Type, "gtk_button_get_type"); 
  125.  
  126.    ------------- 
  127.    -- Methods -- 
  128.    ------------- 
  129.  
  130.    procedure Clicked (Button : not null access Gtk_Button_Record); 
  131.    --  Emits a Gtk.Button.Gtk_Button::clicked signal to the given 
  132.    --  Gtk.Button.Gtk_Button. 
  133.  
  134.    procedure Enter (Button : not null access Gtk_Button_Record); 
  135.    pragma Obsolescent (Enter); 
  136.    --  Emits a Gtk.Button.Gtk_Button::enter signal to the given 
  137.    --  Gtk.Button.Gtk_Button. 
  138.    --  Deprecated since 2.20, Use the 
  139.    --  Gtk.Widget.Gtk_Widget::enter-notify-event signal. 
  140.  
  141.    procedure Get_Alignment 
  142.       (Button : not null access Gtk_Button_Record; 
  143.        Xalign : out Gfloat; 
  144.        Yalign : out Gfloat); 
  145.    --  Gets the alignment of the child in the button. 
  146.    --  Since: gtk+ 2.4 
  147.    --  "xalign": return location for horizontal alignment 
  148.    --  "yalign": return location for vertical alignment 
  149.  
  150.    procedure Set_Alignment 
  151.       (Button : not null access Gtk_Button_Record; 
  152.        Xalign : Gfloat; 
  153.        Yalign : Gfloat); 
  154.    --  Sets the alignment of the child. This property has no effect unless the 
  155.    --  child is a Gtk.Misc.Gtk_Misc or a Gtk.Alignment.Gtk_Alignment. 
  156.    --  Since: gtk+ 2.4 
  157.    --  "xalign": the horizontal position of the child, 0.0 is left aligned, 
  158.    --  1.0 is right aligned 
  159.    --  "yalign": the vertical position of the child, 0.0 is top aligned, 1.0 
  160.    --  is bottom aligned 
  161.  
  162.    function Get_Always_Show_Image 
  163.       (Button : not null access Gtk_Button_Record) return Boolean; 
  164.    --  Returns whether the button will ignore the 
  165.    --  Gtk.Settings.Gtk_Settings:gtk-button-images setting and always show the 
  166.    --  image, if available. 
  167.    --  Since: gtk+ 3.6 
  168.  
  169.    procedure Set_Always_Show_Image 
  170.       (Button      : not null access Gtk_Button_Record; 
  171.        Always_Show : Boolean); 
  172.    --  If True, the button will ignore the 
  173.    --  Gtk.Settings.Gtk_Settings:gtk-button-images setting and always show the 
  174.    --  image, if available. 
  175.    --  Use this property if the button would be useless or hard to use without 
  176.    --  the image. 
  177.    --  Since: gtk+ 3.6 
  178.    --  "always_show": True if the menuitem should always show the image 
  179.  
  180.    function Get_Event_Window 
  181.       (Button : not null access Gtk_Button_Record) return Gdk.Gdk_Window; 
  182.    --  Returns the button's event window if it is realized, null otherwise. 
  183.    --  This function should be rarely needed. 
  184.    --  Since: gtk+ 2.22 
  185.  
  186.    function Get_Focus_On_Click 
  187.       (Button : not null access Gtk_Button_Record) return Boolean; 
  188.    --  Returns whether the button grabs focus when it is clicked with the 
  189.    --  mouse. See Gtk.Button.Set_Focus_On_Click. 
  190.    --  Since: gtk+ 2.4 
  191.  
  192.    procedure Set_Focus_On_Click 
  193.       (Button         : not null access Gtk_Button_Record; 
  194.        Focus_On_Click : Boolean); 
  195.    --  Sets whether the button will grab focus when it is clicked with the 
  196.    --  mouse. Making mouse clicks not grab focus is useful in places like 
  197.    --  toolbars where you don't want the keyboard focus removed from the main 
  198.    --  area of the application. 
  199.    --  Since: gtk+ 2.4 
  200.    --  "focus_on_click": whether the button grabs focus when clicked with the 
  201.    --  mouse 
  202.  
  203.    function Get_Image 
  204.       (Button : not null access Gtk_Button_Record) 
  205.        return Gtk.Widget.Gtk_Widget; 
  206.    --  Gets the widget that is currenty set as the image of Button. This may 
  207.    --  have been explicitly set by Gtk.Button.Set_Image or constructed by 
  208.    --  Gtk.Button.Gtk_New_From_Stock. 
  209.    --  Since: gtk+ 2.6 
  210.  
  211.    procedure Set_Image 
  212.       (Button : not null access Gtk_Button_Record; 
  213.        Image  : not null access Gtk.Widget.Gtk_Widget_Record'Class); 
  214.    --  Set the image of Button to the given widget. Note that it depends on 
  215.    --  the Gtk.Settings.Gtk_Settings:gtk-button-images setting whether the 
  216.    --  image will be displayed or not, you don't have to call Gtk.Widget.Show 
  217.    --  on Image yourself. 
  218.    --  Since: gtk+ 2.6 
  219.    --  "image": a widget to set as the image for the button 
  220.  
  221.    function Get_Image_Position 
  222.       (Button : not null access Gtk_Button_Record) 
  223.        return Gtk.Enums.Gtk_Position_Type; 
  224.    --  Gets the position of the image relative to the text inside the button. 
  225.    --  Since: gtk+ 2.10 
  226.  
  227.    procedure Set_Image_Position 
  228.       (Button   : not null access Gtk_Button_Record; 
  229.        Position : Gtk.Enums.Gtk_Position_Type); 
  230.    --  Sets the position of the image relative to the text inside the button. 
  231.    --  Since: gtk+ 2.10 
  232.    --  "position": the position 
  233.  
  234.    function Get_Label 
  235.       (Button : not null access Gtk_Button_Record) return UTF8_String; 
  236.    --  Fetches the text from the label of the button, as set by 
  237.    --  Gtk.Button.Set_Label. If the label text has not been set the return 
  238.    --  value will be null. This will be the case if you create an empty button 
  239.    --  with gtk_button_new to use as a container. 
  240.  
  241.    procedure Set_Label 
  242.       (Button : not null access Gtk_Button_Record; 
  243.        Label  : UTF8_String); 
  244.    --  Sets the text of the label of the button to Str. This text is also used 
  245.    --  to select the stock item if Gtk.Button.Set_Use_Stock is used. 
  246.    --  This will also clear any previously set labels. 
  247.    --  "label": a string 
  248.  
  249.    function Get_Relief 
  250.       (Button : not null access Gtk_Button_Record) 
  251.        return Gtk.Enums.Gtk_Relief_Style; 
  252.    --  Returns the current relief style of the given Gtk.Button.Gtk_Button. 
  253.  
  254.    procedure Set_Relief 
  255.       (Button   : not null access Gtk_Button_Record; 
  256.        Newstyle : Gtk.Enums.Gtk_Relief_Style); 
  257.    --  Sets the relief style of the edges of the given Gtk.Button.Gtk_Button 
  258.    --  widget. Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, 
  259.    --  GTK_RELIEF_NONE. The default style is, as one can guess, 
  260.    --  GTK_RELIEF_NORMAL. 
  261.    --  <!-- FIXME: put pictures of each style --> 
  262.    --  "newstyle": The GtkReliefStyle as described above. 
  263.  
  264.    function Get_Use_Stock 
  265.       (Button : not null access Gtk_Button_Record) return Boolean; 
  266.    --  Returns whether the button label is a stock item. 
  267.  
  268.    procedure Set_Use_Stock 
  269.       (Button    : not null access Gtk_Button_Record; 
  270.        Use_Stock : Boolean); 
  271.    --  If True, the label set on the button is used as a stock id to select 
  272.    --  the stock item for the button. 
  273.    --  "use_stock": True if the button should use a stock item 
  274.  
  275.    function Get_Use_Underline 
  276.       (Button : not null access Gtk_Button_Record) return Boolean; 
  277.    --  Returns whether an embedded underline in the button label indicates a 
  278.    --  mnemonic. See gtk_button_set_use_underline (). 
  279.  
  280.    procedure Set_Use_Underline 
  281.       (Button        : not null access Gtk_Button_Record; 
  282.        Use_Underline : Boolean); 
  283.    --  If true, an underline in the text of the button label indicates the 
  284.    --  next character should be used for the mnemonic accelerator key. 
  285.    --  "use_underline": True if underlines in the text indicate mnemonics 
  286.  
  287.    procedure Leave (Button : not null access Gtk_Button_Record); 
  288.    pragma Obsolescent (Leave); 
  289.    --  Emits a Gtk.Button.Gtk_Button::leave signal to the given 
  290.    --  Gtk.Button.Gtk_Button. 
  291.    --  Deprecated since 2.20, Use the 
  292.    --  Gtk.Widget.Gtk_Widget::leave-notify-event signal. 
  293.  
  294.    procedure Pressed (Button : not null access Gtk_Button_Record); 
  295.    pragma Obsolescent (Pressed); 
  296.    --  Emits a Gtk.Button.Gtk_Button::pressed signal to the given 
  297.    --  Gtk.Button.Gtk_Button. 
  298.    --  Deprecated since 2.20, Use the 
  299.    --  Gtk.Widget.Gtk_Widget::button-press-event signal. 
  300.  
  301.    procedure Released (Button : not null access Gtk_Button_Record); 
  302.    pragma Obsolescent (Released); 
  303.    --  Emits a Gtk.Button.Gtk_Button::released signal to the given 
  304.    --  Gtk.Button.Gtk_Button. 
  305.    --  Deprecated since 2.20, Use the 
  306.    --  Gtk.Widget.Gtk_Widget::button-release-event signal. 
  307.  
  308.    --------------------------------------------- 
  309.    -- Inherited subprograms (from interfaces) -- 
  310.    --------------------------------------------- 
  311.    --  Methods inherited from the Buildable interface are not duplicated here 
  312.    --  since they are meant to be used by tools, mostly. If you need to call 
  313.    --  them, use an explicit cast through the "-" operator below. 
  314.  
  315.    function Get_Action_Name 
  316.       (Self : not null access Gtk_Button_Record) return UTF8_String; 
  317.  
  318.    procedure Set_Action_Name 
  319.       (Self        : not null access Gtk_Button_Record; 
  320.        Action_Name : UTF8_String); 
  321.  
  322.    function Get_Action_Target_Value 
  323.       (Self : not null access Gtk_Button_Record) 
  324.        return Glib.Variant.Gvariant; 
  325.  
  326.    procedure Set_Action_Target_Value 
  327.       (Self         : not null access Gtk_Button_Record; 
  328.        Target_Value : Glib.Variant.Gvariant); 
  329.  
  330.    procedure Set_Detailed_Action_Name 
  331.       (Self                 : not null access Gtk_Button_Record; 
  332.        Detailed_Action_Name : UTF8_String); 
  333.  
  334.    procedure Do_Set_Related_Action 
  335.       (Self   : not null access Gtk_Button_Record; 
  336.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  337.  
  338.    function Get_Related_Action 
  339.       (Self : not null access Gtk_Button_Record) 
  340.        return Gtk.Action.Gtk_Action; 
  341.  
  342.    procedure Set_Related_Action 
  343.       (Self   : not null access Gtk_Button_Record; 
  344.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  345.  
  346.    function Get_Use_Action_Appearance 
  347.       (Self : not null access Gtk_Button_Record) return Boolean; 
  348.  
  349.    procedure Set_Use_Action_Appearance 
  350.       (Self           : not null access Gtk_Button_Record; 
  351.        Use_Appearance : Boolean); 
  352.  
  353.    procedure Sync_Action_Properties 
  354.       (Self   : not null access Gtk_Button_Record; 
  355.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  356.  
  357.    ---------------- 
  358.    -- Properties -- 
  359.    ---------------- 
  360.    --  The following properties are defined for this widget. See 
  361.    --  Glib.Properties for more information on properties) 
  362.  
  363.    Always_Show_Image_Property : constant Glib.Properties.Property_Boolean; 
  364.    --  If True, the button will ignore the 
  365.    --  Gtk.Settings.Gtk_Settings:gtk-button-images setting and always show the 
  366.    --  image, if available. 
  367.    -- 
  368.    --  Use this property if the button would be useless or hard to use without 
  369.    --  the image. 
  370.  
  371.    Focus_On_Click_Property : constant Glib.Properties.Property_Boolean; 
  372.  
  373.    Image_Property : constant Glib.Properties.Property_Object; 
  374.    --  Type: Gtk.Widget.Gtk_Widget 
  375.    --  The child widget to appear next to the button text. 
  376.  
  377.    Image_Position_Property : constant Gtk.Enums.Property_Gtk_Position_Type; 
  378.    --  The position of the image relative to the text inside the button. 
  379.  
  380.    Label_Property : constant Glib.Properties.Property_String; 
  381.  
  382.    Relief_Property : constant Gtk.Enums.Property_Gtk_Relief_Style; 
  383.  
  384.    Use_Stock_Property : constant Glib.Properties.Property_Boolean; 
  385.  
  386.    Use_Underline_Property : constant Glib.Properties.Property_Boolean; 
  387.  
  388.    Xalign_Property : constant Glib.Properties.Property_Float; 
  389.    --  If the child of the button is a Gtk.Misc.Gtk_Misc or 
  390.    --  Gtk.Alignment.Gtk_Alignment, this property can be used to control its 
  391.    --  horizontal alignment. 0.0 is left aligned, 1.0 is right aligned. 
  392.  
  393.    Yalign_Property : constant Glib.Properties.Property_Float; 
  394.    --  If the child of the button is a Gtk.Misc.Gtk_Misc or 
  395.    --  Gtk.Alignment.Gtk_Alignment, this property can be used to control its 
  396.    --  vertical alignment. 0.0 is top aligned, 1.0 is bottom aligned. 
  397.  
  398.    ------------- 
  399.    -- Signals -- 
  400.    ------------- 
  401.  
  402.    type Cb_Gtk_Button_Void is not null access procedure (Self : access Gtk_Button_Record'Class); 
  403.  
  404.    type Cb_GObject_Void is not null access procedure 
  405.      (Self : access Glib.Object.GObject_Record'Class); 
  406.  
  407.    Signal_Activate : constant Glib.Signal_Name := "activate"; 
  408.    procedure On_Activate 
  409.       (Self  : not null access Gtk_Button_Record; 
  410.        Call  : Cb_Gtk_Button_Void; 
  411.        After : Boolean := False); 
  412.    procedure On_Activate 
  413.       (Self  : not null access Gtk_Button_Record; 
  414.        Call  : Cb_GObject_Void; 
  415.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  416.        After : Boolean := False); 
  417.    --  The ::activate signal on GtkButton is an action signal and emitting it 
  418.    --  causes the button to animate press then release. Applications should 
  419.    --  never connect to this signal, but use the Gtk.Button.Gtk_Button::clicked 
  420.    --  signal. 
  421.  
  422.    Signal_Clicked : constant Glib.Signal_Name := "clicked"; 
  423.    procedure On_Clicked 
  424.       (Self  : not null access Gtk_Button_Record; 
  425.        Call  : Cb_Gtk_Button_Void; 
  426.        After : Boolean := False); 
  427.    procedure On_Clicked 
  428.       (Self  : not null access Gtk_Button_Record; 
  429.        Call  : Cb_GObject_Void; 
  430.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  431.        After : Boolean := False); 
  432.    --  Emitted when the button has been activated (pressed and released). 
  433.  
  434.    Signal_Enter : constant Glib.Signal_Name := "enter"; 
  435.    procedure On_Enter 
  436.       (Self  : not null access Gtk_Button_Record; 
  437.        Call  : Cb_Gtk_Button_Void; 
  438.        After : Boolean := False); 
  439.    procedure On_Enter 
  440.       (Self  : not null access Gtk_Button_Record; 
  441.        Call  : Cb_GObject_Void; 
  442.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  443.        After : Boolean := False); 
  444.    --  Emitted when the pointer enters the button. 
  445.  
  446.    Signal_Leave : constant Glib.Signal_Name := "leave"; 
  447.    procedure On_Leave 
  448.       (Self  : not null access Gtk_Button_Record; 
  449.        Call  : Cb_Gtk_Button_Void; 
  450.        After : Boolean := False); 
  451.    procedure On_Leave 
  452.       (Self  : not null access Gtk_Button_Record; 
  453.        Call  : Cb_GObject_Void; 
  454.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  455.        After : Boolean := False); 
  456.    --  Emitted when the pointer leaves the button. 
  457.  
  458.    Signal_Pressed : constant Glib.Signal_Name := "pressed"; 
  459.    procedure On_Pressed 
  460.       (Self  : not null access Gtk_Button_Record; 
  461.        Call  : Cb_Gtk_Button_Void; 
  462.        After : Boolean := False); 
  463.    procedure On_Pressed 
  464.       (Self  : not null access Gtk_Button_Record; 
  465.        Call  : Cb_GObject_Void; 
  466.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  467.        After : Boolean := False); 
  468.    --  Emitted when the button is pressed. 
  469.  
  470.    Signal_Released : constant Glib.Signal_Name := "released"; 
  471.    procedure On_Released 
  472.       (Self  : not null access Gtk_Button_Record; 
  473.        Call  : Cb_Gtk_Button_Void; 
  474.        After : Boolean := False); 
  475.    procedure On_Released 
  476.       (Self  : not null access Gtk_Button_Record; 
  477.        Call  : Cb_GObject_Void; 
  478.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  479.        After : Boolean := False); 
  480.    --  Emitted when the button is released. 
  481.  
  482.    ---------------- 
  483.    -- Interfaces -- 
  484.    ---------------- 
  485.    --  This class implements several interfaces. See Glib.Types 
  486.    -- 
  487.    --  - "Actionable" 
  488.    -- 
  489.    --  - "Activatable" 
  490.    -- 
  491.    --  - "Buildable" 
  492.  
  493.    package Implements_Gtk_Actionable is new Glib.Types.Implements 
  494.      (Gtk.Actionable.Gtk_Actionable, Gtk_Button_Record, Gtk_Button); 
  495.    function "+" 
  496.      (Widget : access Gtk_Button_Record'Class) 
  497.    return Gtk.Actionable.Gtk_Actionable 
  498.    renames Implements_Gtk_Actionable.To_Interface; 
  499.    function "-" 
  500.      (Interf : Gtk.Actionable.Gtk_Actionable) 
  501.    return Gtk_Button 
  502.    renames Implements_Gtk_Actionable.To_Object; 
  503.  
  504.    package Implements_Gtk_Activatable is new Glib.Types.Implements 
  505.      (Gtk.Activatable.Gtk_Activatable, Gtk_Button_Record, Gtk_Button); 
  506.    function "+" 
  507.      (Widget : access Gtk_Button_Record'Class) 
  508.    return Gtk.Activatable.Gtk_Activatable 
  509.    renames Implements_Gtk_Activatable.To_Interface; 
  510.    function "-" 
  511.      (Interf : Gtk.Activatable.Gtk_Activatable) 
  512.    return Gtk_Button 
  513.    renames Implements_Gtk_Activatable.To_Object; 
  514.  
  515.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  516.      (Gtk.Buildable.Gtk_Buildable, Gtk_Button_Record, Gtk_Button); 
  517.    function "+" 
  518.      (Widget : access Gtk_Button_Record'Class) 
  519.    return Gtk.Buildable.Gtk_Buildable 
  520.    renames Implements_Gtk_Buildable.To_Interface; 
  521.    function "-" 
  522.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  523.    return Gtk_Button 
  524.    renames Implements_Gtk_Buildable.To_Object; 
  525.  
  526. private 
  527.    Yalign_Property : constant Glib.Properties.Property_Float := 
  528.      Glib.Properties.Build ("yalign"); 
  529.    Xalign_Property : constant Glib.Properties.Property_Float := 
  530.      Glib.Properties.Build ("xalign"); 
  531.    Use_Underline_Property : constant Glib.Properties.Property_Boolean := 
  532.      Glib.Properties.Build ("use-underline"); 
  533.    Use_Stock_Property : constant Glib.Properties.Property_Boolean := 
  534.      Glib.Properties.Build ("use-stock"); 
  535.    Relief_Property : constant Gtk.Enums.Property_Gtk_Relief_Style := 
  536.      Gtk.Enums.Build ("relief"); 
  537.    Label_Property : constant Glib.Properties.Property_String := 
  538.      Glib.Properties.Build ("label"); 
  539.    Image_Position_Property : constant Gtk.Enums.Property_Gtk_Position_Type := 
  540.      Gtk.Enums.Build ("image-position"); 
  541.    Image_Property : constant Glib.Properties.Property_Object := 
  542.      Glib.Properties.Build ("image"); 
  543.    Focus_On_Click_Property : constant Glib.Properties.Property_Boolean := 
  544.      Glib.Properties.Build ("focus-on-click"); 
  545.    Always_Show_Image_Property : constant Glib.Properties.Property_Boolean := 
  546.      Glib.Properties.Build ("always-show-image"); 
  547. end Gtk.Button;