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

with Qt_Ada.Internals.Objects.Graphics_Text_Item_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Graphics_Text_Item_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.Graphics_Text_Items is

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

   procedure defaultTextColor_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Colors.Internals.QColor);
   pragma Import (C, defaultTextColor_0_wrapper,
                     "__Qt4Ada_QGraphicsTextItem_defaultTextColor_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_QGraphicsTextItem_document_0_wrapper");

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

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

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

   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_QGraphicsTextItem_setDocument_0_wrapper");

   procedure setFont_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Font : not null access constant Qt4.Fonts.Internals.QFont);
   pragma Import (C, setFont_0_wrapper,
                     "__Qt4Ada_QGraphicsTextItem_setFont_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_QGraphicsTextItem_setHtml_0_wrapper");

   procedure setOpenExternalLinks_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Open : Qt4.bool);
   pragma Import (C, setOpenExternalLinks_0_wrapper,
                     "__Qt4Ada_QGraphicsTextItem_setOpenExternalLinks_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_QGraphicsTextItem_setPlainText_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_QGraphicsTextItem_setTabChangesFocus_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_QGraphicsTextItem_setTextCursor_0_wrapper");

   procedure setTextWidth_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Width : Qt4.Q_Real);
   pragma Import (C, setTextWidth_0_wrapper,
                     "__Qt4Ada_QGraphicsTextItem_setTextWidth_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_QGraphicsTextItem_tabChangesFocus_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_QGraphicsTextItem_textCursor_0_wrapper");

   function textWidth_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Q_Real;
   pragma Import (C, textWidth_0_wrapper,
                     "__Qt4Ada_QGraphicsTextItem_textWidth_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_QGraphicsTextItem_toHtml_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_QGraphicsTextItem_toPlainText_0_wrapper");

   pragma Style_Checks ("N");

   -----------------
   -- Adjust_Size --
   -----------------

   procedure Adjust_Size
    (Self : not null access Q_Graphics_Text_Item'Class)
   is
   begin
      adjustSize_0_wrapper
       (Self.QObject_View);
   end Adjust_Size;

   ------------------------
   -- Default_Text_Color --
   ------------------------

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

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

      return Returns;
   end Default_Text_Color;

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

   function Document
    (Self : not null access constant Q_Graphics_Text_Item'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;

   ----------
   -- Font --
   ----------

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

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

      return Returns;
   end Font;

   -------------------------
   -- Open_External_Links --
   -------------------------

   function Open_External_Links
    (Self : not null access constant Q_Graphics_Text_Item'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (openExternalLinks_0_wrapper
           (Self.QObject_View));
   end Open_External_Links;

   ----------------------------
   -- Set_Default_Text_Color --
   ----------------------------

   procedure Set_Default_Text_Color
    (Self : not null access Q_Graphics_Text_Item'Class;
     Col : Qt4.Colors.Q_Color)
   is
   begin
      setDefaultTextColor_0_wrapper
       (Self.QObject_View,
        Qt4.Colors.Internals.QColor_View (Col));
   end Set_Default_Text_Color;

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

   procedure Set_Document
    (Self : not null access Q_Graphics_Text_Item'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;

   --------------
   -- Set_Font --
   --------------

   procedure Set_Font
    (Self : not null access Q_Graphics_Text_Item'Class;
     Font : Qt4.Fonts.Q_Font)
   is
   begin
      setFont_0_wrapper
       (Self.QObject_View,
        Qt4.Fonts.Internals.QFont_View (Font));
   end Set_Font;

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

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

   -----------------------------
   -- Set_Open_External_Links --
   -----------------------------

   procedure Set_Open_External_Links
    (Self : not null access Q_Graphics_Text_Item'Class;
     Open : Standard.Boolean)
   is
   begin
      setOpenExternalLinks_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Open));
   end Set_Open_External_Links;

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

   procedure Set_Plain_Text
    (Self : not null access Q_Graphics_Text_Item'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_Tab_Changes_Focus --
   ---------------------------

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

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

   procedure Set_Text_Cursor
    (Self : not null access Q_Graphics_Text_Item'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;

   --------------------
   -- Set_Text_Width --
   --------------------

   procedure Set_Text_Width
    (Self : not null access Q_Graphics_Text_Item'Class;
     Width : Qt4.Q_Real)
   is
   begin
      setTextWidth_0_wrapper
       (Self.QObject_View,
        Width);
   end Set_Text_Width;

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

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

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

   function Text_Cursor
    (Self : not null access constant Q_Graphics_Text_Item'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;

   ----------------
   -- Text_Width --
   ----------------

   function Text_Width
    (Self : not null access constant Q_Graphics_Text_Item'Class)
       return Qt4.Q_Real
   is
   begin
      return
        textWidth_0_wrapper
         (Self.QObject_View);
   end Text_Width;

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

   function To_Html
    (Self : not null access constant Q_Graphics_Text_Item'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;

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

   function To_Plain_Text
    (Self : not null access constant Q_Graphics_Text_Item'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;

end Qt4.Graphics_Text_Items;
