------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008-2012 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.Splitter_Handles;
with Qt4.Widgets;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;

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

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

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

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

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

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

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

   procedure insertWidget_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Widget : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, insertWidget_0_wrapper,
                     "__Qt4Ada_QSplitter_insertWidget_0_wrapper");

   function isCollapsible_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer)
       return Qt4.bool;
   pragma Import (C, isCollapsible_0_wrapper,
                     "__Qt4Ada_QSplitter_isCollapsible_0_wrapper");

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

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

   procedure restoreState_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     State : not null access constant Qt4.Byte_Arrays.Internals.QByteArray);
   pragma Import (C, restoreState_0_wrapper,
                     "__Qt4Ada_QSplitter_restoreState_0_wrapper");

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

   procedure setChildrenCollapsible_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Collapse : Qt4.bool);
   pragma Import (C, setChildrenCollapsible_0_wrapper,
                     "__Qt4Ada_QSplitter_setChildrenCollapsible_0_wrapper");

   procedure setCollapsible_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Collapse : Qt4.bool);
   pragma Import (C, setCollapsible_0_wrapper,
                     "__Qt4Ada_QSplitter_setCollapsible_0_wrapper");

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

   procedure setStretchFactor_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Index : Qt4.Q_Integer;
     Stretch : Qt4.Q_Integer);
   pragma Import (C, setStretchFactor_0_wrapper,
                     "__Qt4Ada_QSplitter_setStretchFactor_0_wrapper");

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

   pragma Style_Checks ("N");

   ----------------
   -- Add_Widget --
   ----------------

   procedure Add_Widget
    (Self : not null access Q_Splitter'Class;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      addWidget_0_wrapper
       (Self.QObject_View,
        Widget.QObject_View);
   end Add_Widget;

   --------------------------
   -- Children_Collapsible --
   --------------------------

   function Children_Collapsible
    (Self : not null access constant Q_Splitter'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (childrenCollapsible_0_wrapper
           (Self.QObject_View));
   end Children_Collapsible;

   -----------
   -- Count --
   -----------

   function Count
    (Self : not null access constant Q_Splitter'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        count_0_wrapper
         (Self.QObject_View);
   end Count;

   ------------
   -- Handle --
   ------------

   function Handle
    (Self : not null access constant Q_Splitter'Class;
     Index : Qt4.Q_Integer)
       return not null access Qt4.Splitter_Handles.Q_Splitter_Handle'Class
   is
   begin
      return
        Qt4.Splitter_Handles.Q_Splitter_Handle'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (handle_0_wrapper
             (Self.QObject_View,
              Index)).all)'Access;
   end Handle;

   ------------------
   -- Handle_Width --
   ------------------

   function Handle_Width
    (Self : not null access constant Q_Splitter'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        handleWidth_0_wrapper
         (Self.QObject_View);
   end Handle_Width;

   --------------
   -- Index_Of --
   --------------

   function Index_Of
    (Self : not null access constant Q_Splitter'Class;
     W : not null access Qt4.Widgets.Q_Widget'Class)
       return Qt4.Q_Integer
   is
   begin
      return
        indexOf_0_wrapper
         (Self.QObject_View,
          W.QObject_View);
   end Index_Of;

   -------------------
   -- Insert_Widget --
   -------------------

   procedure Insert_Widget
    (Self : not null access Q_Splitter'Class;
     Index : Qt4.Q_Integer;
     Widget : not null access Qt4.Widgets.Q_Widget'Class)
   is
   begin
      insertWidget_0_wrapper
       (Self.QObject_View,
        Index,
        Widget.QObject_View);
   end Insert_Widget;

   --------------------
   -- Is_Collapsible --
   --------------------

   function Is_Collapsible
    (Self : not null access constant Q_Splitter'Class;
     Index : Qt4.Q_Integer)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (isCollapsible_0_wrapper
           (Self.QObject_View,
            Index));
   end Is_Collapsible;

   -------------------
   -- Opaque_Resize --
   -------------------

   function Opaque_Resize
    (Self : not null access constant Q_Splitter'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (opaqueResize_0_wrapper
           (Self.QObject_View));
   end Opaque_Resize;

   -------------
   -- Refresh --
   -------------

   procedure Refresh
    (Self : not null access Q_Splitter'Class)
   is
   begin
      refresh_0_wrapper
       (Self.QObject_View);
   end Refresh;

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

   procedure Restore_State
    (Self : not null access Q_Splitter'Class;
     State : Qt4.Byte_Arrays.Q_Byte_Array)
   is
   begin
      restoreState_0_wrapper
       (Self.QObject_View,
        Qt4.Byte_Arrays.Internals.QByteArray_View (State));
   end Restore_State;

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

   function Save_State
    (Self : not null access constant Q_Splitter'Class)
       return Qt4.Byte_Arrays.Q_Byte_Array
   is
      Returns : Qt4.Byte_Arrays.Q_Byte_Array;

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

      return Returns;
   end Save_State;

   ------------------------------
   -- Set_Children_Collapsible --
   ------------------------------

   procedure Set_Children_Collapsible
    (Self : not null access Q_Splitter'Class;
     Collapse : Standard.Boolean)
   is
   begin
      setChildrenCollapsible_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Collapse));
   end Set_Children_Collapsible;

   ---------------------
   -- Set_Collapsible --
   ---------------------

   procedure Set_Collapsible
    (Self : not null access Q_Splitter'Class;
     Index : Qt4.Q_Integer;
     Collapse : Standard.Boolean)
   is
   begin
      setCollapsible_0_wrapper
       (Self.QObject_View,
        Index,
        Qt4.To_bool (Collapse));
   end Set_Collapsible;

   ----------------------
   -- Set_Handle_Width --
   ----------------------

   procedure Set_Handle_Width
    (Self : not null access Q_Splitter'Class;
     Width : Qt4.Q_Integer)
   is
   begin
      setHandleWidth_0_wrapper
       (Self.QObject_View,
        Width);
   end Set_Handle_Width;

   ------------------------
   -- Set_Stretch_Factor --
   ------------------------

   procedure Set_Stretch_Factor
    (Self : not null access Q_Splitter'Class;
     Index : Qt4.Q_Integer;
     Stretch : Qt4.Q_Integer)
   is
   begin
      setStretchFactor_0_wrapper
       (Self.QObject_View,
        Index,
        Stretch);
   end Set_Stretch_Factor;

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

   function Widget
    (Self : not null access constant Q_Splitter'Class;
     Index : Qt4.Q_Integer)
       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
           (widget_0_wrapper
             (Self.QObject_View,
              Index)).all)'Access;
   end Widget;

end Qt4.Splitters;
