------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008 Vadim Godunko <vgodunko@gmail.com>                      --
--                                                                          --
-- QtAda is free software;  you can  redistribute it and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License distributed with QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
with Qt4.Actions;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Tool_Bar_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Tool_Bar_Proxies);
--  Elaboration of the proxy tagged type package register proxy object
--  constructor. Bindings must be able to create proxy object of the
--  corresponding tagged type for works properly.

package body Qt4.Tool_Bars is

   function actionAt_1_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     P : not null access constant Qt4.Points.Internals.QPoint)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, actionAt_1_wrapper,
                     "__Qt4Ada_QToolBar_actionAt_1_wrapper");

   function actionAt_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     X : Qt4.Q_Integer;
     Y : Qt4.Q_Integer)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, actionAt_0_wrapper,
                     "__Qt4Ada_QToolBar_actionAt_0_wrapper");

   function addAction_2_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addAction_2_wrapper,
                     "__Qt4Ada_QToolBar_addAction_2_wrapper");

   function addAction_1_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Icon : not null access constant Qt4.Icons.Internals.QIcon;
     Text : not null access constant Qt4.Strings.Internals.QString)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addAction_1_wrapper,
                     "__Qt4Ada_QToolBar_addAction_1_wrapper");

   function addSeparator_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addSeparator_0_wrapper,
                     "__Qt4Ada_QToolBar_addSeparator_0_wrapper");

   function addWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Before : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addWidget_0_wrapper,
                     "__Qt4Ada_QToolBar_addWidget_0_wrapper");

   procedure clear_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, clear_0_wrapper,
                     "__Qt4Ada_QToolBar_clear_0_wrapper");

   procedure iconSize_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Sizes.Internals.QSize);
   pragma Import (C, iconSize_0_wrapper,
                     "__Qt4Ada_QToolBar_iconSize_0_wrapper");

   function insertSeparator_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Before : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, insertSeparator_0_wrapper,
                     "__Qt4Ada_QToolBar_insertSeparator_0_wrapper");

   function insertWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Before : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, insertWidget_0_wrapper,
                     "__Qt4Ada_QToolBar_insertWidget_0_wrapper");

   function isMovable_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, isMovable_0_wrapper,
                     "__Qt4Ada_QToolBar_isMovable_0_wrapper");

   procedure setMovable_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Movable : Qt4.bool);
   pragma Import (C, setMovable_0_wrapper,
                     "__Qt4Ada_QToolBar_setMovable_0_wrapper");

   function toggleViewAction_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, toggleViewAction_0_wrapper,
                     "__Qt4Ada_QToolBar_toggleViewAction_0_wrapper");

   function widgetForAction_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Action : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, widgetForAction_0_wrapper,
                     "__Qt4Ada_QToolBar_widgetForAction_0_wrapper");

   procedure setIconSize_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Icon_Size : not null access constant Qt4.Sizes.Internals.QSize);
   pragma Import (C, setIconSize_0_wrapper,
                     "__Qt4Ada_QToolBar_setIconSize_0_wrapper");

   pragma Style_Checks ("N");

   ---------------
   -- Action_At --
   ---------------

   function Action_At
    (Self : not null access constant Q_Tool_Bar'Class;
     P : Qt4.Points.Q_Point)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (actionAt_1_wrapper
             (Self.QObject_View,
              Qt4.Points.Internals.QPoint_View (P))).all)'Access;
   end Action_At;

   ---------------
   -- Action_At --
   ---------------

   function Action_At
    (Self : not null access constant Q_Tool_Bar'Class;
     X : Qt4.Q_Integer;
     Y : Qt4.Q_Integer)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (actionAt_0_wrapper
             (Self.QObject_View,
              X,
              Y)).all)'Access;
   end Action_At;

   ----------------
   -- Add_Action --
   ----------------

   function Add_Action
    (Self : not null access Q_Tool_Bar'Class;
     Text : Qt4.Strings.Q_String)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addAction_2_wrapper
             (Self.QObject_View,
              Qt4.Strings.Internals.QString_View (Text))).all)'Access;
   end Add_Action;

   ----------------
   -- Add_Action --
   ----------------

   function Add_Action
    (Self : not null access Q_Tool_Bar'Class;
     Icon : Qt4.Icons.Q_Icon;
     Text : Qt4.Strings.Q_String)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addAction_1_wrapper
             (Self.QObject_View,
              Qt4.Icons.Internals.QIcon_View (Icon),
              Qt4.Strings.Internals.QString_View (Text))).all)'Access;
   end Add_Action;

   -------------------
   -- Add_Separator --
   -------------------

   function Add_Separator
    (Self : not null access Q_Tool_Bar'Class)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addSeparator_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Add_Separator;

   ----------------
   -- Add_Widget --
   ----------------

   function Add_Widget
    (Self : not null access Q_Tool_Bar'Class;
     Before : not null access Qt4.Widgets.Q_Widget'Class)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addWidget_0_wrapper
             (Self.QObject_View,
              Before.QObject_View)).all)'Access;
   end Add_Widget;

   -----------
   -- Clear --
   -----------

   procedure Clear
    (Self : not null access Q_Tool_Bar'Class)
   is
   begin
      clear_0_wrapper
       (Self.QObject_View);
   end Clear;

   ---------------
   -- Icon_Size --
   ---------------

   function Icon_Size
    (Self : not null access constant Q_Tool_Bar'Class)
       return Qt4.Sizes.Q_Size
   is
      Returns : Qt4.Sizes.Q_Size;

   begin
      iconSize_0_wrapper
       (Self.QObject_View,
        Qt4.Sizes.Internals.QSize_View (Returns));

      return Returns;
   end Icon_Size;

   ----------------------
   -- Insert_Separator --
   ----------------------

   function Insert_Separator
    (Self : not null access Q_Tool_Bar'Class;
     Before : not null access Qt4.Actions.Q_Action'Class)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (insertSeparator_0_wrapper
             (Self.QObject_View,
              Before.QObject_View)).all)'Access;
   end Insert_Separator;

   -------------------
   -- Insert_Widget --
   -------------------

   function Insert_Widget
    (Self : not null access Q_Tool_Bar'Class;
     Before : not null access Qt4.Actions.Q_Action'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (insertWidget_0_wrapper
             (Self.QObject_View,
              Before.QObject_View,
              Widget.QObject_View)).all)'Access;
   end Insert_Widget;

   ----------------
   -- Is_Movable --
   ----------------

   function Is_Movable
    (Self : not null access constant Q_Tool_Bar'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isMovable_0_wrapper
           (Self.QObject_View));
   end Is_Movable;

   -----------------
   -- Set_Movable --
   -----------------

   procedure Set_Movable
    (Self : not null access Q_Tool_Bar'Class;
     Movable : Standard.Boolean)
   is
   begin
      setMovable_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Movable));
   end Set_Movable;

   ------------------------
   -- Toggle_View_Action --
   ------------------------

   function Toggle_View_Action
    (Self : not null access constant Q_Tool_Bar'Class)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (toggleViewAction_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Toggle_View_Action;

   -----------------------
   -- Widget_For_Action --
   -----------------------

   function Widget_For_Action
    (Self : not null access constant Q_Tool_Bar'Class;
     Action : not null access Qt4.Actions.Q_Action'Class)
       return not null access Qt4.Widgets.Q_Widget'Class
   is
   begin
      return
        Qt4.Widgets.Q_Widget'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (widgetForAction_0_wrapper
             (Self.QObject_View,
              Action.QObject_View)).all)'Access;
   end Widget_For_Action;

   -------------------
   -- Set_Icon_Size --
   -------------------

   procedure Set_Icon_Size
    (Self : not null access Q_Tool_Bar'Class;
     Icon_Size : Qt4.Sizes.Q_Size)
   is
   begin
      setIconSize_0_wrapper
       (Self.QObject_View,
        Qt4.Sizes.Internals.QSize_View (Icon_Size));
   end Set_Icon_Size;

end Qt4.Tool_Bars;
