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

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

   function arrowType_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Arrow_Type;
   pragma Import (C, arrowType_0_wrapper,
                     "__Qt4Ada_QToolButton_arrowType_0_wrapper");

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

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

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

   function popupMode_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Tool_Buttons.Tool_Button_Popup_Mode;
   pragma Import (C, popupMode_0_wrapper,
                     "__Qt4Ada_QToolButton_popupMode_0_wrapper");

   procedure setArrowType_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     The_type : Qt4.Arrow_Type);
   pragma Import (C, setArrowType_0_wrapper,
                     "__Qt4Ada_QToolButton_setArrowType_0_wrapper");

   procedure setAutoRaise_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Enable : Qt4.bool);
   pragma Import (C, setAutoRaise_0_wrapper,
                     "__Qt4Ada_QToolButton_setAutoRaise_0_wrapper");

   procedure setMenu_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Menu : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setMenu_0_wrapper,
                     "__Qt4Ada_QToolButton_setMenu_0_wrapper");

   procedure setPopupMode_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Mode : Qt4.Tool_Buttons.Tool_Button_Popup_Mode);
   pragma Import (C, setPopupMode_0_wrapper,
                     "__Qt4Ada_QToolButton_setPopupMode_0_wrapper");

   function toolButtonStyle_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Tool_Button_Style;
   pragma Import (C, toolButtonStyle_0_wrapper,
                     "__Qt4Ada_QToolButton_toolButtonStyle_0_wrapper");

   procedure setDefaultAction_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Action : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setDefaultAction_0_wrapper,
                     "__Qt4Ada_QToolButton_setDefaultAction_0_wrapper");

   procedure setToolButtonStyle_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Style : Qt4.Tool_Button_Style);
   pragma Import (C, setToolButtonStyle_0_wrapper,
                     "__Qt4Ada_QToolButton_setToolButtonStyle_0_wrapper");

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

   pragma Style_Checks ("N");

   ----------------
   -- Arrow_Type --
   ----------------

   function Arrow_Type
    (Self : not null access constant Q_Tool_Button'Class)
       return Qt4.Arrow_Type
   is
   begin
      return
        arrowType_0_wrapper
         (Self.QObject_View);
   end Arrow_Type;

   ----------------
   -- Auto_Raise --
   ----------------

   function Auto_Raise
    (Self : not null access constant Q_Tool_Button'Class)
       return Standard.Boolean
   is
   begin
      return
        Qt4.To_Boolean
         (autoRaise_0_wrapper
           (Self.QObject_View));
   end Auto_Raise;

   --------------------
   -- Default_Action --
   --------------------

   function Default_Action
    (Self : not null access constant Q_Tool_Button'Class)
       return not null access Qt4.Actions.Q_Action'Class
   is
   begin
      return
        Qt4.Actions.Q_Action'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (defaultAction_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Default_Action;

   ----------
   -- Menu --
   ----------

   function Menu
    (Self : not null access constant Q_Tool_Button'Class)
       return not null access Qt4.Menus.Q_Menu'Class
   is
   begin
      return
        Qt4.Menus.Q_Menu'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (menu_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Menu;

   ----------------
   -- Popup_Mode --
   ----------------

   function Popup_Mode
    (Self : not null access constant Q_Tool_Button'Class)
       return Qt4.Tool_Buttons.Tool_Button_Popup_Mode
   is
   begin
      return
        popupMode_0_wrapper
         (Self.QObject_View);
   end Popup_Mode;

   --------------------
   -- Set_Arrow_Type --
   --------------------

   procedure Set_Arrow_Type
    (Self : not null access Q_Tool_Button'Class;
     The_type : Qt4.Arrow_Type)
   is
   begin
      setArrowType_0_wrapper
       (Self.QObject_View,
        The_type);
   end Set_Arrow_Type;

   --------------------
   -- Set_Auto_Raise --
   --------------------

   procedure Set_Auto_Raise
    (Self : not null access Q_Tool_Button'Class;
     Enable : Standard.Boolean)
   is
   begin
      setAutoRaise_0_wrapper
       (Self.QObject_View,
        Qt4.To_bool (Enable));
   end Set_Auto_Raise;

   --------------
   -- Set_Menu --
   --------------

   procedure Set_Menu
    (Self : not null access Q_Tool_Button'Class;
     Menu : not null access Qt4.Menus.Q_Menu'Class)
   is
   begin
      setMenu_0_wrapper
       (Self.QObject_View,
        Menu.QObject_View);
   end Set_Menu;

   --------------------
   -- Set_Popup_Mode --
   --------------------

   procedure Set_Popup_Mode
    (Self : not null access Q_Tool_Button'Class;
     Mode : Qt4.Tool_Buttons.Tool_Button_Popup_Mode)
   is
   begin
      setPopupMode_0_wrapper
       (Self.QObject_View,
        Mode);
   end Set_Popup_Mode;

   -----------------------
   -- Tool_Button_Style --
   -----------------------

   function Tool_Button_Style
    (Self : not null access constant Q_Tool_Button'Class)
       return Qt4.Tool_Button_Style
   is
   begin
      return
        toolButtonStyle_0_wrapper
         (Self.QObject_View);
   end Tool_Button_Style;

   ------------------------
   -- Set_Default_Action --
   ------------------------

   procedure Set_Default_Action
    (Self : not null access Q_Tool_Button'Class;
     Action : not null access Qt4.Actions.Q_Action'Class)
   is
   begin
      setDefaultAction_0_wrapper
       (Self.QObject_View,
        Action.QObject_View);
   end Set_Default_Action;

   ---------------------------
   -- Set_Tool_Button_Style --
   ---------------------------

   procedure Set_Tool_Button_Style
    (Self : not null access Q_Tool_Button'Class;
     Style : Qt4.Tool_Button_Style)
   is
   begin
      setToolButtonStyle_0_wrapper
       (Self.QObject_View,
        Style);
   end Set_Tool_Button_Style;

   ---------------
   -- Show_Menu --
   ---------------

   procedure Show_Menu
    (Self : not null access Q_Tool_Button'Class)
   is
   begin
      showMenu_0_wrapper
       (Self.QObject_View);
   end Show_Menu;

end Qt4.Tool_Buttons;
