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

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

package body Qt4.Frames is

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

   function frameShadow_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Frames.Shadow;
   pragma Import (C, frameShadow_0_wrapper,
                     "__Qt4Ada_QFrame_frameShadow_0_wrapper");

   function frameShape_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Frames.Shape;
   pragma Import (C, frameShape_0_wrapper,
                     "__Qt4Ada_QFrame_frameShape_0_wrapper");

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

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

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

   procedure setFrameRect_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Rect : not null access constant Qt4.Rects.Internals.QRect);
   pragma Import (C, setFrameRect_0_wrapper,
                     "__Qt4Ada_QFrame_setFrameRect_0_wrapper");

   procedure setFrameShadow_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Shadow : Qt4.Frames.Shadow);
   pragma Import (C, setFrameShadow_0_wrapper,
                     "__Qt4Ada_QFrame_setFrameShadow_0_wrapper");

   procedure setFrameShape_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Shape : Qt4.Frames.Shape);
   pragma Import (C, setFrameShape_0_wrapper,
                     "__Qt4Ada_QFrame_setFrameShape_0_wrapper");

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

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

   function To_Frame_Style is new Ada.Unchecked_Conversion
    (Shadow, Frame_Style);

   function To_Frame_Style is new Ada.Unchecked_Conversion
    (Shape, Frame_Style);

   function To_Frame_Style is new Ada.Unchecked_Conversion
    (Style_Mask, Frame_Style);

   procedure setFrameStyle_wrapper
    (This  : not null access Qt_Ada.Internals.Objects.QObject;
     Style : Interfaces.C.int);
   pragma Import
    (C, setFrameStyle_wrapper, "__Qt4Ada_QFrame_setFrameStyle_wrapper");

   function "+" (Left  : Frame_Style;
                 Right : Shadow)
     return Frame_Style
   is
   begin
      return Left + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Frame_Style;
                 Right : Shape)
     return Frame_Style
   is
   begin
      return Left + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Frame_Style;
                 Right : Style_Mask)
     return Frame_Style
   is
   begin
      return Left + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Shadow;
                 Right : Shape)
     return Frame_Style
   is
   begin
      return To_Frame_Style (Left) + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Shadow;
                 Right : Style_Mask)
     return Frame_Style
   is
   begin
      return To_Frame_Style (Left) + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Shape;
                 Right : Shadow)
     return Frame_Style
   is
   begin
      return To_Frame_Style (Left) + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Shape;
                 Right : Style_Mask)
     return Frame_Style
   is
   begin
      return To_Frame_Style (Left) + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Style_Mask;
                 Right : Shadow)
     return Frame_Style
   is
   begin
      return To_Frame_Style (Left) + To_Frame_Style (Right);
   end "+";

   function "+" (Left  : Style_Mask;
                 Right : Shape)
     return Frame_Style
   is
   begin
      return To_Frame_Style (Left) + To_Frame_Style (Right);
   end "+";

   ---------------------
   -- Set_Frame_Style --
   ---------------------

   procedure Set_Frame_Style
    (Self  : not null access Q_Frame'Class;
     Style : Frame_Style)
   is
   begin
      setFrameStyle_wrapper (Self.QObject_View, Interfaces.C.int (Style));
   end Set_Frame_Style;

   pragma Style_Checks ("N");

   ----------------
   -- Frame_Rect --
   ----------------

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

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

      return Returns;
   end Frame_Rect;

   ------------------
   -- Frame_Shadow --
   ------------------

   function Frame_Shadow
    (Self : not null access constant Q_Frame'Class)
       return Qt4.Frames.Shadow
   is
   begin
      return
        frameShadow_0_wrapper
         (Self.QObject_View);
   end Frame_Shadow;

   -----------------
   -- Frame_Shape --
   -----------------

   function Frame_Shape
    (Self : not null access constant Q_Frame'Class)
       return Qt4.Frames.Shape
   is
   begin
      return
        frameShape_0_wrapper
         (Self.QObject_View);
   end Frame_Shape;

   -----------------
   -- Frame_Width --
   -----------------

   function Frame_Width
    (Self : not null access constant Q_Frame'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        frameWidth_0_wrapper
         (Self.QObject_View);
   end Frame_Width;

   ----------------
   -- Line_Width --
   ----------------

   function Line_Width
    (Self : not null access constant Q_Frame'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        lineWidth_0_wrapper
         (Self.QObject_View);
   end Line_Width;

   --------------------
   -- Mid_Line_Width --
   --------------------

   function Mid_Line_Width
    (Self : not null access constant Q_Frame'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        midLineWidth_0_wrapper
         (Self.QObject_View);
   end Mid_Line_Width;

   --------------------
   -- Set_Frame_Rect --
   --------------------

   procedure Set_Frame_Rect
    (Self : not null access Q_Frame'Class;
     Rect : Qt4.Rects.Q_Rect)
   is
   begin
      setFrameRect_0_wrapper
       (Self.QObject_View,
        Qt4.Rects.Internals.QRect_View (Rect));
   end Set_Frame_Rect;

   ----------------------
   -- Set_Frame_Shadow --
   ----------------------

   procedure Set_Frame_Shadow
    (Self : not null access Q_Frame'Class;
     Shadow : Qt4.Frames.Shadow)
   is
   begin
      setFrameShadow_0_wrapper
       (Self.QObject_View,
        Shadow);
   end Set_Frame_Shadow;

   ---------------------
   -- Set_Frame_Shape --
   ---------------------

   procedure Set_Frame_Shape
    (Self : not null access Q_Frame'Class;
     Shape : Qt4.Frames.Shape)
   is
   begin
      setFrameShape_0_wrapper
       (Self.QObject_View,
        Shape);
   end Set_Frame_Shape;

   --------------------
   -- Set_Line_Width --
   --------------------

   procedure Set_Line_Width
    (Self : not null access Q_Frame'Class;
     Width : Qt4.Q_Integer)
   is
   begin
      setLineWidth_0_wrapper
       (Self.QObject_View,
        Width);
   end Set_Line_Width;

   ------------------------
   -- Set_Mid_Line_Width --
   ------------------------

   procedure Set_Mid_Line_Width
    (Self : not null access Q_Frame'Class;
     Width : Qt4.Q_Integer)
   is
   begin
      setMidLineWidth_0_wrapper
       (Self.QObject_View,
        Width);
   end Set_Mid_Line_Width;

end Qt4.Frames;
