------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2007-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.     --
------------------------------------------------------------------------------
private with Ada.Finalization;
with Qt4.Points;
with Qt4.Sizes;
private with Qt_Ada.Internals.Value_Class_Sizes;
with System;

package Qt4.Rects is

   type Q_Rect is tagged private;

   function Create
     return Q_Rect;

   function Create
    (Topleft : in Qt4.Points.Q_Point'Class;
     Bottomright : in Qt4.Points.Q_Point'Class)
       return Q_Rect;

   function Create
    (Topleft : in Qt4.Points.Q_Point'Class;
     Size : in Qt4.Sizes.Q_Size'Class)
       return Q_Rect;

   function Create
    (Left : in Qt4.Q_Integer;
     Top : in Qt4.Q_Integer;
     Width : in Qt4.Q_Integer;
     Height : in Qt4.Q_Integer)
       return Q_Rect;

   procedure Adjust
    (Self : in out Q_Rect'Class;
     X_1 : in Qt4.Q_Integer;
     Y_1 : in Qt4.Q_Integer;
     X_2 : in Qt4.Q_Integer;
     Y_2 : in Qt4.Q_Integer);

   function Adjusted
    (Self : in Q_Rect'Class;
     X_1 : in Qt4.Q_Integer;
     Y_1 : in Qt4.Q_Integer;
     X_2 : in Qt4.Q_Integer;
     Y_2 : in Qt4.Q_Integer)
       return Q_Rect;

   function Bottom
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   function Bottom_Right
    (Self : in Q_Rect'Class)
       return Qt4.Points.Q_Point;

   function Bottom_Left
    (Self : in Q_Rect'Class)
       return Qt4.Points.Q_Point;

   function Center
    (Self : in Q_Rect'Class)
       return Qt4.Points.Q_Point;

   function Contains
    (Self : in Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class;
     Proper : in Boolean
       := False)
       return Boolean;

   function Contains
    (Self : in Q_Rect'Class;
     X : in Qt4.Q_Integer;
     Y : in Qt4.Q_Integer)
       return Boolean;

   function Contains
    (Self : in Q_Rect'Class;
     X : in Qt4.Q_Integer;
     Y : in Qt4.Q_Integer;
     Proper : in Boolean)
       return Boolean;

   function Contains
    (Self : in Q_Rect'Class;
     R : in Q_Rect'Class;
     Proper : in Boolean
       := False)
       return Boolean;

   procedure Get_Coords
    (Self : in Q_Rect'Class;
     X_1 : out Qt4.Q_Integer;
     Y_1 : out Qt4.Q_Integer;
     X_2 : out Qt4.Q_Integer;
     Y_2 : out Qt4.Q_Integer);

   procedure Get_Rect
    (Self : in Q_Rect'Class;
     X : out Qt4.Q_Integer;
     Y : out Qt4.Q_Integer;
     W : out Qt4.Q_Integer;
     H : out Qt4.Q_Integer);

   function Height
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   function Intersected
    (Self : in Q_Rect'Class;
     Other : in Q_Rect'Class)
       return Q_Rect;

   function Intersects
    (Self : in Q_Rect'Class;
     R : in Q_Rect'Class)
       return Boolean;

   function Is_Empty
    (Self : in Q_Rect'Class)
       return Boolean;

   function Is_Null
    (Self : in Q_Rect'Class)
       return Boolean;

   function Is_Valid
    (Self : in Q_Rect'Class)
       return Boolean;

   function Left
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   procedure Move_Bottom
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Move_Bottom_Left
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Move_Bottom_Right
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Move_Center
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Move_Left
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Move_Right
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Move_To
    (Self : in out Q_Rect'Class;
     X : in Qt4.Q_Integer;
     Y : in Qt4.Q_Integer);

   procedure Move_To
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Move_Top
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Move_Top_Left
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Move_Top_Right
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   function Normalized
    (Self : in Q_Rect'Class)
       return Q_Rect;

   function Right
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   procedure Set_Bottom
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Set_Bottom_Left
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Set_Bottom_Right
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Set_Coords
    (Self : in out Q_Rect'Class;
     X_1 : in Qt4.Q_Integer;
     Y_1 : in Qt4.Q_Integer;
     X_2 : in Qt4.Q_Integer;
     Y_2 : in Qt4.Q_Integer);

   procedure Set_Height
    (Self : in out Q_Rect'Class;
     H : in Qt4.Q_Integer);

   procedure Set_Left
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Set_Rect
    (Self : in out Q_Rect'Class;
     X : in Qt4.Q_Integer;
     Y : in Qt4.Q_Integer;
     W : in Qt4.Q_Integer;
     H : in Qt4.Q_Integer);

   procedure Set_Right
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Set_Size
    (Self : in out Q_Rect'Class;
     S : in Qt4.Sizes.Q_Size'Class);

   procedure Set_Top
    (Self : in out Q_Rect'Class;
     Pos : in Qt4.Q_Integer);

   procedure Set_Top_Left
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Set_Top_Right
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Set_Width
    (Self : in out Q_Rect'Class;
     W : in Qt4.Q_Integer);

   procedure Set_X
    (Self : in out Q_Rect'Class;
     X : in Qt4.Q_Integer);

   procedure Set_Y
    (Self : in out Q_Rect'Class;
     Y : in Qt4.Q_Integer);

   function Size
    (Self : in Q_Rect'Class)
       return Qt4.Sizes.Q_Size;

   function Top
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   function Top_Left
    (Self : in Q_Rect'Class)
       return Qt4.Points.Q_Point;

   function Top_Right
    (Self : in Q_Rect'Class)
       return Qt4.Points.Q_Point;

   procedure Translate
    (Self : in out Q_Rect'Class;
     Dx : in Qt4.Q_Integer;
     Dy : in Qt4.Q_Integer);

   procedure Translate
    (Self : in out Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class);

   function Translated
    (Self : in Q_Rect'Class;
     Dx : in Qt4.Q_Integer;
     Dy : in Qt4.Q_Integer)
       return Q_Rect;

   function Translated
    (Self : in Q_Rect'Class;
     P : in Qt4.Points.Q_Point'Class)
       return Q_Rect;

   function United
    (Self : in Q_Rect'Class;
     Other : in Q_Rect'Class)
       return Q_Rect;

   function Width
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   function X
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   function Y
    (Self : in Q_Rect'Class)
       return Qt4.Q_Integer;

   function "="
    (R_1 : in Q_Rect;
     R_2 : in Q_Rect)
       return Boolean;

   package Internals is

      type QRect is private;

      type QRect_Access is access all QRect;
      pragma Convention (C, QRect_Access);

      function QRect_View
       (Item : in Q_Rect'Class)
          return QRect_Access;
      pragma Inline (QRect_View);

      function To_Pointer
       (Address : in System.Address)
          return QRect_Access;
      pragma Inline (To_Pointer);

      function To_Address
       (Pointer : in QRect_Access)
          return System.Address;
      pragma Inline (To_Address);

      function Create_Wrapper
       (Item : in Internals.QRect_Access)
          return Q_Rect;

   private

      type QRect is record
         Placeholder : Interfaces.C.char_array (1 .. Qt_Ada.Internals.Value_Class_Sizes.QRect_C_Size_Of);
      end record;
      pragma Convention (C, QRect);

   end Internals;

   package Thin is

      function copy_QRect
       (Cpp_Object : not null access Internals.QRect)
        return not null access Internals.QRect;
      pragma Import (C, copy_QRect, "__Qt4Ada_copy_QRect");

   end Thin;

private

   type Q_Rect is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QRect;
      Object  : Internals.QRect_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Rect);

   overriding
   procedure Finalize (Self : in out Q_Rect);

   overriding
   procedure Initialize (Self : in out Q_Rect);

end Qt4.Rects;
