------------------------------------------------------------------------------
--                                                                          --
--                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.Scroll_Bars;
with Qt4.Widgets;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;

with Qt_Ada.Internals.Objects.Abstract_Scroll_Area_Proxies;
pragma Warnings (Off, Qt_Ada.Internals.Objects.Abstract_Scroll_Area_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.Abstract_Scroll_Areas is

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

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

   procedure maximumViewportSize_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Sizes.Internals.QSize);
   pragma Import (C, maximumViewportSize_0_wrapper,
                     "__Qt4Ada_QAbstractScrollArea_maximumViewportSize_0_wrapper");

   procedure setCornerWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setCornerWidget_0_wrapper,
                     "__Qt4Ada_QAbstractScrollArea_setCornerWidget_0_wrapper");

   procedure setHorizontalScrollBar_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Scrollbar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setHorizontalScrollBar_0_wrapper,
                     "__Qt4Ada_QAbstractScrollArea_setHorizontalScrollBar_0_wrapper");

   procedure setVerticalScrollBar_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Scrollbar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setVerticalScrollBar_0_wrapper,
                     "__Qt4Ada_QAbstractScrollArea_setVerticalScrollBar_0_wrapper");

   procedure setViewport_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setViewport_0_wrapper,
                     "__Qt4Ada_QAbstractScrollArea_setViewport_0_wrapper");

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

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

   pragma Style_Checks ("N");

   -------------------
   -- Corner_Widget --
   -------------------

   function Corner_Widget
    (Self : not null access constant Q_Abstract_Scroll_Area'Class)
       return not null access Qt4.Widgets.Q_Widget'Class
   is
   begin
      return
        Qt4.Widgets.Q_Widget'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (cornerWidget_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Corner_Widget;

   ---------------------------
   -- Horizontal_Scroll_Bar --
   ---------------------------

   function Horizontal_Scroll_Bar
    (Self : not null access constant Q_Abstract_Scroll_Area'Class)
       return not null access Qt4.Scroll_Bars.Q_Scroll_Bar'Class
   is
   begin
      return
        Qt4.Scroll_Bars.Q_Scroll_Bar'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (horizontalScrollBar_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Horizontal_Scroll_Bar;

   ---------------------------
   -- Maximum_Viewport_Size --
   ---------------------------

   function Maximum_Viewport_Size
    (Self : not null access constant Q_Abstract_Scroll_Area'Class)
       return Qt4.Sizes.Q_Size
   is
      Returns : Qt4.Sizes.Q_Size;

   begin
      maximumViewportSize_0_wrapper
       (Self.QObject_View,
        Qt4.Sizes.Internals.QSize_View (Returns));

      return Returns;
   end Maximum_Viewport_Size;

   -----------------------
   -- Set_Corner_Widget --
   -----------------------

   procedure Set_Corner_Widget
    (Self : not null access Q_Abstract_Scroll_Area'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setCornerWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Set_Corner_Widget;

   -------------------------------
   -- Set_Horizontal_Scroll_Bar --
   -------------------------------

   procedure Set_Horizontal_Scroll_Bar
    (Self : not null access Q_Abstract_Scroll_Area'Class;
     Scrollbar : not null access Qt4.Scroll_Bars.Q_Scroll_Bar'Class)
   is
   begin
      setHorizontalScrollBar_0_wrapper
       (Self.QObject_View,
        Scrollbar.QObject_View);
   end Set_Horizontal_Scroll_Bar;

   -----------------------------
   -- Set_Vertical_Scroll_Bar --
   -----------------------------

   procedure Set_Vertical_Scroll_Bar
    (Self : not null access Q_Abstract_Scroll_Area'Class;
     Scrollbar : not null access Qt4.Scroll_Bars.Q_Scroll_Bar'Class)
   is
   begin
      setVerticalScrollBar_0_wrapper
       (Self.QObject_View,
        Scrollbar.QObject_View);
   end Set_Vertical_Scroll_Bar;

   ------------------
   -- Set_Viewport --
   ------------------

   procedure Set_Viewport
    (Self : not null access Q_Abstract_Scroll_Area'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setViewport_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Set_Viewport;

   --------------
   -- Viewport --
   --------------

   function Viewport
    (Self : not null access constant Q_Abstract_Scroll_Area'Class)
       return not null access Qt4.Widgets.Q_Widget'Class
   is
   begin
      return
        Qt4.Widgets.Q_Widget'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (viewport_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Viewport;

   -------------------------
   -- Vertical_Scroll_Bar --
   -------------------------

   function Vertical_Scroll_Bar
    (Self : not null access constant Q_Abstract_Scroll_Area'Class)
       return not null access Qt4.Scroll_Bars.Q_Scroll_Bar'Class
   is
   begin
      return
        Qt4.Scroll_Bars.Q_Scroll_Bar'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (verticalScrollBar_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Vertical_Scroll_Bar;

end Qt4.Abstract_Scroll_Areas;
