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

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

   function alignment_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Alignment;
   pragma Import (C, alignment_0_wrapper,
                     "__Qt4Ada_QScrollArea_alignment_0_wrapper");

   procedure ensureVisible_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     X : Qt4.Q_Integer;
     Y : Qt4.Q_Integer;
     Xmargin : Qt4.Q_Integer;
     Ymargin : Qt4.Q_Integer);
   pragma Import (C, ensureVisible_0_wrapper,
                     "__Qt4Ada_QScrollArea_ensureVisible_0_wrapper");

   procedure ensureWidgetVisible_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Child_Widget : not null access Qt_Ada.Internals.Objects.QObject;
     Xmargin : Qt4.Q_Integer;
     Ymargin : Qt4.Q_Integer);
   pragma Import (C, ensureWidgetVisible_0_wrapper,
                     "__Qt4Ada_QScrollArea_ensureWidgetVisible_0_wrapper");

   procedure setAlignment_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Alignment : Qt4.Alignment);
   pragma Import (C, setAlignment_0_wrapper,
                     "__Qt4Ada_QScrollArea_setAlignment_0_wrapper");

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

   procedure setWidgetResizable_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Resizable : Qt4.bool);
   pragma Import (C, setWidgetResizable_0_wrapper,
                     "__Qt4Ada_QScrollArea_setWidgetResizable_0_wrapper");

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

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

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

   pragma Style_Checks ("N");

   ---------------
   -- Alignment --
   ---------------

   function Alignment
    (Self : not null access constant Q_Scroll_Area'Class)
       return Qt4.Alignment
   is
   begin
      return
        alignment_0_wrapper
         (Self.QObject_View);
   end Alignment;

   --------------------
   -- Ensure_Visible --
   --------------------

   procedure Ensure_Visible
    (Self : not null access Q_Scroll_Area'Class;
     X : Qt4.Q_Integer;
     Y : Qt4.Q_Integer;
     Xmargin : Qt4.Q_Integer
       :=  50;
     Ymargin : Qt4.Q_Integer
       :=  50)
   is
   begin
      ensureVisible_0_wrapper
       (Self.QObject_View,
        X,
        Y,
        Xmargin,
        Ymargin);
   end Ensure_Visible;

   ---------------------------
   -- Ensure_Widget_Visible --
   ---------------------------

   procedure Ensure_Widget_Visible
    (Self : not null access Q_Scroll_Area'Class;
     Child_Widget : not null access Qt4.Widgets.Q_Widget'Class;
     Xmargin : Qt4.Q_Integer
       :=  50;
     Ymargin : Qt4.Q_Integer
       :=  50)
   is
   begin
      ensureWidgetVisible_0_wrapper
       (Self.QObject_View,
        Child_Widget.QObject_View,
        Xmargin,
        Ymargin);
   end Ensure_Widget_Visible;

   -------------------
   -- Set_Alignment --
   -------------------

   procedure Set_Alignment
    (Self : not null access Q_Scroll_Area'Class;
     Alignment : Qt4.Alignment)
   is
   begin
      setAlignment_0_wrapper
       (Self.QObject_View,
        Alignment);
   end Set_Alignment;

   ----------------
   -- Set_Widget --
   ----------------

   procedure Set_Widget
    (Self : not null access Q_Scroll_Area'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Set_Widget;

   --------------------------
   -- Set_Widget_Resizable --
   --------------------------

   procedure Set_Widget_Resizable
    (Self : not null access Q_Scroll_Area'Class;
     Resizable : Standard.Boolean)
   is
   begin
      setWidgetResizable_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Resizable));
   end Set_Widget_Resizable;

   -----------------
   -- Take_Widget --
   -----------------

   function Take_Widget
    (Self : not null access Q_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
           (takeWidget_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Take_Widget;

   ------------
   -- Widget --
   ------------

   function Widget
    (Self : not null access constant Q_Scroll_Area'Class)
       return access Qt4.Widgets.Q_Widget'Class
   is
   begin
      return
        Qt_Ada.Internals.Objects.Widget_Utilities.Corresponding_Q_Widget
         (widget_0_wrapper
           (Self.QObject_View));
   end Widget;

   ----------------------
   -- Widget_Resizable --
   ----------------------

   function Widget_Resizable
    (Self : not null access constant Q_Scroll_Area'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (widgetResizable_0_wrapper
           (Self.QObject_View));
   end Widget_Resizable;

end Qt4.Scroll_Areas;
