------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2009-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.     --
------------------------------------------------------------------------------
private with Ada.Finalization;
with Interfaces.C;
with Qt4.Brushes;
with Qt4.Colors;
with Qt4.Fonts;
with Qt4.Pens;
with Qt4.String_Lists;
with Qt4.Strings;
with Qt4.Text_Lengths;
with Qt4.Variants;
with Qt_Ada.Internals.Generic_Q_Flags;
private with Qt_Ada.Internals.Value_Class_Sizes;
with System;

package Qt4.Text_Formats is

   --  QTextFormat::FormatType

   type Text_Format_Type is new Interfaces.C.int;

   Invalid_Format : constant Text_Format_Type := -1;
   Block_Format   : constant Text_Format_Type := 1;
   Char_Format    : constant Text_Format_Type := 2;
   List_Format    : constant Text_Format_Type := 3;
   Table_Format   : constant Text_Format_Type := 4;
   Frame_Format   : constant Text_Format_Type := 5;
   User_Format    : constant Text_Format_Type := 100;

   --  QTextFormat::ObjectTypes

   type Object_Types is
    (No_Object,
     Image_Object,
     Table_Object,
     User_Object);
   pragma Convention (C, Object_Types);
   for Object_Types'Size use Interfaces.C.unsigned'Size;
   for Object_Types use
    (No_Object    => 0,
     Image_Object => 1,
     Table_Object => 2,
     User_Object  => 4096);

   --  QTextFormat::PageBreakFlag

   type Page_Break_Flag is
    (Page_Break_Always_Before,
     Page_Break_Always_After);
   pragma Convention (C, Page_Break_Flag);
   for Page_Break_Flag'Size use Interfaces.C.unsigned'Size;
   for Page_Break_Flag use
    (Page_Break_Always_Before => 1,
     Page_Break_Always_After  => 16);

   --  Qt::PageBreakFlags

   package Q_Flags_Of_Page_Break_Flag is
     new Qt_Ada.Internals.Generic_Q_Flags (Page_Break_Flag);

   type Page_Break_Flags is new Q_Flags_Of_Page_Break_Flag.Flags;

   --  QTextFormat::Property

   type Text_Property is new Interfaces.C.unsigned;

   Object_Index_Property                   : constant Text_Property := 0;
   Css_Float_Property                      : constant Text_Property := 2048;
   Layout_Direction_Property               : constant Text_Property := 2049;
   Outline_Pen_Property                    : constant Text_Property := 2064;
   Background_Brush_Property               : constant Text_Property := 2080;
   Foreground_Brush_Property               : constant Text_Property := 2081;
   Block_Alignment_Property                : constant Text_Property := 4112;
   Block_Top_Margin_Property               : constant Text_Property := 4144;
   Block_Bottom_Margin_Property            : constant Text_Property := 4145;
   Block_Left_Margin_Property              : constant Text_Property := 4146;
   Block_Right_Margin_Property             : constant Text_Property := 4147;
   Text_Indent_Property                    : constant Text_Property := 4148;
   Block_Indent_Property                   : constant Text_Property := 4160;
   Block_Non_Breakable_Lines_Property      : constant Text_Property := 4176;
   Block_Trailing_Horizontal_Ruler_Width_Property : constant Text_Property
     := 4192;
   Font_Family_Property                    : constant Text_Property := 8192;
   Font_Point_Size_Property                : constant Text_Property := 8193;
   Font_Size_Adjustment_Property           : constant Text_Property := 8194;
   Font_Weight_Property                    : constant Text_Property := 8195;
   Font_Italic_Property                    : constant Text_Property := 8196;
   Font_Underline_Property                 : constant Text_Property := 8197;
   Font_Overline_Property                  : constant Text_Property := 8198;
   Font_Strike_Out_Property                : constant Text_Property := 8199;
   Font_Fixed_Pitch_Property               : constant Text_Property := 8200;
   Font_Pixel_Size_Property                : constant Text_Property := 8201;
   Text_Underline_Color_Property           : constant Text_Property := 8208;
   Text_Vertical_Alignment_Property        : constant Text_Property := 8225;
   Text_Outline_Property                   : constant Text_Property := 8226;
   Text_Underline_Style_Property           : constant Text_Property := 8227;
   Text_Tool_Tip_Property                  : constant Text_Property := 8228;
   Is_Anchor_Property                      : constant Text_Property := 8240;
   Anchor_Href_Property                    : constant Text_Property := 8241;
   Anchor_Name_Property                    : constant Text_Property := 8242;
   Object_Type_Property                    : constant Text_Property := 12032;
   List_Style_Property                     : constant Text_Property := 12288;
   List_Indent_Property                    : constant Text_Property := 12289;
   Frame_Border_Property                   : constant Text_Property := 16384;
   Frame_Margin_Property                   : constant Text_Property := 16385;
   Frame_Padding_Property                  : constant Text_Property := 16386;
   Frame_Width_Property                    : constant Text_Property := 16387;
   Frame_Height_Property                   : constant Text_Property := 16388;
   Frame_Top_Margin_Property               : constant Text_Property := 16389;
   Frame_Bottom_Margin_Property            : constant Text_Property := 16390;
   Frame_Left_Margin_Property              : constant Text_Property := 16391;
   Frame_Right_Margin_Property             : constant Text_Property := 16392;
   Frame_Border_Brush_Property             : constant Text_Property := 16393;
   Frame_Border_Style_Property             : constant Text_Property := 16400;
   Table_Columns_Property                  : constant Text_Property := 16640;
   Table_Column_Width_Constraints_Property : constant Text_Property := 16641;
   Table_Cell_Spacing_Property             : constant Text_Property := 16642;
   Table_Cell_Padding_Property             : constant Text_Property := 16643;
   Table_Header_Row_Count_Property         : constant Text_Property := 16644;
   Table_Cell_Row_Span_Property            : constant Text_Property := 18448;
   Table_Cell_Column_Span_Property         : constant Text_Property := 18449;
   Image_Name_Property                     : constant Text_Property := 20480;
   Image_Width_Property                    : constant Text_Property := 20496;
   Image_Height_Property                   : constant Text_Property := 20497;
   Full_Width_Selection_Property           : constant Text_Property := 24576;
   Page_Break_Policy_Property              : constant Text_Property := 28672;
   User_Property                           : constant Text_Property := 1048576;

   --  QTextCharFormat::VerticalAlignment

   type Text_Char_Vertical_Alignment is
    (Align_Normal,
     Align_Super_Script,
     Align_Sub_Script,
     Align_Middle,
     Align_Top,
     Align_Bottom);
   pragma Convention (C, Text_Char_Vertical_Alignment);
   for Text_Char_Vertical_Alignment'Size use Interfaces.C.unsigned'Size;

   --  QTextCharFormat::UnderlineStyle

   type Text_Char_Underline_Style is
    (No_Underline,
     Single_Underline,
     Dash_Underline,
     Dot_Line,
     Dash_Dot_Line,
     Dash_Dot_Dot_Line,
     Wave_Underline,
     Spell_Check_Underline);
   pragma Convention (C, Text_Char_Underline_Style);
   for Text_Char_Underline_Style'Size use Interfaces.C.unsigned'Size;

   --  QTextFrameFormat::BorderStyle

   type Text_Frame_Border_Style is
    (Border_Style_None,
     Border_Style_Dotted,
     Border_Style_Dashed,
     Border_Style_Solid,
     Border_Style_Double,
     Border_Style_Dot_Dash,
     Border_Style_Dot_Dot_Dash,
     Border_Style_Groove,
     Border_Style_Ridge,
     Border_Style_Inset,
     Border_Style_Outset);
   pragma Convention (C, Text_Frame_Border_Style);
   for Text_Frame_Border_Style'Size use Interfaces.C.unsigned'Size;

   --  QTextFrameFormat::Position

   type Text_Frame_Position is
    (In_Flow,
     Float_Left,
     Float_Right);
   pragma Convention (C, Text_Frame_Position);
   for Text_Frame_Position'Size use Interfaces.C.unsigned'Size;

   --  QTextListFormat::Style

   type Text_List_Style is
    (List_Upper_Alpha,
     List_Lower_Alpha,
     List_Decimal,
     List_Square,
     List_Circle,
     List_Disc,
     List_Style_Undefined);
   pragma Convention (C, Text_List_Style);
   for Text_List_Style'Size use Interfaces.C.int'Size;
   for Text_List_Style use
    (List_Upper_Alpha     => -6,
     List_Lower_Alpha     => -5,
     List_Decimal         => -4,
     List_Square          => -3,
     List_Circle          => -2,
     List_Disc            => -1,
     List_Style_Undefined => 0);

   type Q_Text_Format is tagged private;

   type Q_Text_Block_Format is new Q_Text_Format with private;

   type Q_Text_Char_Format is new Q_Text_Format with private;

   type Q_Text_Image_Format is new Q_Text_Char_Format with private;

   type Q_Text_Table_Cell_Format is new Q_Text_Char_Format with private;

   type Q_Text_Frame_Format is new Q_Text_Format with private;

   type Q_Text_Table_Format is new Q_Text_Frame_Format with private;

   type Q_Text_List_Format is new Q_Text_Format with private;

   function Background
    (Self : Q_Text_Format'Class)
       return Qt4.Brushes.Q_Brush;

   function Bool_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Boolean;

   function Brush_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Brushes.Q_Brush;

   procedure Clear_Background
    (Self : in out Q_Text_Format'Class);

   procedure Clear_Foreground
    (Self : in out Q_Text_Format'Class);

   procedure Clear_Property
    (Self : in out Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property);

   function Color_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Colors.Q_Color;

   function Double_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Q_Real;

   function Foreground
    (Self : Q_Text_Format'Class)
       return Qt4.Brushes.Q_Brush;

   function Int_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Q_Integer;

   function Is_Block_Format
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Is_Char_Format
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Is_Frame_Format
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Is_Image_Format
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Is_List_Format
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Is_Table_Cell_Format
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Is_Table_Format
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Is_Valid
    (Self : Q_Text_Format'Class)
       return Boolean;

   function Layout_Direction
    (Self : Q_Text_Format'Class)
       return Qt4.Layout_Direction;

   function Length_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Text_Lengths.Q_Text_Length;

   procedure Merge
    (Self : in out Q_Text_Format'Class;
     Other : Q_Text_Format'Class);

   function Object_Index
    (Self : Q_Text_Format'Class)
       return Qt4.Q_Integer;

   function Object_Type
    (Self : Q_Text_Format'Class)
       return Qt4.Q_Integer;

   function Pen_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Pens.Q_Pen;

   function Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Variants.Q_Variant;

   function Property_Count
    (Self : Q_Text_Format'Class)
       return Qt4.Q_Integer;

   procedure Set_Background
    (Self : in out Q_Text_Format'Class;
     Brush : Qt4.Brushes.Q_Brush'Class);

   procedure Set_Foreground
    (Self : in out Q_Text_Format'Class;
     Brush : Qt4.Brushes.Q_Brush'Class);

   procedure Set_Layout_Direction
    (Self : in out Q_Text_Format'Class;
     Direction : Qt4.Layout_Direction);

   procedure Set_Object_Index
    (Self : in out Q_Text_Format'Class;
     Object : Qt4.Q_Integer);

   procedure Set_Object_Type
    (Self : in out Q_Text_Format'Class;
     Object_Type : Qt4.Q_Integer);

   procedure Set_Property
    (Self : in out Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property;
     Value : Qt4.Variants.Q_Variant'Class);

   function String_Property
    (Self : Q_Text_Format'Class;
     Property_Id : Qt4.Text_Formats.Text_Property)
       return Qt4.Strings.Q_String;

   function To_Block_Format
    (Self : Q_Text_Format'Class)
       return Q_Text_Block_Format;

   function To_Char_Format
    (Self : Q_Text_Format'Class)
       return Q_Text_Char_Format;

   function To_Frame_Format
    (Self : Q_Text_Format'Class)
       return Q_Text_Frame_Format;

   function To_Image_Format
    (Self : Q_Text_Format'Class)
       return Q_Text_Image_Format;

   function To_List_Format
    (Self : Q_Text_Format'Class)
       return Q_Text_List_Format;

   function To_Table_Cell_Format
    (Self : Q_Text_Format'Class)
       return Q_Text_Table_Cell_Format;

   function To_Table_Format
    (Self : Q_Text_Format'Class)
       return Q_Text_Table_Format;

   function Format_Type
    (Self : Q_Text_Format'Class)
       return Text_Format_Type;

   overriding function "="
    (Self : Q_Text_Format;
     Other : Q_Text_Format)
       return Boolean;

   function Bottom_Margin
    (Self : Q_Text_Block_Format'Class)
       return Qt4.Q_Real;

   function Indent
    (Self : Q_Text_Block_Format'Class)
       return Qt4.Q_Integer;

   function Is_Valid
    (Self : Q_Text_Block_Format'Class)
       return Boolean;

   function Left_Margin
    (Self : Q_Text_Block_Format'Class)
       return Qt4.Q_Real;

   function Non_Breakable_Lines
    (Self : Q_Text_Block_Format'Class)
       return Boolean;

   function Right_Margin
    (Self : Q_Text_Block_Format'Class)
       return Qt4.Q_Real;

   procedure Set_Bottom_Margin
    (Self : in out Q_Text_Block_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Indent
    (Self : in out Q_Text_Block_Format'Class;
     Indent : Qt4.Q_Integer);

   procedure Set_Left_Margin
    (Self : in out Q_Text_Block_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Non_Breakable_Lines
    (Self : in out Q_Text_Block_Format'Class;
     B : Boolean);

   procedure Set_Right_Margin
    (Self : in out Q_Text_Block_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Text_Indent
    (Self : in out Q_Text_Block_Format'Class;
     Indent : Qt4.Q_Real);

   procedure Set_Top_Margin
    (Self : in out Q_Text_Block_Format'Class;
     Margin : Qt4.Q_Real);

   function Text_Indent
    (Self : Q_Text_Block_Format'Class)
       return Qt4.Q_Real;

   function Top_Margin
    (Self : Q_Text_Block_Format'Class)
       return Qt4.Q_Real;

   function Anchor_Href
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Strings.Q_String;

   function Anchor_Names
    (Self : Q_Text_Char_Format'Class)
       return Qt4.String_Lists.Q_String_List;

   function Font
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Fonts.Q_Font;

   function Font_Capitalization
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Fonts.Capitalization;

   function Font_Family
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Strings.Q_String;

   function Font_Fixed_Pitch
    (Self : Q_Text_Char_Format'Class)
       return Boolean;

   function Font_Italic
    (Self : Q_Text_Char_Format'Class)
       return Boolean;

   function Font_Letter_Spacing
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Q_Real;

   function Font_Overline
    (Self : Q_Text_Char_Format'Class)
       return Boolean;

   function Font_Point_Size
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Q_Real;

   function Font_Strike_Out
    (Self : Q_Text_Char_Format'Class)
       return Boolean;

   function Font_Underline
    (Self : Q_Text_Char_Format'Class)
       return Boolean;

   function Font_Weight
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Fonts.Font_Weight;

   function Font_Word_Spacing
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Q_Real;

   function Is_Anchor
    (Self : Q_Text_Char_Format'Class)
       return Boolean;

   function Is_Valid
    (Self : Q_Text_Char_Format'Class)
       return Boolean;

   procedure Set_Anchor
    (Self : in out Q_Text_Char_Format'Class;
     Anchor : Boolean);

   procedure Set_Anchor_Href
    (Self : in out Q_Text_Char_Format'Class;
     Anchor : Qt4.Strings.Q_String'Class);

   procedure Set_Anchor_Names
    (Self : in out Q_Text_Char_Format'Class;
     Names : Qt4.String_Lists.Q_String_List'Class);

   procedure Set_Font
    (Self : in out Q_Text_Char_Format'Class;
     Font : Qt4.Fonts.Q_Font'Class);

   procedure Set_Font_Capitalization
    (Self : in out Q_Text_Char_Format'Class;
     Capitalization : Qt4.Fonts.Capitalization);

   procedure Set_Font_Family
    (Self : in out Q_Text_Char_Format'Class;
     Anchor : Qt4.Strings.Q_String'Class);

   procedure Set_Font_Fixed_Pitch
    (Self : in out Q_Text_Char_Format'Class;
     Fixed_Pitch : Boolean);

   procedure Set_Font_Italic
    (Self : in out Q_Text_Char_Format'Class;
     Italic : Boolean);

   procedure Set_Font_Letter_Spacing
    (Self : in out Q_Text_Char_Format'Class;
     Spacing : Qt4.Q_Real);

   procedure Set_Font_Overline
    (Self : in out Q_Text_Char_Format'Class;
     Overline : Boolean);

   procedure Set_Font_Point_Size
    (Self : in out Q_Text_Char_Format'Class;
     Size : Qt4.Q_Real);

   procedure Set_Font_Strike_Out
    (Self : in out Q_Text_Char_Format'Class;
     Strike_Out : Boolean);

   procedure Set_Font_Underline
    (Self : in out Q_Text_Char_Format'Class;
     Underline : Boolean);

   procedure Set_Font_Weight
    (Self : in out Q_Text_Char_Format'Class;
     Weight : Qt4.Fonts.Font_Weight);

   procedure Set_Font_Word_Spacing
    (Self : in out Q_Text_Char_Format'Class;
     Spacing : Qt4.Q_Real);

   procedure Set_Text_Outline
    (Self : in out Q_Text_Char_Format'Class;
     Pen : Qt4.Pens.Q_Pen'Class);

   procedure Set_Tool_Tip
    (Self : in out Q_Text_Char_Format'Class;
     Tip : Qt4.Strings.Q_String'Class);

   procedure Set_Underline_Color
    (Self : in out Q_Text_Char_Format'Class;
     Color : Qt4.Colors.Q_Color'Class);

   procedure Set_Underline_Style
    (Self : in out Q_Text_Char_Format'Class;
     Style : Text_Char_Underline_Style);

   procedure Set_Vertical_Alignment
    (Self : in out Q_Text_Char_Format'Class;
     Alignment : Text_Char_Vertical_Alignment);

   function Text_Outline
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Pens.Q_Pen;

   function Tool_Tip
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Strings.Q_String;

   function Underline_Color
    (Self : Q_Text_Char_Format'Class)
       return Qt4.Colors.Q_Color;

   function Underline_Style
    (Self : Q_Text_Char_Format'Class)
       return Text_Char_Underline_Style;

   function Vertical_Alignment
    (Self : Q_Text_Char_Format'Class)
       return Text_Char_Vertical_Alignment;

   function Height
    (Self : Q_Text_Image_Format'Class)
       return Qt4.Q_Real;

   function Is_Valid
    (Self : Q_Text_Image_Format'Class)
       return Boolean;

   function Name
    (Self : Q_Text_Image_Format'Class)
       return Qt4.Strings.Q_String;

   procedure Set_Height
    (Self : in out Q_Text_Image_Format'Class;
     Height : Qt4.Q_Real);

   procedure Set_Name
    (Self : in out Q_Text_Image_Format'Class;
     Height : Qt4.Strings.Q_String'Class);

   procedure Set_Width
    (Self : in out Q_Text_Image_Format'Class;
     Width : Qt4.Q_Real);

   function Width
    (Self : Q_Text_Image_Format'Class)
       return Qt4.Q_Real;

   function Bottom_Padding
    (Self : Q_Text_Table_Cell_Format'Class)
       return Qt4.Q_Real;

   function Is_Valid
    (Self : Q_Text_Table_Cell_Format'Class)
       return Boolean;

   function Left_Padding
    (Self : Q_Text_Table_Cell_Format'Class)
       return Qt4.Q_Real;

   function Right_Padding
    (Self : Q_Text_Table_Cell_Format'Class)
       return Qt4.Q_Real;

   procedure Set_Alignment
    (Self      : in out Q_Text_Table_Format'Class;
     Alignment : Qt4.Alignment);

   procedure Set_Bottom_Padding
    (Self : in out Q_Text_Table_Cell_Format'Class;
     Padding : Qt4.Q_Real);

   procedure Set_Left_Padding
    (Self : in out Q_Text_Table_Cell_Format'Class;
     Padding : Qt4.Q_Real);

   procedure Set_Padding
    (Self : in out Q_Text_Table_Cell_Format'Class;
     Padding : Qt4.Q_Real);

   procedure Set_Right_Padding
    (Self : in out Q_Text_Table_Cell_Format'Class;
     Padding : Qt4.Q_Real);

   procedure Set_Top_Padding
    (Self : in out Q_Text_Table_Cell_Format'Class;
     Padding : Qt4.Q_Real);

   function Top_Padding
    (Self : Q_Text_Table_Cell_Format'Class)
       return Qt4.Q_Real;

   function Border
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Q_Real;

   function Border_Brush
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Brushes.Q_Brush;

   function Border_Style
    (Self : Q_Text_Frame_Format'Class)
       return Text_Frame_Border_Style;

   function Bottom_Margin
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Q_Real;

   function Height
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Text_Lengths.Q_Text_Length;

   function Is_Valid
    (Self : Q_Text_Frame_Format'Class)
       return Boolean;

   function Left_Margin
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Q_Real;

   function Margin
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Q_Real;

   function Padding
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Q_Real;

   function Position
    (Self : Q_Text_Frame_Format'Class)
       return Text_Frame_Position;

   function Right_Margin
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Q_Real;

   procedure Set_Border
    (Self : in out Q_Text_Frame_Format'Class;
     Width : Qt4.Q_Real);

   procedure Set_Border_Brush
    (Self : in out Q_Text_Frame_Format'Class;
     Brush : Qt4.Brushes.Q_Brush'Class);

   procedure Set_Border_Style
    (Self : in out Q_Text_Frame_Format'Class;
     Style : Text_Frame_Border_Style);

   procedure Set_Bottom_Margin
    (Self : in out Q_Text_Frame_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Height
    (Self : in out Q_Text_Frame_Format'Class;
     Height : Qt4.Text_Lengths.Q_Text_Length'Class);

   procedure Set_Height
    (Self : in out Q_Text_Frame_Format'Class;
     Height : Qt4.Q_Real);

   procedure Set_Left_Margin
    (Self : in out Q_Text_Frame_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Margin
    (Self : in out Q_Text_Frame_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Padding
    (Self : in out Q_Text_Frame_Format'Class;
     Padding : Qt4.Q_Real);

   procedure Set_Position
    (Self : in out Q_Text_Frame_Format'Class;
     F : Text_Frame_Position);

   procedure Set_Right_Margin
    (Self : in out Q_Text_Frame_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Top_Margin
    (Self : in out Q_Text_Frame_Format'Class;
     Margin : Qt4.Q_Real);

   procedure Set_Width
    (Self : in out Q_Text_Frame_Format'Class;
     Width : Qt4.Text_Lengths.Q_Text_Length'Class);

   procedure Set_Width
    (Self : in out Q_Text_Frame_Format'Class;
     Width : Qt4.Q_Real);

   function Top_Margin
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Q_Real;

   function Width
    (Self : Q_Text_Frame_Format'Class)
       return Qt4.Text_Lengths.Q_Text_Length;

   function Cell_Padding
    (Self : Q_Text_Table_Format'Class)
       return Qt4.Q_Real;

   function Cell_Spacing
    (Self : Q_Text_Table_Format'Class)
       return Qt4.Q_Real;

   procedure Clear_Column_Width_Constraints
    (Self : in out Q_Text_Table_Format'Class);

   function Columns
    (Self : Q_Text_Table_Format'Class)
       return Qt4.Q_Integer;

   function Header_Row_Count
    (Self : Q_Text_Table_Format'Class)
       return Qt4.Q_Integer;

   function Is_Valid
    (Self : Q_Text_Table_Format'Class)
       return Boolean;

   procedure Set_Cell_Padding
    (Self : in out Q_Text_Table_Format'Class;
     Padding : Qt4.Q_Real);

   procedure Set_Cell_Spacing
    (Self : in out Q_Text_Table_Format'Class;
     Spacing : Qt4.Q_Real);

   procedure Set_Columns
    (Self : in out Q_Text_Table_Format'Class;
     Columns : Qt4.Q_Integer);

   procedure Set_Header_Row_Count
    (Self : in out Q_Text_Table_Format'Class;
     Count : Qt4.Q_Integer);

   function Indent
    (Self : Q_Text_List_Format'Class)
       return Boolean;

   function Is_Valid
    (Self : Q_Text_List_Format'Class)
       return Boolean;

   procedure Set_Indent
    (Self : in out Q_Text_List_Format'Class;
     Indent : Qt4.Q_Integer);

   procedure Set_Style
    (Self : in out Q_Text_List_Format'Class;
     Style : Text_List_Style);

   function Style
    (Self : Q_Text_List_Format'Class)
       return Text_List_Style;

   package Internals is

      type QTextFormat is private;

      type QTextFormat_Access is access all QTextFormat;
      pragma Convention (C, QTextFormat_Access);

      function QTextFormat_View
       (Item : Q_Text_Format'Class)
          return QTextFormat_Access;
      pragma Inline (QTextFormat_View);

      function To_Pointer
       (Address : System.Address)
          return QTextFormat_Access;
      pragma Inline (To_Pointer);

      function To_Address
       (Pointer : QTextFormat_Access)
          return System.Address;
      pragma Inline (To_Address);

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_Format;

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_Block_Format;

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_Char_Format;

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_Image_Format;

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_Table_Cell_Format;

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_Frame_Format;

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_Table_Format;

      function Create_Wrapper
       (Item : Internals.QTextFormat_Access)
          return Q_Text_List_Format;

   private

      type QTextFormat is record
         Placeholder : Interfaces.C.char_array (1 .. Qt_Ada.Internals.Value_Class_Sizes.QTextFormat_C_Size_Of);
      end record;
      pragma Convention (C, QTextFormat);

   end Internals;

private

   type Q_Text_Format is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QTextFormat;
      Object  : Internals.QTextFormat_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Text_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_Format);

   type Q_Text_Block_Format is new Q_Text_Format with null record;

   overriding
   procedure Adjust (Self : in out Q_Text_Block_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_Block_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_Block_Format);

   type Q_Text_Char_Format is new Q_Text_Format with null record;

   overriding
   procedure Adjust (Self : in out Q_Text_Char_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_Char_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_Char_Format);

   type Q_Text_Image_Format is new Q_Text_Char_Format with null record;

   overriding
   procedure Adjust (Self : in out Q_Text_Image_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_Image_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_Image_Format);

   type Q_Text_Table_Cell_Format is new Q_Text_Char_Format with null record;

   overriding
   procedure Adjust (Self : in out Q_Text_Table_Cell_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_Table_Cell_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_Table_Cell_Format);

   type Q_Text_Frame_Format is new Q_Text_Format with null record;

   overriding
   procedure Adjust (Self : in out Q_Text_Frame_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_Frame_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_Frame_Format);

   type Q_Text_Table_Format is new Q_Text_Frame_Format with null record;

   overriding
   procedure Adjust (Self : in out Q_Text_Table_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_Table_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_Table_Format);

   type Q_Text_List_Format is new Q_Text_Format with null record;

   overriding
   procedure Adjust (Self : in out Q_Text_List_Format);

   overriding
   procedure Finalize (Self : in out Q_Text_List_Format);

   overriding
   procedure Initialize (Self : in out Q_Text_List_Format);

end Qt4.Text_Formats;
