------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008, 2009 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.Child_Events;
with Qt4.Events;
with Qt4.Timer_Events;
with Qt4.Widgets;
with Qt_Ada.Internals.Events;
with Qt_Ada.Internals.Object_Registry;
pragma Elaborate (Qt_Ada.Internals.Object_Registry);
with Qt_Ada.Internals.Objects;
with Qt_Ada.Internals.Objects.Object_Utilities;

package body Qt4.Layouts.Directors is

   function qt_metacall_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Kind : Qt4.Meta_Objects.Call;
     Id   : Qt4.Q_Integer;
     Args : Qt4.Address_Pointer)
       return Qt4.Q_Integer;
   pragma Import (C, qt_metacall_wrapper,
                  "__Qt4Ada_QLayout_qt_metacall_wrapper");

   function qt_metacast_wrapper
    (Self  : not null access Qt_Ada.Internals.Objects.QObject;
     Class : Interfaces.C.char_array)
       return System.Address;
   pragma Import (C, qt_metacast_wrapper,
                  "__Qt4Ada_QLayout_qt_metacast_wrapper");

   procedure addItem_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Item : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem);
   pragma Export (C, addItem_0_dispatch,
                     "__Qt4Ada_QLayout_addItem_0_dispatch");
   pragma Warnings (Off, addItem_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function count_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer;
   pragma Export (C, count_0_dispatch,
                     "__Qt4Ada_QLayout_count_0_dispatch");
   pragma Warnings (Off, count_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function indexOf_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Widget : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer;
   pragma Export (C, indexOf_0_dispatch,
                     "__Qt4Ada_QLayout_indexOf_0_dispatch");
   pragma Warnings (Off, indexOf_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

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

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

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

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

   procedure childEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, childEvent_0_wrapper,
                     "__Qt4Ada_QLayout_childEvent_0_wrapper");

   procedure customEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, customEvent_0_wrapper,
                     "__Qt4Ada_QLayout_customEvent_0_wrapper");

   procedure timerEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, timerEvent_0_wrapper,
                     "__Qt4Ada_QLayout_timerEvent_0_wrapper");

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

   function hasHeightForWidth_0_wrapper
    (Self : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem)
       return Qt4.bool;
   pragma Import (C, hasHeightForWidth_0_wrapper,
                     "__Qt4Ada_QLayoutItem_hasHeightForWidth_0_wrapper");

   function heightForWidth_0_wrapper
    (Self : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem;
     W : Qt4.Q_Integer)
       return Qt4.Q_Integer;
   pragma Import (C, heightForWidth_0_wrapper,
                     "__Qt4Ada_QLayoutItem_heightForWidth_0_wrapper");

   procedure invalidate_0_wrapper
    (Self : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem);
   pragma Import (C, invalidate_0_wrapper,
                     "__Qt4Ada_QLayoutItem_invalidate_0_wrapper");

   function layout_0_wrapper
    (Self : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, layout_0_wrapper,
                     "__Qt4Ada_QLayoutItem_layout_0_wrapper");

   function minimumHeightForWidth_0_wrapper
    (Self : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem;
     W : Qt4.Q_Integer)
       return Qt4.Q_Integer;
   pragma Import (C, minimumHeightForWidth_0_wrapper,
                     "__Qt4Ada_QLayoutItem_minimumHeightForWidth_0_wrapper");

   function widget_0_wrapper
    (Self : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, widget_0_wrapper,
                     "__Qt4Ada_QLayoutItem_widget_0_wrapper");

   function expandingDirections_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Orientations;
   pragma Export (C,
                  expandingDirections_dispatch,
                  "__Qt4Ada_QLayout_expandingDirections_dispatch");
   pragma Warnings (Off, expandingDirections_dispatch);

   function expandingDirections_wrapper
    (This : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Orientations;
   pragma Import (C,
                  expandingDirections_wrapper,
                  "__Qt4Ada_QLayout_expandingDirections_wrapper");

   --------------------------
   -- Expanding_Directions --
   --------------------------

   function Expanding_Directions
    (Self : not null access constant Q_Layout_Director)
       return Qt4.Orientations
   is
   begin
      return expandingDirections_wrapper (Self.QObject_View);
   end Expanding_Directions;

   ----------------------------------
   -- expandingDirections_dispatch --
   ----------------------------------

   function expandingDirections_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Orientations
   is
   begin
      return Q_Layout_Director'Class (Self.all).Expanding_Directions;
   end expandingDirections_dispatch;

   ----------------------
   -- QLayoutItem_View --
   ----------------------

   overriding
   function QLayoutItem_View
    (Self : not null access constant Q_Layout_Director)
       return not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem
   is
   begin
      raise Program_Error;
      return new Qt4.Layout_Items.Impl.Thin.QLayoutItem;
   end QLayoutItem_View;

   pragma Style_Checks ("N");

   ------------------------
   -- addItem_0_dispatch --
   ------------------------

   procedure addItem_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Item : not null access Qt4.Layout_Items.Impl.Thin.QLayoutItem)
   is
   begin
      Q_Layout_Director'Class (Self.all).Add_Item
       (Qt4.Layout_Items.Q_Layout_Item'Class (Qt4.Layout_Items.Impl.Internals.Create_Wrapper (Item).all)'Access);
   end addItem_0_dispatch;

   ----------------------
   -- count_0_dispatch --
   ----------------------

   function count_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer
   is
   begin
      return
        Q_Layout_Director'Class (Self.all).Count;
   end count_0_dispatch;

   ------------------------
   -- indexOf_0_dispatch --
   ------------------------

   function indexOf_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Widget : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Integer
   is
   begin
      return
        Q_Layout_Director'Class (Self.all).Index_Of
         (Qt4.Widgets.Q_Widget'Class (Qt_Ada.Internals.Object_Registry.To_Q_Object (Widget).all)'Access);
   end indexOf_0_dispatch;

   --------------
   -- Index_Of --
   --------------

   overriding
   function Index_Of
    (Self : not null access constant Q_Layout_Director;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        indexOf_0_wrapper
         (Q_Layout_Director'Class (Self.all).QObject_View,
          Widget.QObject_View);
   end Index_Of;

   --------------
   -- Is_Empty --
   --------------

   overriding
   function Is_Empty
    (Self : not null access constant Q_Layout_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isEmpty_0_wrapper
           (Q_Layout_Director'Class (Self.all).QObject_View));
   end Is_Empty;

   ------------------
   -- Minimum_Size --
   ------------------

   overriding
   function Minimum_Size
    (Self : not null access constant Q_Layout_Director)
       return Qt4.Sizes.Q_Size
   is
      Returns : Qt4.Sizes.Q_Size;

   begin
      minimumSize_0_wrapper
       (Q_Layout_Director'Class (Self.all).QObject_View,
        Qt4.Sizes.Internals.QSize_View (Returns));

      return Returns;
   end Minimum_Size;

   ------------------
   -- Maximum_Size --
   ------------------

   overriding
   function Maximum_Size
    (Self : not null access constant Q_Layout_Director)
       return Qt4.Sizes.Q_Size
   is
      Returns : Qt4.Sizes.Q_Size;

   begin
      maximumSize_0_wrapper
       (Q_Layout_Director'Class (Self.all).QObject_View,
        Qt4.Sizes.Internals.QSize_View (Returns));

      return Returns;
   end Maximum_Size;

   -----------------
   -- Child_Event --
   -----------------

   overriding
   procedure Child_Event
    (Self : not null access Q_Layout_Director;
     Event : not null access Qt4.Child_Events.Q_Child_Event'Class)
   is
   begin
      childEvent_0_wrapper
       (Q_Layout_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Child_Event;

   ------------------
   -- Custom_Event --
   ------------------

   overriding
   procedure Custom_Event
    (Self : not null access Q_Layout_Director;
     Event : not null access Qt4.Events.Q_Event'Class)
   is
   begin
      customEvent_0_wrapper
       (Q_Layout_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Custom_Event;

   -----------------
   -- Timer_Event --
   -----------------

   overriding
   procedure Timer_Event
    (Self : not null access Q_Layout_Director;
     Event : not null access Qt4.Timer_Events.Q_Timer_Event'Class)
   is
   begin
      timerEvent_0_wrapper
       (Q_Layout_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Timer_Event;

   ------------
   -- Sender --
   ------------

   overriding
   function Sender
    (Self : not null access constant Q_Layout_Director)
       return access Qt4.Objects.Q_Object'Class
   is
   begin
      return
        Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_Q_Object
         (sender_0_wrapper
           (Q_Layout_Director'Class (Self.all).QObject_View));
   end Sender;

   --------------------------
   -- Has_Height_For_Width --
   --------------------------

   overriding
   function Has_Height_For_Width
    (Self : not null access constant Q_Layout_Director)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (hasHeightForWidth_0_wrapper
           (Q_Layout_Director'Class (Self.all).QLayoutItem_View));
   end Has_Height_For_Width;

   ----------------------
   -- Height_For_Width --
   ----------------------

   overriding
   function Height_For_Width
    (Self : not null access constant Q_Layout_Director;
     W : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        heightForWidth_0_wrapper
         (Q_Layout_Director'Class (Self.all).QLayoutItem_View,
          W);
   end Height_For_Width;

   ----------------
   -- Invalidate --
   ----------------

   overriding
   procedure Invalidate
    (Self : not null access Q_Layout_Director)
   is
   begin
      invalidate_0_wrapper
       (Q_Layout_Director'Class (Self.all).QLayoutItem_View);
   end Invalidate;

   ------------
   -- Layout --
   ------------

   overriding
   function Layout
    (Self : not null access Q_Layout_Director)
       return not null access Qt4.Layouts.Q_Layout'Class
   is
   begin
      return
        Qt4.Layouts.Q_Layout'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (layout_0_wrapper
             (Q_Layout_Director'Class (Self.all).QLayoutItem_View)).all)'Access;
   end Layout;

   ------------------------------
   -- Minimum_Height_For_Width --
   ------------------------------

   overriding
   function Minimum_Height_For_Width
    (Self : not null access constant Q_Layout_Director;
     W : Qt4.Q_Integer)
       return Qt4.Q_Integer
   is
   begin
      return
        minimumHeightForWidth_0_wrapper
         (Q_Layout_Director'Class (Self.all).QLayoutItem_View,
          W);
   end Minimum_Height_For_Width;

   ------------
   -- Widget --
   ------------

   overriding
   function Widget
    (Self : not null access Q_Layout_Director)
       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
           (widget_0_wrapper
             (Q_Layout_Director'Class (Self.all).QLayoutItem_View)).all)'Access;
   end Widget;

begin
   Qt_Ada.Internals.Object_Registry.Register_Director
    ("QLayout", qt_metacast_wrapper'Access, qt_metacall_wrapper'Access);

end Qt4.Layouts.Directors;
