------------------------------------------------------------------------------
--                                                                          --
--                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 Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Grid_Layout_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Grid_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.Grid_Layouts is

   procedure cellRect_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer;
     Returns : not null access Qt4.Rects.Internals.QRect);
   pragma Import (C, cellRect_0_wrapper,
                     "__Qt4Ada_QGridLayout_cellRect_0_wrapper");

   function columnCount_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer;
   pragma Import (C, columnCount_0_wrapper,
                     "__Qt4Ada_QGridLayout_columnCount_0_wrapper");

   function columnMinimumWidth_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer)
       return Qt4.Q_Integer;
   pragma Import (C, columnMinimumWidth_0_wrapper,
                     "__Qt4Ada_QGridLayout_columnMinimumWidth_0_wrapper");

   function columnStretch_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer)
       return Qt4.Q_Integer;
   pragma Import (C, columnStretch_0_wrapper,
                     "__Qt4Ada_QGridLayout_columnStretch_0_wrapper");

   function rowCount_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer;
   pragma Import (C, rowCount_0_wrapper,
                     "__Qt4Ada_QGridLayout_rowCount_0_wrapper");

   function rowMinimumHeight_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer)
       return Qt4.Q_Integer;
   pragma Import (C, rowMinimumHeight_0_wrapper,
                     "__Qt4Ada_QGridLayout_rowMinimumHeight_0_wrapper");

   function rowStretch_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer)
       return Qt4.Q_Integer;
   pragma Import (C, rowStretch_0_wrapper,
                     "__Qt4Ada_QGridLayout_rowStretch_0_wrapper");

   procedure setColumnMinimumWidth_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Column : Qt4.Q_Integer;
     Min_Size : Qt4.Q_Integer);
   pragma Import (C, setColumnMinimumWidth_0_wrapper,
                     "__Qt4Ada_QGridLayout_setColumnMinimumWidth_0_wrapper");

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

   procedure setRowMinimumHeight_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Row : Qt4.Q_Integer;
     Min_Size : Qt4.Q_Integer);
   pragma Import (C, setRowMinimumHeight_0_wrapper,
                     "__Qt4Ada_QGridLayout_setRowMinimumHeight_0_wrapper");

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

   procedure addLayout_wrapper
    (Self      : not null access Qt_Ada.Internals.Objects.QObject;
     Layout    : not null access Qt_Ada.Internals.Objects.QObject;
     Row       : Interfaces.C.int;
     Column    : Interfaces.C.int;
     Alignment : Qt4.Alignment);
   pragma Import
    (C, addLayout_wrapper, "__Qt4Ada_QGridLayout_addLayout_wrapper");

   procedure addWidget_wrapper
    (Self      : not null access Qt_Ada.Internals.Objects.QObject;
     Widget    : not null access Qt_Ada.Internals.Objects.QObject;
     Row       : Interfaces.C.int;
     Column    : Interfaces.C.int;
     Alignment : Qt4.Alignment);
   pragma Import
    (C, addWidget_wrapper, "__Qt4Ada_QGridLayout_addWidget_wrapper");

   procedure addWidget_with_multiply_rows_columns_wrapper
    (Self        : not null access Qt_Ada.Internals.Objects.QObject;
     Widget      : not null access Qt_Ada.Internals.Objects.QObject;
     From_Row    : Interfaces.C.int;
     From_Column : Interfaces.C.int;
     Row_Span    : Interfaces.C.int;
     Column_Span : Interfaces.C.int;
     Alignment   : Qt4.Alignment);
   pragma Import
    (C,
     addWidget_with_multiply_rows_columns_wrapper,
     "__Qt4Ada_QGridLayout_addWidget_with_multiply_rows_columns_wrapper");

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

   procedure Add_Layout
    (Self      : not null access Q_Grid_Layout'Class;
     Layout    : not null access Qt4.Layouts.Q_Layout'Class;
     Row       : Qt4.Q_Integer;
     Column    : Qt4.Q_Integer;
     Alignment : Qt4.Alignment := +Qt4.Align_Default)
   is
   begin
      addLayout_wrapper
       (Self.QObject_View,
        Qt_Ada.Internals.Objects.Q_Object_Base'Class (Layout.all).QObject_View,
        Interfaces.C.int (Row),
        Interfaces.C.int (Column),
        Alignment);
   end Add_Layout;

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

   procedure Add_Widget
    (Self      : not null access Q_Grid_Layout'Class;
     Widget    : not null access Qt4.Widgets.Q_Widget'Class;
     Row       : Qt4.Q_Integer;
     Column    : Qt4.Q_Integer;
     Alignment : Qt4.Alignment := +Qt4.Align_Default)
   is
   begin
      addWidget_wrapper
       (Qt_Ada.Internals.Objects.Q_Object_Base'Class (Self.all).QObject_View,
        Qt_Ada.Internals.Objects.Q_Object_Base'Class (Widget.all).QObject_View,
        Interfaces.C.int (Row),
        Interfaces.C.int (Column),
        Alignment);
   end Add_Widget;

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

   procedure Add_Widget
   (Self        : not null access Q_Grid_Layout'Class;
    Widget      : not null access Qt4.Widgets.Q_Widget'Class;
    From_Row    : Qt4.Q_Integer;
    From_Column : Qt4.Q_Integer;
    Row_Span    : Qt4.Q_Integer;
    Column_Span : Qt4.Q_Integer;
    Alignment   : Qt4.Alignment := +Qt4.Align_Default)
   is
   begin
      addWidget_with_multiply_rows_columns_wrapper
       (Self.QObject_View,
        Qt_Ada.Internals.Objects.Q_Object_Base'Class (Widget.all).QObject_View,
        Interfaces.C.int (From_Row),
        Interfaces.C.int (From_Column),
        Interfaces.C.int (Row_Span),
        Interfaces.C.int (Column_Span),
        Alignment);
   end Add_Widget;

   pragma Style_Checks ("N");

   ---------------
   -- Cell_Rect --
   ---------------

   function Cell_Rect
    (Self : not null access constant Q_Grid_Layout'Class;
     Row : Qt4.Q_Integer;
     Column : Qt4.Q_Integer)
       return Qt4.Rects.Q_Rect
   is
      Returns : Qt4.Rects.Q_Rect;

   begin
      cellRect_0_wrapper
       (Self.QObject_View,
        Row,
        Column,
        Qt4.Rects.Internals.QRect_View (Returns));

      return Returns;
   end Cell_Rect;

   ------------------
   -- Column_Count --
   ------------------

   function Column_Count
    (Self : not null access constant Q_Grid_Layout'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        columnCount_0_wrapper
         (Self.QObject_View);
   end Column_Count;

   --------------------------
   -- Column_Minimum_Width --
   --------------------------

   function Column_Minimum_Width
    (Self : not null access constant Q_Grid_Layout'Class;
     Column : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        columnMinimumWidth_0_wrapper
         (Self.QObject_View,
          Column);
   end Column_Minimum_Width;

   --------------------
   -- Column_Stretch --
   --------------------

   function Column_Stretch
    (Self : not null access constant Q_Grid_Layout'Class;
     Column : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        columnStretch_0_wrapper
         (Self.QObject_View,
          Column);
   end Column_Stretch;

   ---------------
   -- Row_Count --
   ---------------

   function Row_Count
    (Self : not null access constant Q_Grid_Layout'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        rowCount_0_wrapper
         (Self.QObject_View);
   end Row_Count;

   ------------------------
   -- Row_Minimum_Height --
   ------------------------

   function Row_Minimum_Height
    (Self : not null access constant Q_Grid_Layout'Class;
     Row : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        rowMinimumHeight_0_wrapper
         (Self.QObject_View,
          Row);
   end Row_Minimum_Height;

   -----------------
   -- Row_Stretch --
   -----------------

   function Row_Stretch
    (Self : not null access constant Q_Grid_Layout'Class;
     Row : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        rowStretch_0_wrapper
         (Self.QObject_View,
          Row);
   end Row_Stretch;

   ------------------------------
   -- Set_Column_Minimum_Width --
   ------------------------------

   procedure Set_Column_Minimum_Width
    (Self : not null access Q_Grid_Layout'Class;
     Column : Qt4.Q_Integer;
     Min_Size : Qt4.Q_Integer)
   is
   begin
      setColumnMinimumWidth_0_wrapper
       (Self.QObject_View,
        Column,
        Min_Size);
   end Set_Column_Minimum_Width;

   ------------------------
   -- Set_Column_Stretch --
   ------------------------

   procedure Set_Column_Stretch
    (Self : not null access Q_Grid_Layout'Class;
     Column : Qt4.Q_Integer;
     Stretch : Qt4.Q_Integer)
   is
   begin
      setColumnStretch_0_wrapper
       (Self.QObject_View,
        Column,
        Stretch);
   end Set_Column_Stretch;

   ----------------------------
   -- Set_Row_Minimum_Height --
   ----------------------------

   procedure Set_Row_Minimum_Height
    (Self : not null access Q_Grid_Layout'Class;
     Row : Qt4.Q_Integer;
     Min_Size : Qt4.Q_Integer)
   is
   begin
      setRowMinimumHeight_0_wrapper
       (Self.QObject_View,
        Row,
        Min_Size);
   end Set_Row_Minimum_Height;

   ---------------------
   -- Set_Row_Stretch --
   ---------------------

   procedure Set_Row_Stretch
    (Self : not null access Q_Grid_Layout'Class;
     Row : Qt4.Q_Integer;
     Stretch : Qt4.Q_Integer)
   is
   begin
      setRowStretch_0_wrapper
       (Self.QObject_View,
        Row,
        Stretch);
   end Set_Row_Stretch;

end Qt4.Grid_Layouts;
