------------------------------------------------------------------------------
--                                                                          --
--                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;
limited with Qt4.Point_Fs;
with Qt4.Polygons;
with Qt4.Rect_Fs;
private with Qt_Ada.Internals.Value_Class_Sizes;
with System;

package Qt4.Polygon_Fs is

   type Q_Polygon_F is tagged private;

   function Create
    (Size : Qt4.Q_Integer)
       return Q_Polygon_F;

   function Create
    (R : Qt4.Rect_Fs.Q_Rect_F'Class)
       return Q_Polygon_F;

   function Create
    (A : Qt4.Polygons.Q_Polygon'Class)
       return Q_Polygon_F;

   function Bounding_Rect
    (Self : Q_Polygon_F'Class)
       return Qt4.Rect_Fs.Q_Rect_F;

   function Contains_Point
    (Self : Q_Polygon_F'Class;
     Pt : Qt4.Point_Fs.Q_Point_F'Class;
     Fill_Rule : Qt4.Fill_Rule)
       return Boolean;

   function Intersected
    (Self : Q_Polygon_F'Class;
     R : Q_Polygon_F'Class)
       return Q_Polygon_F;

   function Is_Closed
    (Self : Q_Polygon_F'Class)
       return Boolean;

   function Subtracted
    (Self : Q_Polygon_F'Class;
     R : Q_Polygon_F'Class)
       return Q_Polygon_F;

   function To_Polygon
    (Self : Q_Polygon_F'Class)
       return Qt4.Polygons.Q_Polygon;

   procedure Translate
    (Self : in out Q_Polygon_F'Class;
     Offset : Qt4.Point_Fs.Q_Point_F'Class);

   procedure Translate
    (Self : in out Q_Polygon_F'Class;
     Dx : Qt4.Q_Real;
     Dy : Qt4.Q_Real);

   function United
    (Self : Q_Polygon_F'Class;
     R : Q_Polygon_F'Class)
       return Q_Polygon_F;

   procedure Append
    (Self : in out Q_Polygon_F'Class;
     T : Qt4.Point_Fs.Q_Point_F'Class);

   package Internals is

      type QPolygonF is private;

      type QPolygonF_Access is access all QPolygonF;
      pragma Convention (C, QPolygonF_Access);

      function QPolygonF_View
       (Item : Q_Polygon_F'Class)
          return QPolygonF_Access;
      pragma Inline (QPolygonF_View);

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

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

      function Create_Wrapper
       (Item : Internals.QPolygonF_Access)
          return Q_Polygon_F;

   private

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

   end Internals;

private

   type Q_Polygon_F is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QPolygonF;
      Object  : Internals.QPolygonF_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Polygon_F);

   overriding
   procedure Finalize (Self : in out Q_Polygon_F);

   overriding
   procedure Initialize (Self : in out Q_Polygon_F);

end Qt4.Polygon_Fs;
