------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008-2011 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.Byte_Arrays;
with Qt4.Chars;
with Qt4.Fonts;
with Qt4.Objects;
with Qt4.Printers;
with Qt4.Strings;
with Qt4.Text_Blocks;
with Qt4.Text_Cursors;
limited with Qt4.Text_Objects;
with Qt4_Generic_Flags;
with Qt_Ada.Generic_Object_Pointers;

package Qt4.Text_Documents is

   type Q_Text_Document is limited interface
     and Qt4.Objects.Q_Object;

   type Q_Text_Document_Access is
     access all Q_Text_Document'Class;
   for Q_Text_Document_Access'Storage_Size use 0;

   type Q_Text_Document_Pointer is tagged;

   procedure Adjust_Size
    (Self : not null access Q_Text_Document'Class);

   function Begin_Block
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Text_Blocks.Q_Text_Block;

   function Block_Count
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Q_Integer;

   function Character_At
    (Self : not null access Q_Text_Document'Class;
     Pos : Qt4.Q_Integer)
       return Qt4.Chars.Q_Char;

   not overriding
   procedure Clear
    (Self : not null access Q_Text_Document)
       is abstract;

   function Default_Font
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Fonts.Q_Font;

   function Default_Style_Sheet
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Strings.Q_String;

   function End_Block
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Text_Blocks.Q_Text_Block;

   function Find_Block
    (Self : not null access constant Q_Text_Document'Class;
     Pos : Qt4.Q_Integer)
       return Qt4.Text_Blocks.Q_Text_Block;

   function Is_Empty
    (Self : not null access constant Q_Text_Document'Class)
       return Standard.Boolean;

   function Is_Modified
    (Self : not null access constant Q_Text_Document'Class)
       return Standard.Boolean;

   function Is_Redo_Available
    (Self : not null access constant Q_Text_Document'Class)
       return Standard.Boolean;

   function Is_Undo_Available
    (Self : not null access constant Q_Text_Document'Class)
       return Standard.Boolean;

   function Is_Undo_Redo_Enabled
    (Self : not null access constant Q_Text_Document'Class)
       return Standard.Boolean;

   procedure Mark_Contents_Dirty
    (Self : not null access Q_Text_Document'Class;
     From : Qt4.Q_Integer;
     Length : Qt4.Q_Integer);

   function Maximum_Block_Count
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Q_Integer;

   function Object
    (Self : not null access constant Q_Text_Document'Class;
     Object_Index : Qt4.Q_Integer)
       return not null access Qt4.Text_Objects.Q_Text_Object'Class;

   function Page_Count
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Q_Integer;

   procedure Set_Default_Font
    (Self : not null access Q_Text_Document'Class;
     Font : Qt4.Fonts.Q_Font);

   procedure Set_Default_Style_Sheet
    (Self : not null access Q_Text_Document'Class;
     Sheet : Qt4.Strings.Q_String);

   procedure Set_Html
    (Self : not null access Q_Text_Document'Class;
     Html : Qt4.Strings.Q_String);

   procedure Set_Maximum_Block_Count
    (Self : not null access Q_Text_Document'Class;
     Maximum : Qt4.Q_Integer);

   procedure Set_Plain_Text
    (Self : not null access Q_Text_Document'Class;
     Text : Qt4.Strings.Q_String);

   procedure Set_Undo_Redo_Enabled
    (Self : not null access Q_Text_Document'Class;
     Enable : Standard.Boolean);

   procedure Set_Use_Design_Metrics
    (Self : not null access Q_Text_Document'Class;
     B : Standard.Boolean);

   function To_Html
    (Self : not null access constant Q_Text_Document'Class;
     Encoding : Qt4.Byte_Arrays.Q_Byte_Array
       := Qt4.Byte_Arrays.Create)
       return Qt4.Strings.Q_String;

   function To_Plain_Text
    (Self : not null access constant Q_Text_Document'Class)
       return Qt4.Strings.Q_String;

   function Use_Design_Metrics
    (Self : not null access constant Q_Text_Document'Class)
       return Standard.Boolean;

   procedure Redo
    (Self : not null access Q_Text_Document'Class);

   procedure Set_Modified
    (Self : not null access Q_Text_Document'Class;
     M : Standard.Boolean
       := True);

   procedure Undo
    (Self : not null access Q_Text_Document'Class);

   type Find_Flag is
    (Find_Default,
     Find_Backward,
     Find_Case_Sensitively,
     Find_Whole_Words);
   pragma Convention (C, Find_Flag);
   for Find_Flag'Size use Interfaces.C.unsigned'Size;
   for Find_Flag use
    (Find_Default          => 16#00000#,  -- В Qt используется целое число 0.
     Find_Backward         => 16#00001#,
     Find_Case_Sensitively => 16#00002#,
     Find_Whole_Words      => 16#00004#);

   package Find_Flag_Flags is new Qt4_Generic_Flags (Find_Flag);
   type Find_Flags is new Find_Flag_Flags.Flags;

   function Find
    (Self       : not null access Qt4.Text_Documents.Q_Text_Document'Class;
     Sub_String : Qt4.Strings.Q_String;
     Position   : Qt4.Q_Integer := 0;
     Options    : Find_Flags := +Find_Default)
       return Qt4.Text_Cursors.Q_Text_Cursor;

   procedure Print
    (Self    : not null access constant Qt4.Text_Documents.Q_Text_Document'Class;
     Printer : in out Qt4.Printers.Q_Printer'Class);

   package Q_Text_Document_Pointers is
     new Qt_Ada.Generic_Object_Pointers (Q_Text_Document, Q_Text_Document_Access);

   type Q_Text_Document_Pointer is
     new Q_Text_Document_Pointers.Q_Pointer with null record;

end Qt4.Text_Documents;
