------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 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 Qt_Ada.Internals.Object_Registry;
pragma Elaborate (Qt_Ada.Internals.Object_Registry);

package body Qt_Ada.Internals.Objects.Abstract_Text_Document_Layout_Proxies is

   procedure blockBoundingRect_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Block : not null access constant Qt4.Text_Blocks.Thin.QTextBlock;
     Returns : not null access Qt4.Rect_Fs.Internals.QRectF);
      pragma Import (C, blockBoundingRect_0_virtual,
                     "__Qt4Ada_QAbstractTextDocumentLayout_blockBoundingRect_0_virtual");

   procedure documentSize_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Size_Fs.Internals.QSizeF);
      pragma Import (C, documentSize_0_virtual,
                     "__Qt4Ada_QAbstractTextDocumentLayout_documentSize_0_virtual");

   procedure frameBoundingRect_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Frame : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Rect_Fs.Internals.QRectF);
      pragma Import (C, frameBoundingRect_0_virtual,
                     "__Qt4Ada_QAbstractTextDocumentLayout_frameBoundingRect_0_virtual");

   function hitTest_0_virtual
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Point : not null access constant Qt4.Point_Fs.Internals.QPointF;
     Accuracy : Qt4.Hit_Test_Accuracy)
       return Qt4.Q_Integer;
      pragma Import (C, hitTest_0_virtual,
                     "__Qt4Ada_QAbstractTextDocumentLayout_hitTest_0_virtual");

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

   function Create
    (Object : not null Qt_Ada.Internals.Objects.QObject_Access)
       return not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;

   pragma Style_Checks ("N");

   -------------------------
   -- Block_Bounding_Rect --
   -------------------------

   function Block_Bounding_Rect
    (Self : not null access constant Q_Abstract_Text_Document_Layout_Proxy;
     Block : Qt4.Text_Blocks.Q_Text_Block)
       return Qt4.Rect_Fs.Q_Rect_F
   is
      Returns : Qt4.Rect_Fs.Q_Rect_F;

   begin
      blockBoundingRect_0_virtual
       (Q_Abstract_Text_Document_Layout_Proxy'Class (Self.all).QObject_View,
        Qt4.Text_Blocks.Internals.QTextBlock_View (Block),
        Qt4.Rect_Fs.Internals.QRectF_View (Returns));

      return Returns;
   end Block_Bounding_Rect;

   -------------------
   -- Document_Size --
   -------------------

   function Document_Size
    (Self : not null access constant Q_Abstract_Text_Document_Layout_Proxy)
       return Qt4.Size_Fs.Q_Size_F
   is
      Returns : Qt4.Size_Fs.Q_Size_F;

   begin
      documentSize_0_virtual
       (Q_Abstract_Text_Document_Layout_Proxy'Class (Self.all).QObject_View,
        Qt4.Size_Fs.Internals.QSizeF_View (Returns));

      return Returns;
   end Document_Size;

   -------------------------
   -- Frame_Bounding_Rect --
   -------------------------

   function Frame_Bounding_Rect
    (Self : not null access constant Q_Abstract_Text_Document_Layout_Proxy;
     Frame : not null access Qt4.Text_Frames.Q_Text_Frame'Class)
       return Qt4.Rect_Fs.Q_Rect_F
   is
      Returns : Qt4.Rect_Fs.Q_Rect_F;

   begin
      frameBoundingRect_0_virtual
       (Q_Abstract_Text_Document_Layout_Proxy'Class (Self.all).QObject_View,
        Frame.QObject_View,
        Qt4.Rect_Fs.Internals.QRectF_View (Returns));

      return Returns;
   end Frame_Bounding_Rect;

   --------------
   -- Hit_Test --
   --------------

   function Hit_Test
    (Self : not null access constant Q_Abstract_Text_Document_Layout_Proxy;
     Point : Qt4.Point_Fs.Q_Point_F;
     Accuracy : Qt4.Hit_Test_Accuracy)
       return Qt4.Q_Integer
   is
   begin
      return
        hitTest_0_virtual
         (Q_Abstract_Text_Document_Layout_Proxy'Class (Self.all).QObject_View,
          Qt4.Point_Fs.Internals.QPointF_View (Point),
          Accuracy);
   end Hit_Test;

   ----------------
   -- Page_Count --
   ----------------

   function Page_Count
    (Self : not null access constant Q_Abstract_Text_Document_Layout_Proxy)
       return Qt4.Q_Integer
   is
   begin
      return
        pageCount_0_virtual
         (Q_Abstract_Text_Document_Layout_Proxy'Class (Self.all).QObject_View);
   end Page_Count;

   type Q_Abstract_Text_Document_Layout_Proxy_Access is
     access all Q_Abstract_Text_Document_Layout_Proxy'Class;

   ------------
   -- Create --
   ------------

   function Create
    (Object : not null Qt_Ada.Internals.Objects.QObject_Access)
       return not null Qt_Ada.Internals.Objects.Q_Object_Base_Access
   is
      Self : constant not null Q_Abstract_Text_Document_Layout_Proxy_Access
        := new Q_Abstract_Text_Document_Layout_Proxy;

   begin
      Qt_Ada.Internals.Objects.Initialize (Self, Object);

      return Qt_Ada.Internals.Objects.Q_Object_Base_Access (Self);
   end Create;

begin
   Qt_Ada.Internals.Object_Registry.Register_Proxy
    ("QAbstractTextDocumentLayout", Create'Access);
end Qt_Ada.Internals.Objects.Abstract_Text_Document_Layout_Proxies;
