------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2009-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.Fonts;
with Qt4.Matrices;
with Qt4.Point_Fs;
with Qt4.Polygon_Fs;
with Qt4.Rect_Fs;
limited with Qt4.Regions;
limited with Qt4.Strings;
limited with Qt4.Transforms;
private with Qt_Ada.Internals.Value_Class_Sizes;

package Qt4.Painter_Paths is

   type Q_Painter_Path is tagged private;

   function Create
    (Start_Point : Qt4.Point_Fs.Q_Point_F'Class)
       return Q_Painter_Path;

   procedure Add_Ellipse
    (Self : in out Q_Painter_Path'Class;
     Rect : Qt4.Rect_Fs.Q_Rect_F'Class);

   procedure Add_Ellipse
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real);

   procedure Add_Ellipse
    (Self : in out Q_Painter_Path'Class;
     Center : Qt4.Point_Fs.Q_Point_F'Class;
     Rx : Qt4.Q_Real;
     Ry : Qt4.Q_Real);

   procedure Add_Path
    (Self : in out Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class);

   procedure Add_Polygon
    (Self : in out Q_Painter_Path'Class;
     Polygon : Qt4.Polygon_Fs.Q_Polygon_F'Class);

   procedure Add_Rect
    (Self : in out Q_Painter_Path'Class;
     Rect : Qt4.Rect_Fs.Q_Rect_F'Class);

   procedure Add_Rect
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real);

   procedure Add_Region
    (Self : in out Q_Painter_Path'Class;
     Region : Qt4.Regions.Q_Region'Class);

   procedure Add_Rounded_Rect
    (Self : in out Q_Painter_Path'Class;
     Rect : Qt4.Rect_Fs.Q_Rect_F'Class;
     X_Radius : Qt4.Q_Real;
     Y_Radius : Qt4.Q_Real;
     Mode : Qt4.Size_Mode
       := Absolute_Size);

   procedure Add_Rounded_Rect
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real;
     X_Radius : Qt4.Q_Real;
     Y_Radius : Qt4.Q_Real;
     Mode : Qt4.Size_Mode
       := Absolute_Size);

   procedure Add_Text
    (Self : in out Q_Painter_Path'Class;
     Point : Qt4.Point_Fs.Q_Point_F'Class;
     Font : Qt4.Fonts.Q_Font'Class;
     Text : Qt4.Strings.Q_String'Class);

   procedure Add_Text
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Font : Qt4.Fonts.Q_Font'Class;
     Text : Qt4.Strings.Q_String'Class);

   function Angle_At_Percent
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Q_Real;

   procedure Arc_Move_To
    (Self : in out Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class;
     Angle : Qt4.Q_Real);

   procedure Arc_Move_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Width : Qt4.Q_Real;
     Height : Qt4.Q_Real;
     Angle : Qt4.Q_Real);

   procedure Arc_To
    (Self : in out Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class;
     Start_Angle : Qt4.Q_Real;
     Sweep_Length : Qt4.Q_Real);

   procedure Arc_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Width : Qt4.Q_Real;
     Height : Qt4.Q_Real;
     Start_Angle : Qt4.Q_Real;
     Sweep_Length : Qt4.Q_Real);

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

   procedure Close_Subpath
    (Self : in out Q_Painter_Path'Class);

   procedure Connect_Path
    (Self : in out Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class);

   function Contains
    (Self : Q_Painter_Path'Class;
     Point : Qt4.Point_Fs.Q_Point_F'Class)
       return Boolean;

   function Contains
    (Self : Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class)
       return Boolean;

   function Contains
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Boolean;

   function Control_Point_Rect
    (Self : Q_Painter_Path'Class)
       return Qt4.Rect_Fs.Q_Rect_F;

   procedure Cubic_To
    (Self : in out Q_Painter_Path'Class;
     C_1 : Qt4.Point_Fs.Q_Point_F'Class;
     C_2 : Qt4.Point_Fs.Q_Point_F'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class);

   procedure Cubic_To
    (Self : in out Q_Painter_Path'Class;
     C_1_X : Qt4.Q_Real;
     C_1_Y : Qt4.Q_Real;
     C_2_X : Qt4.Q_Real;
     C_2_Y : Qt4.Q_Real;
     End_Point_X : Qt4.Q_Real;
     End_Point_Y : Qt4.Q_Real);

   function Current_Position
    (Self : Q_Painter_Path'Class)
       return Qt4.Point_Fs.Q_Point_F;

   function Element_Count
    (Self : Q_Painter_Path'Class)
       return Qt4.Q_Integer;

   function Fill_Rule
    (Self : Q_Painter_Path'Class)
       return Qt4.Fill_Rule;

   function Intersected
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Q_Painter_Path;

   function Intersects
    (Self : Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class)
       return Boolean;

   function Intersects
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Boolean;

   function Is_Empty
    (Self : Q_Painter_Path'Class)
       return Boolean;

   function Length
    (Self : Q_Painter_Path'Class)
       return Qt4.Q_Real;

   procedure Line_To
    (Self : in out Q_Painter_Path'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class);

   procedure Line_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real);

   procedure Move_To
    (Self : in out Q_Painter_Path'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class);

   procedure Move_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real);

   function Percent_At_Length
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Q_Real;

   function Point_At_Percent
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Point_Fs.Q_Point_F;

   procedure Quad_To
    (Self : in out Q_Painter_Path'Class;
     C : Qt4.Point_Fs.Q_Point_F'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class);

   procedure Quad_To
    (Self : in out Q_Painter_Path'Class;
     Cx : Qt4.Q_Real;
     Cy : Qt4.Q_Real;
     End_Point_X : Qt4.Q_Real;
     End_Point_Y : Qt4.Q_Real);

   procedure Set_Element_Position_At
    (Self : in out Q_Painter_Path'Class;
     Index : Qt4.Q_Integer;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real);

   procedure Set_Fill_Rule
    (Self : in out Q_Painter_Path'Class;
     Fill_Rule : Qt4.Fill_Rule);

   function Simplified
    (Self : Q_Painter_Path'Class)
       return Q_Painter_Path;

   function Slope_At_Percent
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Q_Real;

   function Subtracted
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Q_Painter_Path;

   function To_Fill_Polygon
    (Self : Q_Painter_Path'Class;
     Matrix : Qt4.Transforms.Q_Transform'Class)
       return Qt4.Polygon_Fs.Q_Polygon_F;

   function To_Fill_Polygon
    (Self : Q_Painter_Path'Class;
     Matrix : Qt4.Matrices.Q_Matrix'Class
       := Qt4.Matrices.Create)
       return Qt4.Polygon_Fs.Q_Polygon_F;

   function To_Reversed
    (Self : Q_Painter_Path'Class)
       return Q_Painter_Path;

   function United
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Q_Painter_Path;

   overriding function "="
    (Self : Q_Painter_Path;
     Path : Q_Painter_Path)
       return Boolean;

   package Internals is

      type QPainterPath is private;

      type QPainterPath_Access is access all QPainterPath;
      pragma Convention (C, QPainterPath_Access);

      function QPainterPath_View
       (Item : Q_Painter_Path'Class)
          return QPainterPath_Access;
      pragma Inline (QPainterPath_View);

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

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

      function Create_Wrapper
       (Item : Internals.QPainterPath_Access)
          return Q_Painter_Path;

   private

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

   end Internals;

   package Thin is

      function copy_QPainterPath
       (Cpp_Object : not null access Internals.QPainterPath)
        return not null access Internals.QPainterPath;
      pragma Import (C, copy_QPainterPath, "__Qt4Ada_copy_QPainterPath");

   end Thin;

private

   type Q_Painter_Path is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QPainterPath;
      Object  : Internals.QPainterPath_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Painter_Path);

   overriding
   procedure Finalize (Self : in out Q_Painter_Path);

   overriding
   procedure Initialize (Self : in out Q_Painter_Path);

end Qt4.Painter_Paths;
