------------------------------------------------------------------------------
--                                                                          --
--                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.Sizes;
private with Qt_Ada.Internals.Value_Class_Sizes;
with System;

package Qt4.Size_Fs is

   type Q_Size_F is tagged private;

   function Create
    (Sz : in Qt4.Sizes.Q_Size'Class)
       return Q_Size_F;

   function Create
    (W : in Qt4.Q_Real;
     H : in Qt4.Q_Real)
       return Q_Size_F;

   function Bounded_To
    (Self : in Q_Size_F'Class;
     Other_Size : in Q_Size_F'Class)
       return Q_Size_F;

   function Expanded_To
    (Self : in Q_Size_F'Class;
     Other_Size : in Q_Size_F'Class)
       return Q_Size_F;

   function Height
    (Self : in Q_Size_F'Class)
       return Qt4.Q_Real;

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

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

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

   procedure Scale
    (Self : in out Q_Size_F'Class;
     W : in Qt4.Q_Real;
     H : in Qt4.Q_Real;
     Mode : in Qt4.Aspect_Ratio_Mode);

   procedure Scale
    (Self : in out Q_Size_F'Class;
     H : in Q_Size_F'Class;
     Mode : in Qt4.Aspect_Ratio_Mode);

   procedure Set_Height
    (Self : in out Q_Size_F'Class;
     H : in Qt4.Q_Real);

   procedure Set_Width
    (Self : in out Q_Size_F'Class;
     W : in Qt4.Q_Real);

   function To_Size
    (Self : in Q_Size_F'Class)
       return Qt4.Sizes.Q_Size;

   procedure Transpose
    (Self : in out Q_Size_F'Class);

   function Width
    (Self : in Q_Size_F'Class)
       return Qt4.Q_Real;

   function "="
    (S_1 : in Q_Size_F;
     S_2 : in Q_Size_F)
       return Boolean;

   function "+"
    (S_1 : in Q_Size_F;
     S_2 : in Q_Size_F)
       return Q_Size_F;

   function "-"
    (S_1 : in Q_Size_F;
     S_2 : in Q_Size_F)
       return Q_Size_F;

   function "*"
    (S : in Q_Size_F;
     Factor : in Qt4.Q_Real)
       return Q_Size_F;

   function "*"
    (Factor : in Qt4.Q_Real;
     S : in Q_Size_F)
       return Q_Size_F;

   function "/"
    (S : in Q_Size_F;
     Factor : in Qt4.Q_Real)
       return Q_Size_F;

   package Internals is

      type QSizeF is private;

      type QSizeF_Access is access all QSizeF;
      pragma Convention (C, QSizeF_Access);

      function QSizeF_View
       (Item : in Q_Size_F'Class)
          return QSizeF_Access;
      pragma Inline (QSizeF_View);

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

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

      function Create_Wrapper
       (Item : in Internals.QSizeF_Access)
          return Q_Size_F;

   private

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

   end Internals;

   package Thin is

      function copy_QSizeF
       (Cpp_Object : not null access Internals.QSizeF)
        return not null access Internals.QSizeF;
      pragma Import (C, copy_QSizeF, "__Qt4Ada_copy_QSizeF");

   end Thin;

private

   type Q_Size_F is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QSizeF;
      Object  : Internals.QSizeF_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Size_F);

   overriding
   procedure Finalize (Self : in out Q_Size_F);

   overriding
   procedure Initialize (Self : in out Q_Size_F);

end Qt4.Size_Fs;
