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

with Qt_Ada.Internals.Objects.Text_Edit_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Text_Edit_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_Edits is

   procedure setDocument_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Document : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setDocument_0_wrapper,
                     "__Qt4Ada_QTextEdit_setDocument_0_wrapper");

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

   procedure setTextCursor_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Cursor : not null access constant Qt4.Text_Cursors.Thin.QTextCursor);
   pragma Import (C, setTextCursor_0_wrapper,
                     "__Qt4Ada_QTextEdit_setTextCursor_0_wrapper");

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

   function isReadOnly_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, isReadOnly_0_wrapper,
                     "__Qt4Ada_QTextEdit_isReadOnly_0_wrapper");

   procedure setReadOnly_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Ro : Qt4.bool);
   pragma Import (C, setReadOnly_0_wrapper,
                     "__Qt4Ada_QTextEdit_setReadOnly_0_wrapper");

   function fontPointSize_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Real;
   pragma Import (C, fontPointSize_0_wrapper,
                     "__Qt4Ada_QTextEdit_fontPointSize_0_wrapper");

   procedure fontFamily_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, fontFamily_0_wrapper,
                     "__Qt4Ada_QTextEdit_fontFamily_0_wrapper");

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

   function fontUnderline_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, fontUnderline_0_wrapper,
                     "__Qt4Ada_QTextEdit_fontUnderline_0_wrapper");

   function fontItalic_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, fontItalic_0_wrapper,
                     "__Qt4Ada_QTextEdit_fontItalic_0_wrapper");

   procedure textColor_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Colors.Internals.QColor);
   pragma Import (C, textColor_0_wrapper,
                     "__Qt4Ada_QTextEdit_textColor_0_wrapper");

   procedure currentFont_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Fonts.Internals.QFont);
   pragma Import (C, currentFont_0_wrapper,
                     "__Qt4Ada_QTextEdit_currentFont_0_wrapper");

   procedure mergeCurrentCharFormat_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Modifier : not null access constant Qt4.Text_Formats.Internals.QTextFormat);
   pragma Import (C, mergeCurrentCharFormat_0_wrapper,
                     "__Qt4Ada_QTextEdit_mergeCurrentCharFormat_0_wrapper");

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

   function tabChangesFocus_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, tabChangesFocus_0_wrapper,
                     "__Qt4Ada_QTextEdit_tabChangesFocus_0_wrapper");

   procedure setTabChangesFocus_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     B : Qt4.bool);
   pragma Import (C, setTabChangesFocus_0_wrapper,
                     "__Qt4Ada_QTextEdit_setTabChangesFocus_0_wrapper");

   procedure setDocumentTitle_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Title : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setDocumentTitle_0_wrapper,
                     "__Qt4Ada_QTextEdit_setDocumentTitle_0_wrapper");

   procedure documentTitle_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, documentTitle_0_wrapper,
                     "__Qt4Ada_QTextEdit_documentTitle_0_wrapper");

   function isUndoRedoEnabled_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, isUndoRedoEnabled_0_wrapper,
                     "__Qt4Ada_QTextEdit_isUndoRedoEnabled_0_wrapper");

   procedure setUndoRedoEnabled_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Enable : Qt4.bool);
   pragma Import (C, setUndoRedoEnabled_0_wrapper,
                     "__Qt4Ada_QTextEdit_setUndoRedoEnabled_0_wrapper");

   function lineWrapMode_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Text_Edits.Text_Edit_Line_Wrap_Mode;
   pragma Import (C, lineWrapMode_0_wrapper,
                     "__Qt4Ada_QTextEdit_lineWrapMode_0_wrapper");

   procedure setLineWrapMode_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Mode : Qt4.Text_Edits.Text_Edit_Line_Wrap_Mode);
   pragma Import (C, setLineWrapMode_0_wrapper,
                     "__Qt4Ada_QTextEdit_setLineWrapMode_0_wrapper");

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

   procedure setLineWrapColumnOrWidth_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     W : Qt4.Q_Integer);
   pragma Import (C, setLineWrapColumnOrWidth_0_wrapper,
                     "__Qt4Ada_QTextEdit_setLineWrapColumnOrWidth_0_wrapper");

   procedure toPlainText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, toPlainText_0_wrapper,
                     "__Qt4Ada_QTextEdit_toPlainText_0_wrapper");

   procedure toHtml_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, toHtml_0_wrapper,
                     "__Qt4Ada_QTextEdit_toHtml_0_wrapper");

   procedure ensureCursorVisible_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, ensureCursorVisible_0_wrapper,
                     "__Qt4Ada_QTextEdit_ensureCursorVisible_0_wrapper");

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

   procedure cursorForPosition_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Pos : not null access constant Qt4.Points.Internals.QPoint;
     Returns : out Qt4.Text_Cursors.Thin.QTextCursor);
   pragma Import (C, cursorForPosition_0_wrapper,
                     "__Qt4Ada_QTextEdit_cursorForPosition_0_wrapper");

   procedure cursorRect_1_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Cursor : not null access constant Qt4.Text_Cursors.Thin.QTextCursor;
     Returns : not null access Qt4.Rects.Internals.QRect);
   pragma Import (C, cursorRect_1_wrapper,
                     "__Qt4Ada_QTextEdit_cursorRect_1_wrapper");

   procedure cursorRect_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Rects.Internals.QRect);
   pragma Import (C, cursorRect_0_wrapper,
                     "__Qt4Ada_QTextEdit_cursorRect_0_wrapper");

   procedure anchorAt_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Pos : not null access constant Qt4.Points.Internals.QPoint;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, anchorAt_0_wrapper,
                     "__Qt4Ada_QTextEdit_anchorAt_0_wrapper");

   function overwriteMode_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, overwriteMode_0_wrapper,
                     "__Qt4Ada_QTextEdit_overwriteMode_0_wrapper");

   procedure setOverwriteMode_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Overwrite : Qt4.bool);
   pragma Import (C, setOverwriteMode_0_wrapper,
                     "__Qt4Ada_QTextEdit_setOverwriteMode_0_wrapper");

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

   procedure setTabStopWidth_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Width : Qt4.Q_Integer);
   pragma Import (C, setTabStopWidth_0_wrapper,
                     "__Qt4Ada_QTextEdit_setTabStopWidth_0_wrapper");

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

   procedure setCursorWidth_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Width : Qt4.Q_Integer);
   pragma Import (C, setCursorWidth_0_wrapper,
                     "__Qt4Ada_QTextEdit_setCursorWidth_0_wrapper");

   function acceptRichText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, acceptRichText_0_wrapper,
                     "__Qt4Ada_QTextEdit_acceptRichText_0_wrapper");

   procedure setAcceptRichText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Acc : Qt4.bool);
   pragma Import (C, setAcceptRichText_0_wrapper,
                     "__Qt4Ada_QTextEdit_setAcceptRichText_0_wrapper");

   function canPaste_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.bool;
   pragma Import (C, canPaste_0_wrapper,
                     "__Qt4Ada_QTextEdit_canPaste_0_wrapper");

   procedure setFontPointSize_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     S : Qt4.Q_Real);
   pragma Import (C, setFontPointSize_0_wrapper,
                     "__Qt4Ada_QTextEdit_setFontPointSize_0_wrapper");

   procedure setFontFamily_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Font_Family : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setFontFamily_0_wrapper,
                     "__Qt4Ada_QTextEdit_setFontFamily_0_wrapper");

   procedure setFontWeight_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Weight : Qt4.Q_Integer);
   pragma Import (C, setFontWeight_0_wrapper,
                     "__Qt4Ada_QTextEdit_setFontWeight_0_wrapper");

   procedure setFontUnderline_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Underline : Qt4.bool);
   pragma Import (C, setFontUnderline_0_wrapper,
                     "__Qt4Ada_QTextEdit_setFontUnderline_0_wrapper");

   procedure setFontItalic_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Italic : Qt4.bool);
   pragma Import (C, setFontItalic_0_wrapper,
                     "__Qt4Ada_QTextEdit_setFontItalic_0_wrapper");

   procedure setTextColor_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     C : not null access constant Qt4.Colors.Internals.QColor);
   pragma Import (C, setTextColor_0_wrapper,
                     "__Qt4Ada_QTextEdit_setTextColor_0_wrapper");

   procedure setCurrentFont_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     F : not null access constant Qt4.Fonts.Internals.QFont);
   pragma Import (C, setCurrentFont_0_wrapper,
                     "__Qt4Ada_QTextEdit_setCurrentFont_0_wrapper");

   procedure setPlainText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setPlainText_0_wrapper,
                     "__Qt4Ada_QTextEdit_setPlainText_0_wrapper");

   procedure setHtml_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setHtml_0_wrapper,
                     "__Qt4Ada_QTextEdit_setHtml_0_wrapper");

   procedure setText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setText_0_wrapper,
                     "__Qt4Ada_QTextEdit_setText_0_wrapper");

   procedure cut_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, cut_0_wrapper,
                     "__Qt4Ada_QTextEdit_cut_0_wrapper");

   procedure copy_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, copy_0_wrapper,
                     "__Qt4Ada_QTextEdit_copy_0_wrapper");

   procedure paste_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, paste_0_wrapper,
                     "__Qt4Ada_QTextEdit_paste_0_wrapper");

   procedure undo_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, undo_0_wrapper,
                     "__Qt4Ada_QTextEdit_undo_0_wrapper");

   procedure redo_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, redo_0_wrapper,
                     "__Qt4Ada_QTextEdit_redo_0_wrapper");

   procedure clear_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, clear_0_wrapper,
                     "__Qt4Ada_QTextEdit_clear_0_wrapper");

   procedure selectAll_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, selectAll_0_wrapper,
                     "__Qt4Ada_QTextEdit_selectAll_0_wrapper");

   procedure insertPlainText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, insertPlainText_0_wrapper,
                     "__Qt4Ada_QTextEdit_insertPlainText_0_wrapper");

   procedure insertHtml_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, insertHtml_0_wrapper,
                     "__Qt4Ada_QTextEdit_insertHtml_0_wrapper");

   procedure append_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, append_0_wrapper,
                     "__Qt4Ada_QTextEdit_append_0_wrapper");

   procedure scrollToAnchor_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Name : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, scrollToAnchor_0_wrapper,
                     "__Qt4Ada_QTextEdit_scrollToAnchor_0_wrapper");

   procedure zoomIn_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Rng : Qt4.Q_Integer);
   pragma Import (C, zoomIn_0_wrapper,
                     "__Qt4Ada_QTextEdit_zoomIn_0_wrapper");

   procedure zoomOut_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Rng : Qt4.Q_Integer);
   pragma Import (C, zoomOut_0_wrapper,
                     "__Qt4Ada_QTextEdit_zoomOut_0_wrapper");

   pragma Style_Checks ("N");

   ------------------
   -- Set_Document --
   ------------------

   procedure Set_Document
    (Self : not null access Q_Text_Edit'Class;
     Document : not null access Qt4.Text_Documents.Q_Text_Document'Class)
   is
   begin
      setDocument_0_wrapper
       (Self.QObject_View,
        Document.QObject_View);
   end Set_Document;

   --------------
   -- Document --
   --------------

   function Document
    (Self : not null access constant Q_Text_Edit'Class)
       return not null access Qt4.Text_Documents.Q_Text_Document'Class
   is
   begin
      return
        Qt4.Text_Documents.Q_Text_Document'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (document_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Document;

   ---------------------
   -- Set_Text_Cursor --
   ---------------------

   procedure Set_Text_Cursor
    (Self : not null access Q_Text_Edit'Class;
     Cursor : Qt4.Text_Cursors.Q_Text_Cursor)
   is
   begin
      setTextCursor_0_wrapper
       (Self.QObject_View,
        Qt4.Text_Cursors.Internals.QTextCursor_View (Cursor));
   end Set_Text_Cursor;

   -----------------
   -- Text_Cursor --
   -----------------

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

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

      return Returns;
   end Text_Cursor;

   ------------------
   -- Is_Read_Only --
   ------------------

   function Is_Read_Only
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isReadOnly_0_wrapper
           (Self.QObject_View));
   end Is_Read_Only;

   -------------------
   -- Set_Read_Only --
   -------------------

   procedure Set_Read_Only
    (Self : not null access Q_Text_Edit'Class;
     Ro : Standard.Boolean)
   is
   begin
      setReadOnly_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Ro));
   end Set_Read_Only;

   ---------------------
   -- Font_Point_Size --
   ---------------------

   function Font_Point_Size
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Q_Real
   is
   begin
      return
        fontPointSize_0_wrapper
         (Self.QObject_View);
   end Font_Point_Size;

   -----------------
   -- Font_Family --
   -----------------

   function Font_Family
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      fontFamily_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Font_Family;

   -----------------
   -- Font_Weight --
   -----------------

   function Font_Weight
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        fontWeight_0_wrapper
         (Self.QObject_View);
   end Font_Weight;

   --------------------
   -- Font_Underline --
   --------------------

   function Font_Underline
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (fontUnderline_0_wrapper
           (Self.QObject_View));
   end Font_Underline;

   -----------------
   -- Font_Italic --
   -----------------

   function Font_Italic
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (fontItalic_0_wrapper
           (Self.QObject_View));
   end Font_Italic;

   ----------------
   -- Text_Color --
   ----------------

   function Text_Color
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Colors.Q_Color
   is
      Returns : Qt4.Colors.Q_Color;

   begin
      textColor_0_wrapper
       (Self.QObject_View,
        Qt4.Colors.Internals.QColor_View (Returns));

      return Returns;
   end Text_Color;

   ------------------
   -- Current_Font --
   ------------------

   function Current_Font
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Fonts.Q_Font
   is
      Returns : Qt4.Fonts.Q_Font;

   begin
      currentFont_0_wrapper
       (Self.QObject_View,
        Qt4.Fonts.Internals.QFont_View (Returns));

      return Returns;
   end Current_Font;

   -------------------------------
   -- Merge_Current_Char_Format --
   -------------------------------

   procedure Merge_Current_Char_Format
    (Self : not null access Q_Text_Edit'Class;
     Modifier : Qt4.Text_Char_Formats.Q_Text_Char_Format'Class)
   is
   begin
      mergeCurrentCharFormat_0_wrapper
       (Self.QObject_View,
        Qt4.Text_Formats.Internals.QTextFormat_View (Modifier));
   end Merge_Current_Char_Format;

   -----------------------------
   -- Set_Current_Char_Format --
   -----------------------------

   procedure Set_Current_Char_Format
    (Self : not null access Q_Text_Edit'Class;
     Format : Qt4.Text_Char_Formats.Q_Text_Char_Format'Class)
   is
   begin
      setCurrentCharFormat_0_wrapper
       (Self.QObject_View,
        Qt4.Text_Formats.Internals.QTextFormat_View (Format));
   end Set_Current_Char_Format;

   -----------------------
   -- Tab_Changes_Focus --
   -----------------------

   function Tab_Changes_Focus
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (tabChangesFocus_0_wrapper
           (Self.QObject_View));
   end Tab_Changes_Focus;

   ---------------------------
   -- Set_Tab_Changes_Focus --
   ---------------------------

   procedure Set_Tab_Changes_Focus
    (Self : not null access Q_Text_Edit'Class;
     B : Standard.Boolean)
   is
   begin
      setTabChangesFocus_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (B));
   end Set_Tab_Changes_Focus;

   ------------------------
   -- Set_Document_Title --
   ------------------------

   procedure Set_Document_Title
    (Self : not null access Q_Text_Edit'Class;
     Title : Qt4.Strings.Q_String)
   is
   begin
      setDocumentTitle_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Title));
   end Set_Document_Title;

   --------------------
   -- Document_Title --
   --------------------

   function Document_Title
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      documentTitle_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Document_Title;

   --------------------------
   -- Is_Undo_Redo_Enabled --
   --------------------------

   function Is_Undo_Redo_Enabled
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isUndoRedoEnabled_0_wrapper
           (Self.QObject_View));
   end Is_Undo_Redo_Enabled;

   ---------------------------
   -- Set_Undo_Redo_Enabled --
   ---------------------------

   procedure Set_Undo_Redo_Enabled
    (Self : not null access Q_Text_Edit'Class;
     Enable : Standard.Boolean)
   is
   begin
      setUndoRedoEnabled_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Enable));
   end Set_Undo_Redo_Enabled;

   --------------------
   -- Line_Wrap_Mode --
   --------------------

   function Line_Wrap_Mode
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Text_Edits.Text_Edit_Line_Wrap_Mode
   is
   begin
      return
        lineWrapMode_0_wrapper
         (Self.QObject_View);
   end Line_Wrap_Mode;

   ------------------------
   -- Set_Line_Wrap_Mode --
   ------------------------

   procedure Set_Line_Wrap_Mode
    (Self : not null access Q_Text_Edit'Class;
     Mode : Qt4.Text_Edits.Text_Edit_Line_Wrap_Mode)
   is
   begin
      setLineWrapMode_0_wrapper
       (Self.QObject_View,
        Mode);
   end Set_Line_Wrap_Mode;

   -------------------------------
   -- Line_Wrap_Column_Or_Width --
   -------------------------------

   function Line_Wrap_Column_Or_Width
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        lineWrapColumnOrWidth_0_wrapper
         (Self.QObject_View);
   end Line_Wrap_Column_Or_Width;

   -----------------------------------
   -- Set_Line_Wrap_Column_Or_Width --
   -----------------------------------

   procedure Set_Line_Wrap_Column_Or_Width
    (Self : not null access Q_Text_Edit'Class;
     W : Qt4.Q_Integer)
   is
   begin
      setLineWrapColumnOrWidth_0_wrapper
       (Self.QObject_View,
        W);
   end Set_Line_Wrap_Column_Or_Width;

   -------------------
   -- To_Plain_Text --
   -------------------

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

   begin
      toPlainText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end To_Plain_Text;

   -------------
   -- To_Html --
   -------------

   function To_Html
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      toHtml_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end To_Html;

   ---------------------------
   -- Ensure_Cursor_Visible --
   ---------------------------

   procedure Ensure_Cursor_Visible
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      ensureCursorVisible_0_wrapper
       (Self.QObject_View);
   end Ensure_Cursor_Visible;

   ----------------------------------
   -- Create_Standard_Context_Menu --
   ----------------------------------

   function Create_Standard_Context_Menu
    (Self : not null access Q_Text_Edit'Class)
       return not null access Qt4.Menus.Q_Menu'Class
   is
   begin
      return
        Qt4.Menus.Q_Menu'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (createStandardContextMenu_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Create_Standard_Context_Menu;

   -------------------------
   -- Cursor_For_Position --
   -------------------------

   function Cursor_For_Position
    (Self : not null access constant Q_Text_Edit'Class;
     Pos : Qt4.Points.Q_Point)
       return Qt4.Text_Cursors.Q_Text_Cursor
   is
      Returns : Qt4.Text_Cursors.Q_Text_Cursor;

   begin
      cursorForPosition_0_wrapper
       (Self.QObject_View,
        Qt4.Points.Internals.QPoint_View (Pos),
        Qt4.Text_Cursors.Internals.QTextCursor_View (Returns).all);

      return Returns;
   end Cursor_For_Position;

   -----------------
   -- Cursor_Rect --
   -----------------

   function Cursor_Rect
    (Self : not null access constant Q_Text_Edit'Class;
     Cursor : Qt4.Text_Cursors.Q_Text_Cursor)
       return Qt4.Rects.Q_Rect
   is
      Returns : Qt4.Rects.Q_Rect;

   begin
      cursorRect_1_wrapper
       (Self.QObject_View,
        Qt4.Text_Cursors.Internals.QTextCursor_View (Cursor),
        Qt4.Rects.Internals.QRect_View (Returns));

      return Returns;
   end Cursor_Rect;

   -----------------
   -- Cursor_Rect --
   -----------------

   function Cursor_Rect
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Rects.Q_Rect
   is
      Returns : Qt4.Rects.Q_Rect;

   begin
      cursorRect_0_wrapper
       (Self.QObject_View,
        Qt4.Rects.Internals.QRect_View (Returns));

      return Returns;
   end Cursor_Rect;

   ---------------
   -- Anchor_At --
   ---------------

   function Anchor_At
    (Self : not null access constant Q_Text_Edit'Class;
     Pos : Qt4.Points.Q_Point)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      anchorAt_0_wrapper
       (Self.QObject_View,
        Qt4.Points.Internals.QPoint_View (Pos),
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Anchor_At;

   --------------------
   -- Overwrite_Mode --
   --------------------

   function Overwrite_Mode
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (overwriteMode_0_wrapper
           (Self.QObject_View));
   end Overwrite_Mode;

   ------------------------
   -- Set_Overwrite_Mode --
   ------------------------

   procedure Set_Overwrite_Mode
    (Self : not null access Q_Text_Edit'Class;
     Overwrite : Standard.Boolean)
   is
   begin
      setOverwriteMode_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Overwrite));
   end Set_Overwrite_Mode;

   --------------------
   -- Tab_Stop_Width --
   --------------------

   function Tab_Stop_Width
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        tabStopWidth_0_wrapper
         (Self.QObject_View);
   end Tab_Stop_Width;

   ------------------------
   -- Set_Tab_Stop_Width --
   ------------------------

   procedure Set_Tab_Stop_Width
    (Self : not null access Q_Text_Edit'Class;
     Width : Qt4.Q_Integer)
   is
   begin
      setTabStopWidth_0_wrapper
       (Self.QObject_View,
        Width);
   end Set_Tab_Stop_Width;

   ------------------
   -- Cursor_Width --
   ------------------

   function Cursor_Width
    (Self : not null access constant Q_Text_Edit'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        cursorWidth_0_wrapper
         (Self.QObject_View);
   end Cursor_Width;

   ----------------------
   -- Set_Cursor_Width --
   ----------------------

   procedure Set_Cursor_Width
    (Self : not null access Q_Text_Edit'Class;
     Width : Qt4.Q_Integer)
   is
   begin
      setCursorWidth_0_wrapper
       (Self.QObject_View,
        Width);
   end Set_Cursor_Width;

   ----------------------
   -- Accept_Rich_Text --
   ----------------------

   function Accept_Rich_Text
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (acceptRichText_0_wrapper
           (Self.QObject_View));
   end Accept_Rich_Text;

   --------------------------
   -- Set_Accept_Rich_Text --
   --------------------------

   procedure Set_Accept_Rich_Text
    (Self : not null access Q_Text_Edit'Class;
     Acc : Standard.Boolean)
   is
   begin
      setAcceptRichText_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Acc));
   end Set_Accept_Rich_Text;

   ---------------
   -- Can_Paste --
   ---------------

   function Can_Paste
    (Self : not null access constant Q_Text_Edit'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (canPaste_0_wrapper
           (Self.QObject_View));
   end Can_Paste;

   -------------------------
   -- Set_Font_Point_Size --
   -------------------------

   procedure Set_Font_Point_Size
    (Self : not null access Q_Text_Edit'Class;
     S : Qt4.Q_Real)
   is
   begin
      setFontPointSize_0_wrapper
       (Self.QObject_View,
        S);
   end Set_Font_Point_Size;

   ---------------------
   -- Set_Font_Family --
   ---------------------

   procedure Set_Font_Family
    (Self : not null access Q_Text_Edit'Class;
     Font_Family : Qt4.Strings.Q_String)
   is
   begin
      setFontFamily_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Font_Family));
   end Set_Font_Family;

   ---------------------
   -- Set_Font_Weight --
   ---------------------

   procedure Set_Font_Weight
    (Self : not null access Q_Text_Edit'Class;
     Weight : Qt4.Q_Integer)
   is
   begin
      setFontWeight_0_wrapper
       (Self.QObject_View,
        Weight);
   end Set_Font_Weight;

   ------------------------
   -- Set_Font_Underline --
   ------------------------

   procedure Set_Font_Underline
    (Self : not null access Q_Text_Edit'Class;
     Underline : Standard.Boolean)
   is
   begin
      setFontUnderline_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Underline));
   end Set_Font_Underline;

   ---------------------
   -- Set_Font_Italic --
   ---------------------

   procedure Set_Font_Italic
    (Self : not null access Q_Text_Edit'Class;
     Italic : Standard.Boolean)
   is
   begin
      setFontItalic_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Italic));
   end Set_Font_Italic;

   --------------------
   -- Set_Text_Color --
   --------------------

   procedure Set_Text_Color
    (Self : not null access Q_Text_Edit'Class;
     C : Qt4.Colors.Q_Color)
   is
   begin
      setTextColor_0_wrapper
       (Self.QObject_View,
        Qt4.Colors.Internals.QColor_View (C));
   end Set_Text_Color;

   ----------------------
   -- Set_Current_Font --
   ----------------------

   procedure Set_Current_Font
    (Self : not null access Q_Text_Edit'Class;
     F : Qt4.Fonts.Q_Font)
   is
   begin
      setCurrentFont_0_wrapper
       (Self.QObject_View,
        Qt4.Fonts.Internals.QFont_View (F));
   end Set_Current_Font;

   --------------------
   -- Set_Plain_Text --
   --------------------

   procedure Set_Plain_Text
    (Self : not null access Q_Text_Edit'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setPlainText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Plain_Text;

   --------------
   -- Set_Html --
   --------------

   procedure Set_Html
    (Self : not null access Q_Text_Edit'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setHtml_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Html;

   --------------
   -- Set_Text --
   --------------

   procedure Set_Text
    (Self : not null access Q_Text_Edit'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Text;

   ---------
   -- Cut --
   ---------

   procedure Cut
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      cut_0_wrapper
       (Self.QObject_View);
   end Cut;

   ----------
   -- Copy --
   ----------

   procedure Copy
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      copy_0_wrapper
       (Self.QObject_View);
   end Copy;

   -----------
   -- Paste --
   -----------

   procedure Paste
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      paste_0_wrapper
       (Self.QObject_View);
   end Paste;

   ----------
   -- Undo --
   ----------

   procedure Undo
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      undo_0_wrapper
       (Self.QObject_View);
   end Undo;

   ----------
   -- Redo --
   ----------

   procedure Redo
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      redo_0_wrapper
       (Self.QObject_View);
   end Redo;

   -----------
   -- Clear --
   -----------

   procedure Clear
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      clear_0_wrapper
       (Self.QObject_View);
   end Clear;

   ----------------
   -- Select_All --
   ----------------

   procedure Select_All
    (Self : not null access Q_Text_Edit'Class)
   is
   begin
      selectAll_0_wrapper
       (Self.QObject_View);
   end Select_All;

   -----------------------
   -- Insert_Plain_Text --
   -----------------------

   procedure Insert_Plain_Text
    (Self : not null access Q_Text_Edit'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      insertPlainText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Insert_Plain_Text;

   -----------------
   -- Insert_Html --
   -----------------

   procedure Insert_Html
    (Self : not null access Q_Text_Edit'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      insertHtml_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Insert_Html;

   ------------
   -- Append --
   ------------

   procedure Append
    (Self : not null access Q_Text_Edit'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      append_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Append;

   ----------------------
   -- Scroll_To_Anchor --
   ----------------------

   procedure Scroll_To_Anchor
    (Self : not null access Q_Text_Edit'Class;
     Name : Qt4.Strings.Q_String)
   is
   begin
      scrollToAnchor_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Name));
   end Scroll_To_Anchor;

   -------------
   -- Zoom_In --
   -------------

   procedure Zoom_In
    (Self : not null access Q_Text_Edit'Class;
     Rng : Qt4.Q_Integer
       :=  1)
   is
   begin
      zoomIn_0_wrapper
       (Self.QObject_View,
        Rng);
   end Zoom_In;

   --------------
   -- Zoom_Out --
   --------------

   procedure Zoom_Out
    (Self : not null access Q_Text_Edit'Class;
     Rng : Qt4.Q_Integer
       :=  1)
   is
   begin
      zoomOut_0_wrapper
       (Self.QObject_View,
        Rng);
   end Zoom_Out;

end Qt4.Text_Edits;
