------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008-2010 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.Widgets;
with Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Box_Layout_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Box_Layout_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.Box_Layouts is

   procedure addLayout_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Layout : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, addLayout_0_wrapper,
                     "__Qt4Ada_QBoxLayout_addLayout_0_wrapper");

   procedure addSpacing_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Size : Qt4.Q_Integer);
   pragma Import (C, addSpacing_0_wrapper,
                     "__Qt4Ada_QBoxLayout_addSpacing_0_wrapper");

   procedure addStretch_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, addStretch_0_wrapper,
                     "__Qt4Ada_QBoxLayout_addStretch_0_wrapper");

   procedure addStrut_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Size : Qt4.Q_Integer);
   pragma Import (C, addStrut_0_wrapper,
                     "__Qt4Ada_QBoxLayout_addStrut_0_wrapper");

   procedure insertLayout_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Layout : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, insertLayout_0_wrapper,
                     "__Qt4Ada_QBoxLayout_insertLayout_0_wrapper");

   procedure insertSpacing_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Size : Qt4.Q_Integer);
   pragma Import (C, insertSpacing_0_wrapper,
                     "__Qt4Ada_QBoxLayout_insertSpacing_0_wrapper");

   procedure insertStretch_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, insertStretch_0_wrapper,
                     "__Qt4Ada_QBoxLayout_insertStretch_0_wrapper");

   function setStretchFactor_1_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     W : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer)
       return Qt4.bool;
   pragma Import (C, setStretchFactor_1_wrapper,
                     "__Qt4Ada_QBoxLayout_setStretchFactor_1_wrapper");

   function setStretchFactor_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     L : not null access Qt_Ada.Internals.Objects.QObject;
     Stretch : Qt4.Q_Integer)
       return Qt4.bool;
   pragma Import (C, setStretchFactor_0_wrapper,
                     "__Qt4Ada_QBoxLayout_setStretchFactor_0_wrapper");

   procedure setGeometry_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     R : not null access constant Qt4.Rects.Internals.QRect);
   pragma Import (C, setGeometry_0_wrapper,
                     "__Qt4Ada_QBoxLayout_setGeometry_0_wrapper");

   pragma Style_Checks ("N");

   ----------------
   -- Add_Layout --
   ----------------

   procedure Add_Layout
    (Self : not null access Q_Box_Layout'Class;
     Layout : not null access Qt4.Layouts.Q_Layout'Class;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      addLayout_0_wrapper
       (Self.QObject_View,
        Layout.QObject_View,
        Stretch);
   end Add_Layout;

   -----------------
   -- Add_Spacing --
   -----------------

   procedure Add_Spacing
    (Self : not null access Q_Box_Layout'Class;
     Size : Qt4.Q_Integer)
   is
   begin
      addSpacing_0_wrapper
       (Self.QObject_View,
        Size);
   end Add_Spacing;

   -----------------
   -- Add_Stretch --
   -----------------

   procedure Add_Stretch
    (Self : not null access Q_Box_Layout'Class;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      addStretch_0_wrapper
       (Self.QObject_View,
        Stretch);
   end Add_Stretch;

   ---------------
   -- Add_Strut --
   ---------------

   procedure Add_Strut
    (Self : not null access Q_Box_Layout'Class;
     Size : Qt4.Q_Integer)
   is
   begin
      addStrut_0_wrapper
       (Self.QObject_View,
        Size);
   end Add_Strut;

   -------------------
   -- Insert_Layout --
   -------------------

   procedure Insert_Layout
    (Self : not null access Q_Box_Layout'Class;
     Index : Qt4.Q_Integer;
     Layout : not null access Qt4.Layouts.Q_Layout'Class;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      insertLayout_0_wrapper
       (Self.QObject_View,
        Index,
        Layout.QObject_View,
        Stretch);
   end Insert_Layout;

   --------------------
   -- Insert_Spacing --
   --------------------

   procedure Insert_Spacing
    (Self : not null access Q_Box_Layout'Class;
     Index : Qt4.Q_Integer;
     Size : Qt4.Q_Integer)
   is
   begin
      insertSpacing_0_wrapper
       (Self.QObject_View,
        Index,
        Size);
   end Insert_Spacing;

   --------------------
   -- Insert_Stretch --
   --------------------

   procedure Insert_Stretch
    (Self : not null access Q_Box_Layout'Class;
     Index : Qt4.Q_Integer;
     Stretch : Qt4.Q_Integer
       :=  0)
   is
   begin
      insertStretch_0_wrapper
       (Self.QObject_View,
        Index,
        Stretch);
   end Insert_Stretch;

   ------------------------
   -- Set_Stretch_Factor --
   ------------------------

   function Set_Stretch_Factor
    (Self : not null access Q_Box_Layout'Class;
     W : not null access Qt4.Widgets.Q_Widget'Class;
     Stretch : Qt4.Q_Integer)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (setStretchFactor_1_wrapper
           (Self.QObject_View,
            W.QObject_View,
            Stretch));
   end Set_Stretch_Factor;

   ------------------------
   -- Set_Stretch_Factor --
   ------------------------

   function Set_Stretch_Factor
    (Self : not null access Q_Box_Layout'Class;
     L : not null access Qt4.Layouts.Q_Layout'Class;
     Stretch : Qt4.Q_Integer)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (setStretchFactor_0_wrapper
           (Self.QObject_View,
            L.QObject_View,
            Stretch));
   end Set_Stretch_Factor;

   ------------------
   -- Set_Geometry --
   ------------------

   procedure Set_Geometry
    (Self : not null access Q_Box_Layout'Class;
     R : Qt4.Rects.Q_Rect)
   is
   begin
      setGeometry_0_wrapper
       (Self.QObject_View,
        Qt4.Rects.Internals.QRect_View (R));
   end Set_Geometry;

end Qt4.Box_Layouts;
