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. -- As a special exception, if other files instantiate generics from  -- 
  22. -- this unit, or you link this unit with other files to produce an   -- 
  23. -- executable, this  unit  does not  by itself cause  the resulting  -- 
  24. -- executable to be covered by the GNU General Public License. This  -- 
  25. -- exception does not however invalidate any other reasons why the   -- 
  26. -- executable file  might be covered by the  GNU Public License.     -- 
  27. ----------------------------------------------------------------------- 
  28.  
  29. --  <description> 
  30. --  This package defines a special kind of toggle button that can be inserted 
  31. --  in a toolbar. Such buttons are usually created in groups, and only one of 
  32. --  them can be active at any time 
  33. --  </description> 
  34. --  <c_version>2.8.17</c_version> 
  35. --  <group>Menus and Toolbars</group> 
  36.  
  37. with Glib.Properties; 
  38. with Gtk.Toggle_Tool_Button; 
  39. with Gtk.Widget;             use Gtk.Widget; 
  40.  
  41. package Gtk.Radio_Tool_Button is 
  42.  
  43.    type Gtk_Radio_Tool_Button_Record is 
  44.      new Gtk.Toggle_Tool_Button.Gtk_Toggle_Tool_Button_Record with null record; 
  45.    type Gtk_Radio_Tool_Button is access all Gtk_Radio_Tool_Button_Record'Class; 
  46.  
  47.    procedure Gtk_New 
  48.      (Radio  : out Gtk_Radio_Tool_Button; 
  49.       Group  : Widget_SList.GSlist := Widget_SList.Null_List); 
  50.    procedure Initialize 
  51.      (Radio  : access Gtk_Radio_Tool_Button_Record'Class; 
  52.       Group  : Widget_SList.GSlist := Widget_SList.Null_List); 
  53.    --  Create or initialize a new radio button, belonging to Group. 
  54.    --  A new group is created if Group is unspecified 
  55.  
  56.    procedure Gtk_New_From_Stock 
  57.      (Radio    : out Gtk_Radio_Tool_Button; 
  58.       Group    : Widget_SList.GSlist := Widget_SList.Null_List; 
  59.       Stock_Id : String); 
  60.    procedure Initialize_From_Stock 
  61.      (Radio    : access Gtk_Radio_Tool_Button_Record'Class; 
  62.       Group    : Widget_SList.GSlist := Widget_SList.Null_List; 
  63.       Stock_Id : String); 
  64.    --  Create or initialize a new radio button, that will contain a text and 
  65.    --  icon specified by Stock_Id 
  66.  
  67.    procedure Gtk_New_From_Widget 
  68.      (Radio  : out Gtk_Radio_Tool_Button; 
  69.       Group  : access Gtk_Radio_Tool_Button_Record'Class); 
  70.    procedure Initialize_From_Widget 
  71.      (Radio  : access Gtk_Radio_Tool_Button_Record'Class; 
  72.       Group  : access Gtk_Radio_Tool_Button_Record'Class); 
  73.    --  Create or initialize a new button belonging to the same group as Group. 
  74.  
  75.    procedure Gtk_New_With_Stock_From_Widget 
  76.      (Radio    : out Gtk_Radio_Tool_Button; 
  77.       Group    : access Gtk_Radio_Tool_Button_Record'Class; 
  78.       Stock_Id : String); 
  79.    procedure Initialize_With_Stock_From_Widget 
  80.      (Radio    : access Gtk_Radio_Tool_Button_Record'Class; 
  81.       Group    : access Gtk_Radio_Tool_Button_Record'Class; 
  82.       Stock_Id : String); 
  83.    --  Create or initialize a new radio button, that will contain a text and 
  84.    --  icon specified by Stock_Id. 
  85.    --  The button belongs to the same group as Group. 
  86.  
  87.    procedure Set_Group 
  88.      (Button : access Gtk_Radio_Tool_Button_Record; 
  89.       Group  : Widget_SList.GSlist); 
  90.    --  Change the group to which the button belongs 
  91.  
  92.    function Get_Group 
  93.      (Button : access Gtk_Radio_Tool_Button_Record) return Widget_SList.GSlist; 
  94.    --  Return the group to which the button belongs 
  95.  
  96.    function Get_Type return GType; 
  97.    --  Return the internal type used for this class of widgets 
  98.  
  99.    ---------------- 
  100.    -- Properties -- 
  101.    ---------------- 
  102.  
  103.    --  <properties> 
  104.    --  The following properties are defined for this widget. See 
  105.    --  Glib.Properties for more information on properties. 
  106.    -- 
  107.    --  Name: Group_Property 
  108.    --  Type: Object 
  109.    --  See : Set_Group / Get_Group 
  110.    -- 
  111.    --  </properties> 
  112.  
  113.    Group_Property : constant Glib.Properties.Property_Object; 
  114.  
  115. private 
  116.    Group_Property : constant Glib.Properties.Property_Object := 
  117.      Glib.Properties.Build ("group"); 
  118.    pragma Import (C, Get_Type, "gtk_radio_tool_button_get_type"); 
  119.  
  120. end Gtk.Radio_Tool_Button;