------------------------------------------------------------------------------
--                                                                          --
--                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.Menu_Bars;
with Qt4.Status_Bars;
with Qt4.Tool_Bars;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;

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

   procedure addToolBar_1_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Toolbar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, addToolBar_1_wrapper,
                     "__Qt4Ada_QMainWindow_addToolBar_1_wrapper");

   function addToolBar_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Title : not null access constant Qt4.Strings.Internals.QString)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addToolBar_0_wrapper,
                     "__Qt4Ada_QMainWindow_addToolBar_0_wrapper");

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

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

   procedure insertToolBar_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Before : not null access Qt_Ada.Internals.Objects.QObject;
     Toolbar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, insertToolBar_0_wrapper,
                     "__Qt4Ada_QMainWindow_insertToolBar_0_wrapper");

   procedure insertToolBarBreak_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Before : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, insertToolBarBreak_0_wrapper,
                     "__Qt4Ada_QMainWindow_insertToolBarBreak_0_wrapper");

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

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

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

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

   procedure removeToolBar_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Toolbar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, removeToolBar_0_wrapper,
                     "__Qt4Ada_QMainWindow_removeToolBar_0_wrapper");

   function restoreState_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     State : not null access constant Qt4.Byte_Arrays.Internals.QByteArray;
     Version : Qt4.Q_Integer)
       return Qt4.bool;
   pragma Import (C, restoreState_0_wrapper,
                     "__Qt4Ada_QMainWindow_restoreState_0_wrapper");

   procedure saveState_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Version : Qt4.Q_Integer;
     Returns : not null access Qt4.Byte_Arrays.Internals.QByteArray);
   pragma Import (C, saveState_0_wrapper,
                     "__Qt4Ada_QMainWindow_saveState_0_wrapper");

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

   procedure setIconSize_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Icon_Size : not null access constant Qt4.Sizes.Internals.QSize);
   pragma Import (C, setIconSize_0_wrapper,
                     "__Qt4Ada_QMainWindow_setIconSize_0_wrapper");

   procedure setMenuBar_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Menubar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setMenuBar_0_wrapper,
                     "__Qt4Ada_QMainWindow_setMenuBar_0_wrapper");

   procedure setMenuWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Menubar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setMenuWidget_0_wrapper,
                     "__Qt4Ada_QMainWindow_setMenuWidget_0_wrapper");

   procedure setStatusBar_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Statusbar : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setStatusBar_0_wrapper,
                     "__Qt4Ada_QMainWindow_setStatusBar_0_wrapper");

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

   procedure setAnimated_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Enabled : Qt4.bool);
   pragma Import (C, setAnimated_0_wrapper,
                     "__Qt4Ada_QMainWindow_setAnimated_0_wrapper");

   procedure setDockNestingEnabled_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Enabled : Qt4.bool);
   pragma Import (C, setDockNestingEnabled_0_wrapper,
                     "__Qt4Ada_QMainWindow_setDockNestingEnabled_0_wrapper");

   procedure addDockWidget_0_wrapper
    (Self        : not null access Qt_Ada.Internals.Objects.QObject;
     Area        : Qt4.Dock_Widget_Area;
     Dock_Widget : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import
    (C,
     addDockWidget_0_wrapper,
     "__Qt4Ada_QMainWindow_addDockWidget_0_wrapper");

   procedure addDockWidget_1_wrapper
    (Self        : not null access Qt_Ada.Internals.Objects.QObject;
     Area        : Qt4.Dock_Widget_Area;
     Dock_Widget : not null access Qt_Ada.Internals.Objects.QObject;
     Orientation : Qt4.Orientation);
   pragma Import
    (C,
     addDockWidget_1_wrapper,
     "__Qt4Ada_QMainWindow_addDockWidget_1_wrapper");

   ---------------------
   -- Add_Dock_Widget --
   ---------------------

   procedure Add_Dock_Widget
    (Self        : not null access Q_Main_Window'Class;
     Area        : Qt4.Dock_Widget_Area;
     Dock_Widget : not null access Qt4.Dock_Widgets.Q_Dock_Widget'Class)
   is
   begin
      addDockWidget_0_wrapper
       (Self.QObject_View,
        Area,
        Dock_Widget.QObject_View);
   end Add_Dock_Widget;

   ---------------------
   -- Add_Dock_Widget --
   ---------------------

   procedure Add_Dock_Widget
    (Self        : not null access Q_Main_Window'Class;
     Area        : Qt4.Dock_Widget_Area;
     Dock_Widget : not null access Qt4.Dock_Widgets.Q_Dock_Widget'Class;
     Orientation : Qt4.Orientation)
   is
   begin
      addDockWidget_1_wrapper
       (Self.QObject_View,
        Area,
        Dock_Widget.QObject_View,
        Orientation);
   end Add_Dock_Widget;

   pragma Style_Checks ("N");

   ------------------
   -- Add_Tool_Bar --
   ------------------

   procedure Add_Tool_Bar
    (Self : not null access Q_Main_Window'Class;
     Toolbar : not null access Qt4.Tool_Bars.Q_Tool_Bar'Class)
   is
   begin
      addToolBar_1_wrapper
       (Self.QObject_View,
        Toolbar.QObject_View);
   end Add_Tool_Bar;

   ------------------
   -- Add_Tool_Bar --
   ------------------

   function Add_Tool_Bar
    (Self : not null access Q_Main_Window'Class;
     Title : Qt4.Strings.Q_String)
       return not null access Qt4.Tool_Bars.Q_Tool_Bar'Class
   is
   begin
      return
        Qt4.Tool_Bars.Q_Tool_Bar'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addToolBar_0_wrapper
             (Self.QObject_View,
              Qt4.Strings.Internals.QString_View (Title))).all)'Access;
   end Add_Tool_Bar;

   --------------------
   -- Central_Widget --
   --------------------

   function Central_Widget
    (Self : not null access constant Q_Main_Window'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
           (centralWidget_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Central_Widget;

   ---------------
   -- Icon_Size --
   ---------------

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

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

      return Returns;
   end Icon_Size;

   ---------------------
   -- Insert_Tool_Bar --
   ---------------------

   procedure Insert_Tool_Bar
    (Self : not null access Q_Main_Window'Class;
     Before : not null access Qt4.Tool_Bars.Q_Tool_Bar'Class;
     Toolbar : not null access Qt4.Tool_Bars.Q_Tool_Bar'Class)
   is
   begin
      insertToolBar_0_wrapper
       (Self.QObject_View,
        Before.QObject_View,
        Toolbar.QObject_View);
   end Insert_Tool_Bar;

   ---------------------------
   -- Insert_Tool_Bar_Break --
   ---------------------------

   procedure Insert_Tool_Bar_Break
    (Self : not null access Q_Main_Window'Class;
     Before : not null access Qt4.Tool_Bars.Q_Tool_Bar'Class)
   is
   begin
      insertToolBarBreak_0_wrapper
       (Self.QObject_View,
        Before.QObject_View);
   end Insert_Tool_Bar_Break;

   -----------------
   -- Is_Animated --
   -----------------

   function Is_Animated
    (Self : not null access constant Q_Main_Window'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isAnimated_0_wrapper
           (Self.QObject_View));
   end Is_Animated;

   -----------------------------
   -- Is_Dock_Nesting_Enabled --
   -----------------------------

   function Is_Dock_Nesting_Enabled
    (Self : not null access constant Q_Main_Window'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isDockNestingEnabled_0_wrapper
           (Self.QObject_View));
   end Is_Dock_Nesting_Enabled;

   --------------
   -- Menu_Bar --
   --------------

   function Menu_Bar
    (Self : not null access constant Q_Main_Window'Class)
       return not null access Qt4.Menu_Bars.Q_Menu_Bar'Class
   is
   begin
      return
        Qt4.Menu_Bars.Q_Menu_Bar'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (menuBar_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Menu_Bar;

   -----------------
   -- Menu_Widget --
   -----------------

   function Menu_Widget
    (Self : not null access constant Q_Main_Window'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
           (menuWidget_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Menu_Widget;

   ---------------------
   -- Remove_Tool_Bar --
   ---------------------

   procedure Remove_Tool_Bar
    (Self : not null access Q_Main_Window'Class;
     Toolbar : not null access Qt4.Tool_Bars.Q_Tool_Bar'Class)
   is
   begin
      removeToolBar_0_wrapper
       (Self.QObject_View,
        Toolbar.QObject_View);
   end Remove_Tool_Bar;

   -------------------
   -- Restore_State --
   -------------------

   function Restore_State
    (Self : not null access Q_Main_Window'Class;
     State : Qt4.Byte_Arrays.Q_Byte_Array;
     Version : Qt4.Q_Integer
       :=  0)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (restoreState_0_wrapper
           (Self.QObject_View,
            Qt4.Byte_Arrays.Internals.QByteArray_View (State),
            Version));
   end Restore_State;

   ----------------
   -- Save_State --
   ----------------

   function Save_State
    (Self : not null access constant Q_Main_Window'Class;
     Version : Qt4.Q_Integer
       :=  0)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
      Returns : Qt4.Byte_Arrays.Q_Byte_Array;

   begin
      saveState_0_wrapper
       (Self.QObject_View,
        Version,
        Qt4.Byte_Arrays.Internals.QByteArray_View (Returns));

      return Returns;
   end Save_State;

   ------------------------
   -- Set_Central_Widget --
   ------------------------

   procedure Set_Central_Widget
    (Self : not null access Q_Main_Window'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setCentralWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Set_Central_Widget;

   -------------------
   -- Set_Icon_Size --
   -------------------

   procedure Set_Icon_Size
    (Self : not null access Q_Main_Window'Class;
     Icon_Size : Qt4.Sizes.Q_Size)
   is
   begin
      setIconSize_0_wrapper
       (Self.QObject_View,
        Qt4.Sizes.Internals.QSize_View (Icon_Size));
   end Set_Icon_Size;

   ------------------
   -- Set_Menu_Bar --
   ------------------

   procedure Set_Menu_Bar
    (Self : not null access Q_Main_Window'Class;
     Menubar : not null access Qt4.Menu_Bars.Q_Menu_Bar'Class)
   is
   begin
      setMenuBar_0_wrapper
       (Self.QObject_View,
        Menubar.QObject_View);
   end Set_Menu_Bar;

   ---------------------
   -- Set_Menu_Widget --
   ---------------------

   procedure Set_Menu_Widget
    (Self : not null access Q_Main_Window'Class;
     Menubar : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      setMenuWidget_0_wrapper
       (Self.QObject_View,
        Menubar.QObject_View);
   end Set_Menu_Widget;

   --------------------
   -- Set_Status_Bar --
   --------------------

   procedure Set_Status_Bar
    (Self : not null access Q_Main_Window'Class;
     Statusbar : not null access Qt4.Status_Bars.Q_Status_Bar'Class)
   is
   begin
      setStatusBar_0_wrapper
       (Self.QObject_View,
        Statusbar.QObject_View);
   end Set_Status_Bar;

   ----------------
   -- Status_Bar --
   ----------------

   function Status_Bar
    (Self : not null access constant Q_Main_Window'Class)
       return not null access Qt4.Status_Bars.Q_Status_Bar'Class
   is
   begin
      return
        Qt4.Status_Bars.Q_Status_Bar'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (statusBar_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Status_Bar;

   ------------------
   -- Set_Animated --
   ------------------

   procedure Set_Animated
    (Self : not null access Q_Main_Window'Class;
     Enabled : Standard.Boolean)
   is
   begin
      setAnimated_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Enabled));
   end Set_Animated;

   ------------------------------
   -- Set_Dock_Nesting_Enabled --
   ------------------------------

   procedure Set_Dock_Nesting_Enabled
    (Self : not null access Q_Main_Window'Class;
     Enabled : Standard.Boolean)
   is
   begin
      setDockNestingEnabled_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Enabled));
   end Set_Dock_Nesting_Enabled;

end Qt4.Main_Windows;
