1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --                Copyright (C) 2006 AdaCore                         -- 
  5. --                                                                   -- 
  6. -- This library is free software; you can redistribute it and/or     -- 
  7. -- modify it under the terms of the GNU General Public               -- 
  8. -- License as published by the Free Software Foundation; either      -- 
  9. -- version 2 of the License, or (at your option) any later version.  -- 
  10. --                                                                   -- 
  11. -- This library is distributed in the hope that it will be useful,   -- 
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  14. -- General Public License for more details.                          -- 
  15. --                                                                   -- 
  16. -- You should have received a copy of the GNU General Public         -- 
  17. -- License along with this library; if not, write to the             -- 
  18. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  19. -- Boston, MA 02111-1307, USA.                                       -- 
  20. --                                                                   -- 
  21. -- -- -- -- -- -- -- -- -- -- -- --
  22. ----------------------------------------------------------------------- 
  23.  
  24. --  <description> 
  25. --  This package defines a special kind of toggle button that can be inserted 
  26. --  in a toolbar. Such buttons are usually created in groups, and only one of 
  27. --  them can be active at any time 
  28. --  </description> 
  29. --  <c_version>2.8.17</c_version> 
  30. --  <group>Menus and Toolbars</group> 
  31.  
  32. with Glib.Properties; 
  33. with Gtk.Toggle_Tool_Button; 
  34. with Gtk.Widget;             use Gtk.Widget; 
  35.  
  36. package Gtk.Radio_Tool_Button is 
  37.  
  38.    type Gtk_Radio_Tool_Button_Record is 
  39.      new Gtk.Toggle_Tool_Button.Gtk_Toggle_Tool_Button_Record with null record; 
  40.    type Gtk_Radio_Tool_Button is access all Gtk_Radio_Tool_Button_Record'Class; 
  41.  
  42.    procedure Gtk_New 
  43.      (Radio  : out Gtk_Radio_Tool_Button; 
  44.       Group  : Widget_SList.GSlist := Widget_SList.Null_List); 
  45.    procedure Initialize 
  46.      (Radio  : access Gtk_Radio_Tool_Button_Record'Class; 
  47.       Group  : Widget_SList.GSlist := Widget_SList.Null_List); 
  48.    --  Create or initialize a new radio button, belonging to Group. 
  49.    --  A new group is created if Group is unspecified 
  50.  
  51.    procedure Gtk_New_From_Stock 
  52.      (Radio    : out Gtk_Radio_Tool_Button; 
  53.       Group    : Widget_SList.GSlist := Widget_SList.Null_List; 
  54.       Stock_Id : String); 
  55.    procedure Initialize_From_Stock 
  56.      (Radio    : access Gtk_Radio_Tool_Button_Record'Class; 
  57.       Group    : Widget_SList.GSlist := Widget_SList.Null_List; 
  58.       Stock_Id : String); 
  59.    --  Create or initialize a new radio button, that will contain a text and 
  60.    --  icon specified by Stock_Id 
  61.  
  62.    procedure Gtk_New_From_Widget 
  63.      (Radio  : out Gtk_Radio_Tool_Button; 
  64.       Group  : access Gtk_Radio_Tool_Button_Record'Class); 
  65.    procedure Initialize_From_Widget 
  66.      (Radio  : access Gtk_Radio_Tool_Button_Record'Class; 
  67.       Group  : access Gtk_Radio_Tool_Button_Record'Class); 
  68.    --  Create or initialize a new button belonging to the same group as Group. 
  69.  
  70.    procedure Gtk_New_With_Stock_From_Widget 
  71.      (Radio    : out Gtk_Radio_Tool_Button; 
  72.       Group    : access Gtk_Radio_Tool_Button_Record'Class; 
  73.       Stock_Id : String); 
  74.    procedure Initialize_With_Stock_From_Widget 
  75.      (Radio    : access Gtk_Radio_Tool_Button_Record'Class; 
  76.       Group    : access Gtk_Radio_Tool_Button_Record'Class; 
  77.       Stock_Id : String); 
  78.    --  Create or initialize a new radio button, that will contain a text and 
  79.    --  icon specified by Stock_Id. 
  80.    --  The button belongs to the same group as Group. 
  81.  
  82.    procedure Set_Group 
  83.      (Button : access Gtk_Radio_Tool_Button_Record; 
  84.       Group  : Widget_SList.GSlist); 
  85.    --  Change the group to which the button belongs 
  86.  
  87.    function Get_Group 
  88.      (Button : access Gtk_Radio_Tool_Button_Record) return Widget_SList.GSlist; 
  89.    --  Return the group to which the button belongs 
  90.  
  91.    function Get_Type return GType; 
  92.    --  Return the internal type used for this class of widgets 
  93.  
  94.    ---------------- 
  95.    -- Properties -- 
  96.    ---------------- 
  97.  
  98.    --  <properties> 
  99.    --  The following properties are defined for this widget. See 
  100.    --  Glib.Properties for more information on properties. 
  101.    -- 
  102.    --  Name: Group_Property 
  103.    --  Type: Object 
  104.    --  See : Set_Group / Get_Group 
  105.    -- 
  106.    --  </properties> 
  107.  
  108.    Group_Property : constant Glib.Properties.Property_Object; 
  109.  
  110. private 
  111.    Group_Property : constant Glib.Properties.Property_Object := 
  112.      Glib.Properties.Build ("group"); 
  113.    pragma Import (C, Get_Type, "gtk_radio_tool_button_get_type"); 
  114.  
  115. end Gtk.Radio_Tool_Button;