------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008, 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.Text_Formats;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Text_Frame_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Text_Frame_Proxies);
--  Elaboration of the proxy tagged type package register proxy object
--  constructor. Bindings must be able to create proxy object of the
--  corresponding tagged type for works properly.

package body Qt4.Text_Frames is

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

   procedure frameFormat_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Text_Formats.Internals.QTextFormat);
   pragma Import (C, frameFormat_0_wrapper,
                     "__Qt4Ada_QTextFrame_frameFormat_0_wrapper");

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

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

   procedure setFrameFormat_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Format : not null access constant Qt4.Text_Formats.Internals.QTextFormat);
   pragma Import (C, setFrameFormat_0_wrapper,
                     "__Qt4Ada_QTextFrame_setFrameFormat_0_wrapper");

   procedure firstCursorPosition_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : out Qt4.Text_Cursors.Thin.QTextCursor);
   pragma Import (C, firstCursorPosition_0_wrapper,
                     "__Qt4Ada_QTextFrame_firstCursorPosition_0_wrapper");

   procedure lastCursorPosition_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : out Qt4.Text_Cursors.Thin.QTextCursor);
   pragma Import (C, lastCursorPosition_0_wrapper,
                     "__Qt4Ada_QTextFrame_lastCursorPosition_0_wrapper");

   pragma Style_Checks ("N");

   --------------------
   -- First_Position --
   --------------------

   function First_Position
    (Self : not null access constant Q_Text_Frame'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        firstPosition_0_wrapper
         (Self.QObject_View);
   end First_Position;

   ------------------
   -- Frame_Format --
   ------------------

   function Frame_Format
    (Self : not null access constant Q_Text_Frame'Class)
       return Qt4.Text_Frame_Formats.Q_Text_Frame_Format
   is
      Returns : Qt4.Text_Frame_Formats.Q_Text_Frame_Format;

   begin
      frameFormat_0_wrapper
       (Self.QObject_View,
        Qt4.Text_Formats.Internals.QTextFormat_View (Returns));

      return Returns;
   end Frame_Format;

   -------------------
   -- Last_Position --
   -------------------

   function Last_Position
    (Self : not null access constant Q_Text_Frame'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        lastPosition_0_wrapper
         (Self.QObject_View);
   end Last_Position;

   ------------------
   -- Parent_Frame --
   ------------------

   function Parent_Frame
    (Self : not null access constant Q_Text_Frame'Class)
       return not null access Qt4.Text_Frames.Q_Text_Frame'Class
   is
   begin
      return
        Qt4.Text_Frames.Q_Text_Frame'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (parentFrame_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Parent_Frame;

   ----------------------
   -- Set_Frame_Format --
   ----------------------

   procedure Set_Frame_Format
    (Self : not null access Q_Text_Frame'Class;
     Format : Qt4.Text_Frame_Formats.Q_Text_Frame_Format'Class)
   is
   begin
      setFrameFormat_0_wrapper
       (Self.QObject_View,
        Qt4.Text_Formats.Internals.QTextFormat_View (Format));
   end Set_Frame_Format;

   ---------------------------
   -- First_Cursor_Position --
   ---------------------------

   function First_Cursor_Position
    (Self : not null access constant Q_Text_Frame'Class)
       return Qt4.Text_Cursors.Q_Text_Cursor
   is
      Returns : Qt4.Text_Cursors.Q_Text_Cursor;

   begin
      firstCursorPosition_0_wrapper
       (Self.QObject_View,
        Qt4.Text_Cursors.Internals.QTextCursor_View (Returns).all);

      return Returns;
   end First_Cursor_Position;

   --------------------------
   -- Last_Cursor_Position --
   --------------------------

   function Last_Cursor_Position
    (Self : not null access constant Q_Text_Frame'Class)
       return Qt4.Text_Cursors.Q_Text_Cursor
   is
      Returns : Qt4.Text_Cursors.Q_Text_Cursor;

   begin
      lastCursorPosition_0_wrapper
       (Self.QObject_View,
        Qt4.Text_Cursors.Internals.QTextCursor_View (Returns).all);

      return Returns;
   end Last_Cursor_Position;

end Qt4.Text_Frames;
