------------------------------------------------------------------------------
--                                                                          --
--                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 Qt4.Child_Events;
with Qt4.Events;
with Qt4.Text_Formats;
with Qt4.Text_Frames;
with Qt4.Timer_Events;
with Qt_Ada.Internals.Events;
with Qt_Ada.Internals.Object_Registry;
pragma Elaborate (Qt_Ada.Internals.Object_Registry);
with Qt_Ada.Internals.Objects;
with Qt_Ada.Internals.Objects.Object_Utilities;

package body Qt4.Abstract_Text_Document_Layouts.Directors is

   function qt_metacall_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Kind : Qt4.Meta_Objects.Call;
     Id   : Qt4.Q_Integer;
     Args : Qt4.Address_Pointer)
       return Qt4.Q_Integer;
   pragma Import (C, qt_metacall_wrapper,
                  "__Qt4Ada_QAbstractTextDocumentLayout_qt_metacall_wrapper");

   function qt_metacast_wrapper
    (Self  : not null access Qt_Ada.Internals.Objects.QObject;
     Class : Interfaces.C.char_array)
       return System.Address;
   pragma Import (C, qt_metacast_wrapper,
                  "__Qt4Ada_QAbstractTextDocumentLayout_qt_metacast_wrapper");

   function blockBoundingRect_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Block : not null access Qt4.Text_Blocks.Thin.QTextBlock)
       return not null access Qt4.Rect_Fs.Internals.QRectF;
   pragma Export (C, blockBoundingRect_0_dispatch,
                     "__Qt4Ada_QAbstractTextDocumentLayout_blockBoundingRect_0_dispatch");
   pragma Warnings (Off, blockBoundingRect_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function documentSize_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return not null access Qt4.Size_Fs.Internals.QSizeF;
   pragma Export (C, documentSize_0_dispatch,
                     "__Qt4Ada_QAbstractTextDocumentLayout_documentSize_0_dispatch");
   pragma Warnings (Off, documentSize_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function frameBoundingRect_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Frame : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt4.Rect_Fs.Internals.QRectF;
   pragma Export (C, frameBoundingRect_0_dispatch,
                     "__Qt4Ada_QAbstractTextDocumentLayout_frameBoundingRect_0_dispatch");
   pragma Warnings (Off, frameBoundingRect_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function hitTest_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Point : not null access Qt4.Point_Fs.Internals.QPointF;
     Accuracy : Qt4.Hit_Test_Accuracy)
       return Qt4.Q_Integer;
   pragma Export (C, hitTest_0_dispatch,
                     "__Qt4Ada_QAbstractTextDocumentLayout_hitTest_0_dispatch");
   pragma Warnings (Off, hitTest_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   function pageCount_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer;
   pragma Export (C, pageCount_0_dispatch,
                     "__Qt4Ada_QAbstractTextDocumentLayout_pageCount_0_dispatch");
   pragma Warnings (Off, pageCount_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   procedure documentSizeChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     New_Size : not null access constant Qt4.Size_Fs.Internals.QSizeF);
   pragma Import (C, documentSizeChanged_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_documentSizeChanged_0_wrapper");

   procedure pageCountChanged_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     New_Pages : Qt4.Q_Integer);
   pragma Import (C, pageCountChanged_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_pageCountChanged_0_wrapper");

   procedure update_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Rect : not null access constant Qt4.Rect_Fs.Internals.QRectF);
   pragma Import (C, update_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_update_0_wrapper");

   procedure updateBlock_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Block : not null access constant Qt4.Text_Blocks.Thin.QTextBlock);
   pragma Import (C, updateBlock_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_updateBlock_0_wrapper");

   procedure documentChanged_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     From : Qt4.Q_Integer;
     Chars_Removed : Qt4.Q_Integer;
     Chars_Added : Qt4.Q_Integer);
   pragma Export (C, documentChanged_0_dispatch,
                     "__Qt4Ada_QAbstractTextDocumentLayout_documentChanged_0_dispatch");
   pragma Warnings (Off, documentChanged_0_dispatch);
   --  GCC GNAT 4.3.0: suppress warning
   --  is a tagged type which does not correspond to any C type

   procedure format_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Position : Qt4.Q_Integer;
     Returns : not null access Qt4.Text_Formats.Internals.QTextFormat);
   pragma Import (C, format_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_format_0_wrapper");

   procedure childEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, childEvent_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_childEvent_0_wrapper");

   procedure customEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, customEvent_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_customEvent_0_wrapper");

   procedure timerEvent_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Event : not null access Qt_Ada.Internals.Events.QEvent);
   pragma Import (C, timerEvent_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_timerEvent_0_wrapper");

   function sender_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, sender_0_wrapper,
                     "__Qt4Ada_QAbstractTextDocumentLayout_sender_0_wrapper");

   pragma Style_Checks ("N");

   ----------------------------------
   -- blockBoundingRect_0_dispatch --
   ----------------------------------

   function blockBoundingRect_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Block : not null access Qt4.Text_Blocks.Thin.QTextBlock)
       return not null access Qt4.Rect_Fs.Internals.QRectF
   is
   begin
      return
        Qt4.Rect_Fs.Thin.copy_QRectF
         (Qt4.Rect_Fs.Internals.QRectF_View
           (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).Block_Bounding_Rect
             (Qt4.Text_Blocks.Internals.To_Q_Text_Block (Block))));
   end blockBoundingRect_0_dispatch;

   -----------------------------
   -- documentSize_0_dispatch --
   -----------------------------

   function documentSize_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return not null access Qt4.Size_Fs.Internals.QSizeF
   is
   begin
      return
        Qt4.Size_Fs.Thin.copy_QSizeF
         (Qt4.Size_Fs.Internals.QSizeF_View
           (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).Document_Size));
   end documentSize_0_dispatch;

   ----------------------------------
   -- frameBoundingRect_0_dispatch --
   ----------------------------------

   function frameBoundingRect_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Frame : not null access Qt_Ada.Internals.Objects.QObject)
       return not null access Qt4.Rect_Fs.Internals.QRectF
   is
   begin
      return
        Qt4.Rect_Fs.Thin.copy_QRectF
         (Qt4.Rect_Fs.Internals.QRectF_View
           (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).Frame_Bounding_Rect
             (Qt4.Text_Frames.Q_Text_Frame'Class (Qt_Ada.Internals.Object_Registry.To_Q_Object (Frame).all)'Access)));
   end frameBoundingRect_0_dispatch;

   ------------------------
   -- hitTest_0_dispatch --
   ------------------------

   function hitTest_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     Point : not null access Qt4.Point_Fs.Internals.QPointF;
     Accuracy : Qt4.Hit_Test_Accuracy)
       return Qt4.Q_Integer
   is
   begin
      return
        Q_Abstract_Text_Document_Layout_Director'Class (Self.all).Hit_Test
         (Qt4.Point_Fs.Internals.Create_Wrapper (Qt4.Point_Fs.Internals.QPointF_Access (Point)),
          Accuracy);
   end hitTest_0_dispatch;

   --------------------------
   -- pageCount_0_dispatch --
   --------------------------

   function pageCount_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access)
       return Qt4.Q_Integer
   is
   begin
      return
        Q_Abstract_Text_Document_Layout_Director'Class (Self.all).Page_Count;
   end pageCount_0_dispatch;

   --------------------------------
   -- Emit_Document_Size_Changed --
   --------------------------------

   not overriding
   procedure Emit_Document_Size_Changed
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     New_Size : Qt4.Size_Fs.Q_Size_F)
   is
   begin
      documentSizeChanged_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        Qt4.Size_Fs.Internals.QSizeF_View (New_Size));
   end Emit_Document_Size_Changed;

   -----------------------------
   -- Emit_Page_Count_Changed --
   -----------------------------

   not overriding
   procedure Emit_Page_Count_Changed
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     New_Pages : Qt4.Q_Integer)
   is
   begin
      pageCountChanged_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        New_Pages);
   end Emit_Page_Count_Changed;

   -----------------
   -- Emit_Update --
   -----------------

   not overriding
   procedure Emit_Update
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     Rect : Qt4.Rect_Fs.Q_Rect_F)
   is
   begin
      update_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        Qt4.Rect_Fs.Internals.QRectF_View (Rect));
   end Emit_Update;

   -----------------------
   -- Emit_Update_Block --
   -----------------------

   not overriding
   procedure Emit_Update_Block
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     Block : Qt4.Text_Blocks.Q_Text_Block)
   is
   begin
      updateBlock_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        Qt4.Text_Blocks.Internals.QTextBlock_View (Block));
   end Emit_Update_Block;

   --------------------------------
   -- documentChanged_0_dispatch --
   --------------------------------

   procedure documentChanged_0_dispatch
    (Self : not null Qt_Ada.Internals.Objects.Q_Object_Base_Access;
     From : Qt4.Q_Integer;
     Chars_Removed : Qt4.Q_Integer;
     Chars_Added : Qt4.Q_Integer)
   is
   begin
      Q_Abstract_Text_Document_Layout_Director'Class (Self.all).Document_Changed
       (From,
        Chars_Removed,
        Chars_Added);
   end documentChanged_0_dispatch;

   ------------
   -- Format --
   ------------

   not overriding
   function Format
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     Position : Qt4.Q_Integer)
       return Qt4.Text_Char_Formats.Q_Text_Char_Format
   is
      Returns : Qt4.Text_Char_Formats.Q_Text_Char_Format;

   begin
      format_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        Position,
        Qt4.Text_Formats.Internals.QTextFormat_View (Returns));

      return Returns;
   end Format;

   -----------------
   -- Child_Event --
   -----------------

   overriding
   procedure Child_Event
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     Event : not null access Qt4.Child_Events.Q_Child_Event'Class)
   is
   begin
      childEvent_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Child_Event;

   ------------------
   -- Custom_Event --
   ------------------

   overriding
   procedure Custom_Event
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     Event : not null access Qt4.Events.Q_Event'Class)
   is
   begin
      customEvent_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Custom_Event;

   -----------------
   -- Timer_Event --
   -----------------

   overriding
   procedure Timer_Event
    (Self : not null access Q_Abstract_Text_Document_Layout_Director;
     Event : not null access Qt4.Timer_Events.Q_Timer_Event'Class)
   is
   begin
      timerEvent_0_wrapper
       (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View,
        Event.QEvent_View);
   end Timer_Event;

   ------------
   -- Sender --
   ------------

   overriding
   function Sender
    (Self : not null access constant Q_Abstract_Text_Document_Layout_Director)
       return access Qt4.Objects.Q_Object'Class
   is
   begin
      return
        Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_Q_Object
         (sender_0_wrapper
           (Q_Abstract_Text_Document_Layout_Director'Class (Self.all).QObject_View));
   end Sender;

begin
   Qt_Ada.Internals.Object_Registry.Register_Director
    ("QAbstractTextDocumentLayout", qt_metacast_wrapper'Access, qt_metacall_wrapper'Access);

end Qt4.Abstract_Text_Document_Layouts.Directors;
