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

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

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

   procedure background_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Brushes.Internals.QBrush);
   pragma Import (C, background_0_wrapper,
                     "__Qt4Ada_QMdiArea_background_0_wrapper");

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

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

   procedure setBackground_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Background : not null access constant Qt4.Brushes.Internals.QBrush);
   pragma Import (C, setBackground_0_wrapper,
                     "__Qt4Ada_QMdiArea_setBackground_0_wrapper");

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

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

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

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

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

   procedure setActiveSubWindow_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Window : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setActiveSubWindow_0_wrapper,
                     "__Qt4Ada_QMdiArea_setActiveSubWindow_0_wrapper");

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

   function addSubWindow_0_wrapper
    (Self   : not null access Qt_Ada.Internals.Objects.QObject;
     Widget : not null access Qt_Ada.Internals.Objects.QObject;
     Flags  : Qt4.Window_Flags)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addSubWindow_0_wrapper,
                  "__Qt4Ada_QMdiArea_addSubWindow_0_wrapper");

   --------------------
   -- Add_Sub_Window --
   --------------------

   function Add_Sub_Window
    (Self   : not null access Q_Mdi_Area'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class;
     Flags  : Qt4.Window_Flags := +Qt4.Widget)
       return not null access Qt4.Mdi_Sub_Windows.Q_Mdi_Sub_Window'Class
   is
   begin
      return
        Qt4.Mdi_Sub_Windows.Q_Mdi_Sub_Window'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addSubWindow_0_wrapper
             (Self.QObject_View,
              Widget.QObject_View,
              Flags)).all)'Access;
   end Add_Sub_Window;

   pragma Style_Checks ("N");

   -----------------------
   -- Active_Sub_Window --
   -----------------------

   function Active_Sub_Window
    (Self : not null access constant Q_Mdi_Area'Class)
       return not null access Qt4.Mdi_Sub_Windows.Q_Mdi_Sub_Window'Class
   is
   begin
      return
        Qt4.Mdi_Sub_Windows.Q_Mdi_Sub_Window'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (activeSubWindow_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Active_Sub_Window;

   ----------------
   -- Background --
   ----------------

   function Background
    (Self : not null access constant Q_Mdi_Area'Class)
       return Qt4.Brushes.Q_Brush
   is
      Returns : Qt4.Brushes.Q_Brush;

   begin
      background_0_wrapper
       (Self.QObject_View,
        Qt4.Brushes.Internals.QBrush_View (Returns));

      return Returns;
   end Background;

   ------------------------
   -- Current_Sub_Window --
   ------------------------

   function Current_Sub_Window
    (Self : not null access constant Q_Mdi_Area'Class)
       return not null access Qt4.Mdi_Sub_Windows.Q_Mdi_Sub_Window'Class
   is
   begin
      return
        Qt4.Mdi_Sub_Windows.Q_Mdi_Sub_Window'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (currentSubWindow_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Current_Sub_Window;

   -----------------------
   -- Remove_Sub_Window --
   -----------------------

   procedure Remove_Sub_Window
    (Self : not null access Q_Mdi_Area'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      removeSubWindow_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Remove_Sub_Window;

   --------------------
   -- Set_Background --
   --------------------

   procedure Set_Background
    (Self : not null access Q_Mdi_Area'Class;
     Background : Qt4.Brushes.Q_Brush)
   is
   begin
      setBackground_0_wrapper
       (Self.QObject_View,
        Qt4.Brushes.Internals.QBrush_View (Background));
   end Set_Background;

   ------------------------------
   -- Activate_Next_Sub_Window --
   ------------------------------

   procedure Activate_Next_Sub_Window
    (Self : not null access Q_Mdi_Area'Class)
   is
   begin
      activateNextSubWindow_0_wrapper
       (Self.QObject_View);
   end Activate_Next_Sub_Window;

   ----------------------------------
   -- Activate_Previous_Sub_Window --
   ----------------------------------

   procedure Activate_Previous_Sub_Window
    (Self : not null access Q_Mdi_Area'Class)
   is
   begin
      activatePreviousSubWindow_0_wrapper
       (Self.QObject_View);
   end Activate_Previous_Sub_Window;

   -------------------------
   -- Cascade_Sub_Windows --
   -------------------------

   procedure Cascade_Sub_Windows
    (Self : not null access Q_Mdi_Area'Class)
   is
   begin
      cascadeSubWindows_0_wrapper
       (Self.QObject_View);
   end Cascade_Sub_Windows;

   -----------------------------
   -- Close_Active_Sub_Window --
   -----------------------------

   procedure Close_Active_Sub_Window
    (Self : not null access Q_Mdi_Area'Class)
   is
   begin
      closeActiveSubWindow_0_wrapper
       (Self.QObject_View);
   end Close_Active_Sub_Window;

   ---------------------------
   -- Close_All_Sub_Windows --
   ---------------------------

   procedure Close_All_Sub_Windows
    (Self : not null access Q_Mdi_Area'Class)
   is
   begin
      closeAllSubWindows_0_wrapper
       (Self.QObject_View);
   end Close_All_Sub_Windows;

   ---------------------------
   -- Set_Active_Sub_Window --
   ---------------------------

   procedure Set_Active_Sub_Window
    (Self : not null access Q_Mdi_Area'Class;
     Window : not null access Qt4.Mdi_Sub_Windows.Q_Mdi_Sub_Window'Class)
   is
   begin
      setActiveSubWindow_0_wrapper
       (Self.QObject_View,
        Window.QObject_View);
   end Set_Active_Sub_Window;

   ----------------------
   -- Tile_Sub_Windows --
   ----------------------

   procedure Tile_Sub_Windows
    (Self : not null access Q_Mdi_Area'Class)
   is
   begin
      tileSubWindows_0_wrapper
       (Self.QObject_View);
   end Tile_Sub_Windows;

end Qt4.Mdi_Areas;
