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. --  Actions represent operations that the user can be perform, along with some 
  26. --  information how it should be presented in the interface. Each action 
  27. --  provides methods to create icons, menu items and toolbar items representing 
  28. --  itself. 
  29. -- 
  30. --  As well as the callback that is called when the action gets activated, the 
  31. --  following also gets associated with the action: 
  32. -- 
  33. --  
  34. -- 
  35. --     * a name (not translated, for path lookup) 
  36. -- 
  37. --     * a label (translated, for display) 
  38. -- 
  39. --     * an accelerator 
  40. -- 
  41. --     * whether label indicates a stock id 
  42. -- 
  43. --     * a tooltip (optional, translated) 
  44. -- 
  45. --     * a toolbar label (optional, shorter than label) 
  46. -- 
  47. --  The action will also have some state information: 
  48. -- 
  49. --  
  50. -- 
  51. --     * visible (shown/hidden) 
  52. -- 
  53. --     * sensitive (enabled/disabled) 
  54. -- 
  55. --  Apart from regular actions, there are <link 
  56. --  linkend="GtkToggleAction">toggle actions</link>, which can be toggled 
  57. --  between two states and <link linkend="GtkRadioAction">radio actions</link>, 
  58. --  of which only one in a group can be in the "active" state. Other actions 
  59. --  can be implemented as Gtk.Action.Gtk_Action subclasses. 
  60. -- 
  61. --  Each action can have one or more proxy widgets. To act as an action proxy, 
  62. --  widget needs to implement Gtk.Activatable.Gtk_Activatable interface. 
  63. --  Proxies mirror the state of the action and should change when the action's 
  64. --  state changes. Properties that are always mirrored by proxies are 
  65. --  Gtk.Action.Gtk_Action:sensitive and Gtk.Action.Gtk_Action:visible. 
  66. --  Gtk.Action.Gtk_Action:gicon, Gtk.Action.Gtk_Action:icon-name, 
  67. --  Gtk.Action.Gtk_Action:label, Gtk.Action.Gtk_Action:short-label and 
  68. --  Gtk.Action.Gtk_Action:stock-id properties are only mirorred if proxy widget 
  69. --  has Gtk.Activatable.Gtk_Activatable:use-action-appearance property set to 
  70. --  True. 
  71. -- 
  72. --  When the proxy is activated, it should activate its action. 
  73. -- 
  74. --  </description> 
  75. pragma Ada_2005; 
  76.  
  77. pragma Warnings (Off, "*is already use-visible*"); 
  78. with Glib;            use Glib; 
  79. with Glib.G_Icon;     use Glib.G_Icon; 
  80. with Glib.Object;     use Glib.Object; 
  81. with Glib.Properties; use Glib.Properties; 
  82. with Glib.Types;      use Glib.Types; 
  83. with Gtk.Accel_Group; use Gtk.Accel_Group; 
  84. with Gtk.Buildable;   use Gtk.Buildable; 
  85. with Gtk.Enums;       use Gtk.Enums; 
  86. with Gtk.Widget;      use Gtk.Widget; 
  87.  
  88. package Gtk.Action is 
  89.  
  90.    type Gtk_Action_Record is new GObject_Record with null record; 
  91.    type Gtk_Action is access all Gtk_Action_Record'Class; 
  92.  
  93.    ------------------ 
  94.    -- Constructors -- 
  95.    ------------------ 
  96.  
  97.    procedure Gtk_New 
  98.       (Action   : out Gtk_Action; 
  99.        Name     : UTF8_String; 
  100.        Label    : UTF8_String := ""; 
  101.        Tooltip  : UTF8_String := ""; 
  102.        Stock_Id : UTF8_String := ""); 
  103.    procedure Initialize 
  104.       (Action   : not null access Gtk_Action_Record'Class; 
  105.        Name     : UTF8_String; 
  106.        Label    : UTF8_String := ""; 
  107.        Tooltip  : UTF8_String := ""; 
  108.        Stock_Id : UTF8_String := ""); 
  109.    --  Creates a new Gtk.Action.Gtk_Action object. To add the action to a 
  110.    --  Gtk.Action_Group.Gtk_Action_Group and set the accelerator for the 
  111.    --  action, call Gtk.Action_Group.Add_Action_With_Accel. See <xref 
  112.    --  linkend="XML-UI"/> for information on allowed action names. 
  113.    --  Since: gtk+ 2.4 
  114.    --  "name": A unique name for the action 
  115.    --  "label": the label displayed in menu items and on buttons, or null 
  116.    --  "tooltip": a tooltip for the action, or null 
  117.    --  "stock_id": the stock icon to display in widgets representing the 
  118.    --  action, or null 
  119.  
  120.    function Gtk_Action_New 
  121.       (Name     : UTF8_String; 
  122.        Label    : UTF8_String := ""; 
  123.        Tooltip  : UTF8_String := ""; 
  124.        Stock_Id : UTF8_String := "") return Gtk_Action; 
  125.    --  Creates a new Gtk.Action.Gtk_Action object. To add the action to a 
  126.    --  Gtk.Action_Group.Gtk_Action_Group and set the accelerator for the 
  127.    --  action, call Gtk.Action_Group.Add_Action_With_Accel. See <xref 
  128.    --  linkend="XML-UI"/> for information on allowed action names. 
  129.    --  Since: gtk+ 2.4 
  130.    --  "name": A unique name for the action 
  131.    --  "label": the label displayed in menu items and on buttons, or null 
  132.    --  "tooltip": a tooltip for the action, or null 
  133.    --  "stock_id": the stock icon to display in widgets representing the 
  134.    --  action, or null 
  135.  
  136.    function Get_Type return Glib.GType; 
  137.    pragma Import (C, Get_Type, "gtk_action_get_type"); 
  138.  
  139.    ------------- 
  140.    -- Methods -- 
  141.    ------------- 
  142.  
  143.    procedure Activate (Action : not null access Gtk_Action_Record); 
  144.    --  Emits the "activate" signal on the specified action, if it isn't 
  145.    --  insensitive. This gets called by the proxy widgets when they get 
  146.    --  activated. 
  147.    --  It can also be used to manually activate an action. 
  148.    --  Since: gtk+ 2.4 
  149.  
  150.    procedure Block_Activate (Action : not null access Gtk_Action_Record); 
  151.    --  Disable activation signals from the action 
  152.    --  This is needed when updating the state of your proxy 
  153.    --  Gtk.Activatable.Gtk_Activatable widget could result in calling 
  154.    --  Gtk.Action.Activate, this is a convenience function to avoid recursing 
  155.    --  in those cases (updating toggle state for instance). 
  156.    --  Since: gtk+ 2.16 
  157.  
  158.    procedure Connect_Accelerator 
  159.       (Action : not null access Gtk_Action_Record); 
  160.    --  Installs the accelerator for Action if Action has an accel path and 
  161.    --  group. See Gtk.Action.Set_Accel_Path and Gtk.Action.Set_Accel_Group 
  162.    --  Since multiple proxies may independently trigger the installation of 
  163.    --  the accelerator, the Action counts the number of times this function has 
  164.    --  been called and doesn't remove the accelerator until 
  165.    --  Gtk.Action.Disconnect_Accelerator has been called as many times. 
  166.    --  Since: gtk+ 2.4 
  167.  
  168.    function Create_Icon 
  169.       (Action    : not null access Gtk_Action_Record; 
  170.        Icon_Size : Gtk.Enums.Gtk_Icon_Size) return Gtk.Widget.Gtk_Widget; 
  171.    --  This function is intended for use by action implementations to create 
  172.    --  icons displayed in the proxy widgets. 
  173.    --  Since: gtk+ 2.4 
  174.    --  "icon_size": the size of the icon that should be created. 
  175.  
  176.    function Create_Menu 
  177.       (Action : not null access Gtk_Action_Record) 
  178.        return Gtk.Widget.Gtk_Widget; 
  179.    --  If Action provides a Gtk.Menu.Gtk_Menu widget as a submenu for the menu 
  180.    --  item or the toolbar item it creates, this function returns an instance 
  181.    --  of that menu. 
  182.    --  Since: gtk+ 2.12 
  183.  
  184.    function Create_Menu_Item 
  185.       (Action : not null access Gtk_Action_Record) 
  186.        return Gtk.Widget.Gtk_Widget; 
  187.    --  Creates a menu item widget that proxies for the given action. 
  188.    --  Since: gtk+ 2.4 
  189.  
  190.    function Create_Tool_Item 
  191.       (Action : not null access Gtk_Action_Record) 
  192.        return Gtk.Widget.Gtk_Widget; 
  193.    --  Creates a toolbar item widget that proxies for the given action. 
  194.    --  Since: gtk+ 2.4 
  195.  
  196.    procedure Disconnect_Accelerator 
  197.       (Action : not null access Gtk_Action_Record); 
  198.    --  Undoes the effect of one call to Gtk.Action.Connect_Accelerator. 
  199.    --  Since: gtk+ 2.4 
  200.  
  201.    function Get_Accel_Path 
  202.       (Action : not null access Gtk_Action_Record) return UTF8_String; 
  203.    --  Returns the accel path for this action. 
  204.    --  Since: gtk+ 2.6 
  205.  
  206.    procedure Set_Accel_Path 
  207.       (Action     : not null access Gtk_Action_Record; 
  208.        Accel_Path : UTF8_String); 
  209.    --  Sets the accel path for this action. All proxy widgets associated with 
  210.    --  the action will have this accel path, so that their accelerators are 
  211.    --  consistent. 
  212.    --  Note that Accel_Path string will be stored in a Glib.GQuark. Therefore, 
  213.    --  if you pass a static string, you can save some memory by interning it 
  214.    --  first with g_intern_static_string. 
  215.    --  Since: gtk+ 2.4 
  216.    --  "accel_path": the accelerator path 
  217.  
  218.    function Get_Always_Show_Image 
  219.       (Action : not null access Gtk_Action_Record) return Boolean; 
  220.    --  Returns whether Action<!-- -->'s menu item proxies will ignore the 
  221.    --  Gtk.Settings.Gtk_Settings:gtk-menu-images setting and always show their 
  222.    --  image, if available. 
  223.    --  Since: gtk+ 2.20 
  224.  
  225.    procedure Set_Always_Show_Image 
  226.       (Action      : not null access Gtk_Action_Record; 
  227.        Always_Show : Boolean); 
  228.    --  Sets whether Action<!-- -->'s menu item proxies will ignore the 
  229.    --  Gtk.Settings.Gtk_Settings:gtk-menu-images setting and always show their 
  230.    --  image, if available. 
  231.    --  Use this if the menu item would be useless or hard to use without their 
  232.    --  image. 
  233.    --  Since: gtk+ 2.20 
  234.    --  "always_show": True if menuitem proxies should always show their image 
  235.  
  236.    function Get_Gicon 
  237.       (Action : not null access Gtk_Action_Record) return Glib.G_Icon.G_Icon; 
  238.    --  Gets the gicon of Action. 
  239.    --  Since: gtk+ 2.16 
  240.  
  241.    procedure Set_Gicon 
  242.       (Action : not null access Gtk_Action_Record; 
  243.        Icon   : Glib.G_Icon.G_Icon); 
  244.    --  Sets the icon of Action. 
  245.    --  Since: gtk+ 2.16 
  246.    --  "icon": the Glib.G_Icon.G_Icon to set 
  247.  
  248.    function Get_Icon_Name 
  249.       (Action : not null access Gtk_Action_Record) return UTF8_String; 
  250.    --  Gets the icon name of Action. 
  251.    --  Since: gtk+ 2.16 
  252.  
  253.    procedure Set_Icon_Name 
  254.       (Action    : not null access Gtk_Action_Record; 
  255.        Icon_Name : UTF8_String); 
  256.    --  Sets the icon name on Action 
  257.    --  Since: gtk+ 2.16 
  258.    --  "icon_name": the icon name to set 
  259.  
  260.    function Get_Is_Important 
  261.       (Action : not null access Gtk_Action_Record) return Boolean; 
  262.    --  Checks whether Action is important or not 
  263.    --  Since: gtk+ 2.16 
  264.  
  265.    procedure Set_Is_Important 
  266.       (Action       : not null access Gtk_Action_Record; 
  267.        Is_Important : Boolean); 
  268.    --  Sets whether the action is important, this attribute is used primarily 
  269.    --  by toolbar items to decide whether to show a label or not. 
  270.    --  Since: gtk+ 2.16 
  271.    --  "is_important": True to make the action important 
  272.  
  273.    function Get_Label 
  274.       (Action : not null access Gtk_Action_Record) return UTF8_String; 
  275.    --  Gets the label text of Action. 
  276.    --  Since: gtk+ 2.16 
  277.  
  278.    procedure Set_Label 
  279.       (Action : not null access Gtk_Action_Record; 
  280.        Label  : UTF8_String); 
  281.    --  Sets the label of Action. 
  282.    --  Since: gtk+ 2.16 
  283.    --  "label": the label text to set 
  284.  
  285.    function Get_Name 
  286.       (Action : not null access Gtk_Action_Record) return UTF8_String; 
  287.    --  Returns the name of the action. 
  288.    --  Since: gtk+ 2.4 
  289.  
  290.    function Get_Proxies 
  291.       (Action : not null access Gtk_Action_Record) 
  292.        return Gtk.Widget.Widget_SList.GSlist; 
  293.    --  Returns the proxy widgets for an action. See also 
  294.    --  Gtk.Activatable.Get_Related_Action. 
  295.    --  Since: gtk+ 2.4 
  296.  
  297.    function Get_Sensitive 
  298.       (Action : not null access Gtk_Action_Record) return Boolean; 
  299.    --  Returns whether the action itself is sensitive. Note that this doesn't 
  300.    --  necessarily mean effective sensitivity. See Gtk.Action.Is_Sensitive for 
  301.    --  that. 
  302.    --  Since: gtk+ 2.4 
  303.  
  304.    procedure Set_Sensitive 
  305.       (Action    : not null access Gtk_Action_Record; 
  306.        Sensitive : Boolean); 
  307.    --  Sets the ::sensitive property of the action to Sensitive. Note that 
  308.    --  this doesn't necessarily mean effective sensitivity. See 
  309.    --  Gtk.Action.Is_Sensitive for that. 
  310.    --  Since: gtk+ 2.6 
  311.    --  "sensitive": True to make the action sensitive 
  312.  
  313.    function Get_Short_Label 
  314.       (Action : not null access Gtk_Action_Record) return UTF8_String; 
  315.    --  Gets the short label text of Action. 
  316.    --  Since: gtk+ 2.16 
  317.  
  318.    procedure Set_Short_Label 
  319.       (Action      : not null access Gtk_Action_Record; 
  320.        Short_Label : UTF8_String); 
  321.    --  Sets a shorter label text on Action. 
  322.    --  Since: gtk+ 2.16 
  323.    --  "short_label": the label text to set 
  324.  
  325.    function Get_Stock_Id 
  326.       (Action : not null access Gtk_Action_Record) return UTF8_String; 
  327.    --  Gets the stock id of Action. 
  328.    --  Since: gtk+ 2.16 
  329.  
  330.    procedure Set_Stock_Id 
  331.       (Action   : not null access Gtk_Action_Record; 
  332.        Stock_Id : UTF8_String); 
  333.    --  Sets the stock id on Action 
  334.    --  Since: gtk+ 2.16 
  335.    --  "stock_id": the stock id 
  336.  
  337.    function Get_Tooltip 
  338.       (Action : not null access Gtk_Action_Record) return UTF8_String; 
  339.    --  Gets the tooltip text of Action. 
  340.    --  Since: gtk+ 2.16 
  341.  
  342.    procedure Set_Tooltip 
  343.       (Action  : not null access Gtk_Action_Record; 
  344.        Tooltip : UTF8_String); 
  345.    --  Sets the tooltip text on Action 
  346.    --  Since: gtk+ 2.16 
  347.    --  "tooltip": the tooltip text 
  348.  
  349.    function Get_Visible 
  350.       (Action : not null access Gtk_Action_Record) return Boolean; 
  351.    --  Returns whether the action itself is visible. Note that this doesn't 
  352.    --  necessarily mean effective visibility. See Gtk.Action.Is_Sensitive for 
  353.    --  that. 
  354.    --  Since: gtk+ 2.4 
  355.  
  356.    procedure Set_Visible 
  357.       (Action  : not null access Gtk_Action_Record; 
  358.        Visible : Boolean); 
  359.    --  Sets the ::visible property of the action to Visible. Note that this 
  360.    --  doesn't necessarily mean effective visibility. See Gtk.Action.Is_Visible 
  361.    --  for that. 
  362.    --  Since: gtk+ 2.6 
  363.    --  "visible": True to make the action visible 
  364.  
  365.    function Get_Visible_Horizontal 
  366.       (Action : not null access Gtk_Action_Record) return Boolean; 
  367.    --  Checks whether Action is visible when horizontal 
  368.    --  Since: gtk+ 2.16 
  369.  
  370.    procedure Set_Visible_Horizontal 
  371.       (Action             : not null access Gtk_Action_Record; 
  372.        Visible_Horizontal : Boolean); 
  373.    --  Sets whether Action is visible when horizontal 
  374.    --  Since: gtk+ 2.16 
  375.    --  "visible_horizontal": whether the action is visible horizontally 
  376.  
  377.    function Get_Visible_Vertical 
  378.       (Action : not null access Gtk_Action_Record) return Boolean; 
  379.    --  Checks whether Action is visible when horizontal 
  380.    --  Since: gtk+ 2.16 
  381.  
  382.    procedure Set_Visible_Vertical 
  383.       (Action           : not null access Gtk_Action_Record; 
  384.        Visible_Vertical : Boolean); 
  385.    --  Sets whether Action is visible when vertical 
  386.    --  Since: gtk+ 2.16 
  387.    --  "visible_vertical": whether the action is visible vertically 
  388.  
  389.    function Is_Sensitive 
  390.       (Action : not null access Gtk_Action_Record) return Boolean; 
  391.    --  Returns whether the action is effectively sensitive. 
  392.    --  Since: gtk+ 2.4 
  393.  
  394.    function Is_Visible 
  395.       (Action : not null access Gtk_Action_Record) return Boolean; 
  396.    --  Returns whether the action is effectively visible. 
  397.    --  Since: gtk+ 2.4 
  398.  
  399.    procedure Set_Accel_Group 
  400.       (Action      : not null access Gtk_Action_Record; 
  401.        Accel_Group : access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class); 
  402.    --  Sets the Gtk.Accel_Group.Gtk_Accel_Group in which the accelerator for 
  403.    --  this action will be installed. 
  404.    --  Since: gtk+ 2.4 
  405.    --  "accel_group": a Gtk.Accel_Group.Gtk_Accel_Group or null 
  406.  
  407.    procedure Unblock_Activate (Action : not null access Gtk_Action_Record); 
  408.    --  Reenable activation signals from the action 
  409.    --  Since: gtk+ 2.16 
  410.  
  411.    ---------------- 
  412.    -- Properties -- 
  413.    ---------------- 
  414.    --  The following properties are defined for this widget. See 
  415.    --  Glib.Properties for more information on properties) 
  416.  
  417.    Action_Group_Property : constant Glib.Properties.Property_Object; 
  418.    --  Type: Gtk.Action_Group.Gtk_Action_Group 
  419.  
  420.    Always_Show_Image_Property : constant Glib.Properties.Property_Boolean; 
  421.    --  If True, the action's menu item proxies will ignore the 
  422.    --  Gtk.Settings.Gtk_Settings:gtk-menu-images setting and always show their 
  423.    --  image, if available. 
  424.    -- 
  425.    --  Use this property if the menu item would be useless or hard to use 
  426.    --  without their image. 
  427.  
  428.    G_Icon_Property : constant Glib.Properties.Property_Boxed; 
  429.    --  Type: Glib.G_Icon.G_Icon 
  430.    --  The Glib.G_Icon.G_Icon displayed in the Gtk.Action.Gtk_Action. 
  431.    -- 
  432.    --  Note that the stock icon is preferred, if the 
  433.    --  Gtk.Action.Gtk_Action:stock-id property holds the id of an existing 
  434.    --  stock icon. 
  435.    -- 
  436.    --  This is an appearance property and thus only applies if 
  437.    --  Gtk.Activatable.Gtk_Activatable:use-action-appearance is True. 
  438.  
  439.    Hide_If_Empty_Property : constant Glib.Properties.Property_Boolean; 
  440.  
  441.    Icon_Name_Property : constant Glib.Properties.Property_String; 
  442.    --  The name of the icon from the icon theme. 
  443.    -- 
  444.    --  Note that the stock icon is preferred, if the 
  445.    --  Gtk.Action.Gtk_Action:stock-id property holds the id of an existing 
  446.    --  stock icon, and the Glib.G_Icon.G_Icon is preferred if the 
  447.    --  Gtk.Action.Gtk_Action:gicon property is set. 
  448.    -- 
  449.    --  This is an appearance property and thus only applies if 
  450.    --  Gtk.Activatable.Gtk_Activatable:use-action-appearance is True. 
  451.  
  452.    Is_Important_Property : constant Glib.Properties.Property_Boolean; 
  453.  
  454.    Label_Property : constant Glib.Properties.Property_String; 
  455.    --  The label used for menu items and buttons that activate this action. If 
  456.    --  the label is null, GTK+ uses the stock label specified via the stock-id 
  457.    --  property. 
  458.    -- 
  459.    --  This is an appearance property and thus only applies if 
  460.    --  Gtk.Activatable.Gtk_Activatable:use-action-appearance is True. 
  461.  
  462.    Name_Property : constant Glib.Properties.Property_String; 
  463.  
  464.    Sensitive_Property : constant Glib.Properties.Property_Boolean; 
  465.  
  466.    Short_Label_Property : constant Glib.Properties.Property_String; 
  467.    --  A shorter label that may be used on toolbar buttons. 
  468.    -- 
  469.    --  This is an appearance property and thus only applies if 
  470.    --  Gtk.Activatable.Gtk_Activatable:use-action-appearance is True. 
  471.  
  472.    Stock_Id_Property : constant Glib.Properties.Property_String; 
  473.    --  The stock icon displayed in widgets representing this action. 
  474.    -- 
  475.    --  This is an appearance property and thus only applies if 
  476.    --  Gtk.Activatable.Gtk_Activatable:use-action-appearance is True. 
  477.  
  478.    Tooltip_Property : constant Glib.Properties.Property_String; 
  479.  
  480.    Visible_Property : constant Glib.Properties.Property_Boolean; 
  481.  
  482.    Visible_Horizontal_Property : constant Glib.Properties.Property_Boolean; 
  483.  
  484.    Visible_Overflown_Property : constant Glib.Properties.Property_Boolean; 
  485.    --  When True, toolitem proxies for this action are represented in the 
  486.    --  toolbar overflow menu. 
  487.  
  488.    Visible_Vertical_Property : constant Glib.Properties.Property_Boolean; 
  489.  
  490.    ------------- 
  491.    -- Signals -- 
  492.    ------------- 
  493.  
  494.    type Cb_Gtk_Action_Void is not null access procedure (Self : access Gtk_Action_Record'Class); 
  495.  
  496.    type Cb_GObject_Void is not null access procedure 
  497.      (Self : access Glib.Object.GObject_Record'Class); 
  498.  
  499.    Signal_Activate : constant Glib.Signal_Name := "activate"; 
  500.    procedure On_Activate 
  501.       (Self  : not null access Gtk_Action_Record; 
  502.        Call  : Cb_Gtk_Action_Void; 
  503.        After : Boolean := False); 
  504.    procedure On_Activate 
  505.       (Self  : not null access Gtk_Action_Record; 
  506.        Call  : Cb_GObject_Void; 
  507.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  508.        After : Boolean := False); 
  509.    --  The "activate" signal is emitted when the action is activated. 
  510.  
  511.    ---------------- 
  512.    -- Interfaces -- 
  513.    ---------------- 
  514.    --  This class implements several interfaces. See Glib.Types 
  515.    -- 
  516.    --  - "Buildable" 
  517.  
  518.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  519.      (Gtk.Buildable.Gtk_Buildable, Gtk_Action_Record, Gtk_Action); 
  520.    function "+" 
  521.      (Widget : access Gtk_Action_Record'Class) 
  522.    return Gtk.Buildable.Gtk_Buildable 
  523.    renames Implements_Gtk_Buildable.To_Interface; 
  524.    function "-" 
  525.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  526.    return Gtk_Action 
  527.    renames Implements_Gtk_Buildable.To_Object; 
  528.  
  529. private 
  530.    Visible_Vertical_Property : constant Glib.Properties.Property_Boolean := 
  531.      Glib.Properties.Build ("visible-vertical"); 
  532.    Visible_Overflown_Property : constant Glib.Properties.Property_Boolean := 
  533.      Glib.Properties.Build ("visible-overflown"); 
  534.    Visible_Horizontal_Property : constant Glib.Properties.Property_Boolean := 
  535.      Glib.Properties.Build ("visible-horizontal"); 
  536.    Visible_Property : constant Glib.Properties.Property_Boolean := 
  537.      Glib.Properties.Build ("visible"); 
  538.    Tooltip_Property : constant Glib.Properties.Property_String := 
  539.      Glib.Properties.Build ("tooltip"); 
  540.    Stock_Id_Property : constant Glib.Properties.Property_String := 
  541.      Glib.Properties.Build ("stock-id"); 
  542.    Short_Label_Property : constant Glib.Properties.Property_String := 
  543.      Glib.Properties.Build ("short-label"); 
  544.    Sensitive_Property : constant Glib.Properties.Property_Boolean := 
  545.      Glib.Properties.Build ("sensitive"); 
  546.    Name_Property : constant Glib.Properties.Property_String := 
  547.      Glib.Properties.Build ("name"); 
  548.    Label_Property : constant Glib.Properties.Property_String := 
  549.      Glib.Properties.Build ("label"); 
  550.    Is_Important_Property : constant Glib.Properties.Property_Boolean := 
  551.      Glib.Properties.Build ("is-important"); 
  552.    Icon_Name_Property : constant Glib.Properties.Property_String := 
  553.      Glib.Properties.Build ("icon-name"); 
  554.    Hide_If_Empty_Property : constant Glib.Properties.Property_Boolean := 
  555.      Glib.Properties.Build ("hide-if-empty"); 
  556.    G_Icon_Property : constant Glib.Properties.Property_Boxed := 
  557.      Glib.Properties.Build ("gicon"); 
  558.    Always_Show_Image_Property : constant Glib.Properties.Property_Boolean := 
  559.      Glib.Properties.Build ("always-show-image"); 
  560.    Action_Group_Property : constant Glib.Properties.Property_Object := 
  561.      Glib.Properties.Build ("action-group"); 
  562. end Gtk.Action;