------------------------------------------------------------------------------
--                                                                          --
--                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.Abstract_Buttons;
with Qt4.Push_Buttons;
with Qt_Ada.Internals.Object_Registry;
with Qt_Ada.Internals.Objects;
with Qt_Ada.Internals.Objects.Object_Utilities;

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

   procedure addButton_1_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject;
     Role : Qt4.Message_Boxes.Message_Box_Button_Role);
   pragma Import (C, addButton_1_wrapper,
                     "__Qt4Ada_QMessageBox_addButton_1_wrapper");

   function addButton_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString;
     Role : Qt4.Message_Boxes.Message_Box_Button_Role)
       return not null access Qt_Ada.Internals.Objects.QObject;
   pragma Import (C, addButton_0_wrapper,
                     "__Qt4Ada_QMessageBox_addButton_0_wrapper");

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

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

   procedure detailedText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, detailedText_0_wrapper,
                     "__Qt4Ada_QMessageBox_detailedText_0_wrapper");

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

   function icon_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject)
       return Qt4.Message_Boxes.Message_Box_Icon;
   pragma Import (C, icon_0_wrapper,
                     "__Qt4Ada_QMessageBox_icon_0_wrapper");

   procedure informativeText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, informativeText_0_wrapper,
                     "__Qt4Ada_QMessageBox_informativeText_0_wrapper");

   procedure removeButton_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, removeButton_0_wrapper,
                     "__Qt4Ada_QMessageBox_removeButton_0_wrapper");

   procedure setDefaultButton_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setDefaultButton_0_wrapper,
                     "__Qt4Ada_QMessageBox_setDefaultButton_0_wrapper");

   procedure setDetailedText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setDetailedText_0_wrapper,
                     "__Qt4Ada_QMessageBox_setDetailedText_0_wrapper");

   procedure setEscapeButton_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Button : not null access Qt_Ada.Internals.Objects.QObject);
   pragma Import (C, setEscapeButton_0_wrapper,
                     "__Qt4Ada_QMessageBox_setEscapeButton_0_wrapper");

   procedure setIcon_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Icon : Qt4.Message_Boxes.Message_Box_Icon);
   pragma Import (C, setIcon_0_wrapper,
                     "__Qt4Ada_QMessageBox_setIcon_0_wrapper");

   procedure setInformativeText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setInformativeText_0_wrapper,
                     "__Qt4Ada_QMessageBox_setInformativeText_0_wrapper");

   procedure setText_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Text : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setText_0_wrapper,
                     "__Qt4Ada_QMessageBox_setText_0_wrapper");

   procedure setWindowTitle_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Title : not null access constant Qt4.Strings.Internals.QString);
   pragma Import (C, setWindowTitle_0_wrapper,
                     "__Qt4Ada_QMessageBox_setWindowTitle_0_wrapper");

   procedure text_0_wrapper
    (Self : not null access Qt_Ada.Internals.Objects.QObject;
     Returns : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, text_0_wrapper,
                     "__Qt4Ada_QMessageBox_text_0_wrapper");

   procedure about_wrapper
    (Parent : not null access Qt_Ada.Internals.Objects.QObject;
     Title  : not null access Qt4.Strings.Internals.QString;
     Text   : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, about_wrapper, "__Qt4Ada_QMessage_Box_about_wrapper");

   procedure aboutQt_wrapper
    (Parent : not null access Qt_Ada.Internals.Objects.QObject;
     Title  : not null access Qt4.Strings.Internals.QString);
   pragma Import (C, aboutQt_wrapper, "__Qt4Ada_QMessage_Box_aboutQt_wrapper");

   function critical_wrapper
    (Parent         : access Qt_Ada.Internals.Objects.QObject;
     Title          : not null access Qt4.Strings.Internals.QString;
     Text           : not null access Qt4.Strings.Internals.QString;
     Buttons        : Standard_Buttons;
     Default_Button : Standard_Button)
       return Standard_Button;
   pragma Import
    (C, critical_wrapper, "__Qt4Ada_QMessage_Box_critical_wrapper");

   function information_wrapper
    (Parent         : access Qt_Ada.Internals.Objects.QObject;
     Title          : not null access Qt4.Strings.Internals.QString;
     Text           : not null access Qt4.Strings.Internals.QString;
     Buttons        : Standard_Buttons;
     Default_Button : Standard_Button)
       return Standard_Button;
   pragma Import
    (C, information_wrapper, "__Qt4Ada_QMessage_Box_information_wrapper");

   function question_wrapper
    (Parent         : access Qt_Ada.Internals.Objects.QObject;
     Title          : not null access Qt4.Strings.Internals.QString;
     Text           : not null access Qt4.Strings.Internals.QString;
     Buttons        : Standard_Buttons;
     Default_Button : Standard_Button)
       return Standard_Button;
   pragma Import
    (C, question_wrapper, "__Qt4Ada_QMessage_Box_question_wrapper");

   function warning_wrapper
    (Parent         : access Qt_Ada.Internals.Objects.QObject;
     Title          : not null access Qt4.Strings.Internals.QString;
     Text           : not null access Qt4.Strings.Internals.QString;
     Buttons        : Standard_Buttons;
     Default_Button : Standard_Button)
       return Standard_Button;
   pragma Import (C, warning_wrapper, "__Qt4Ada_QMessage_Box_warning_wrapper");

   -----------
   -- About --
   -----------

   procedure About
    (Parent : not null access Qt4.Widgets.Q_Widget'Class;
     Title  : Qt4.Strings.Q_String;
     Text   : Qt4.Strings.Q_String)
   is
   begin
      about_wrapper
       (Parent.QObject_View,
        Qt4.Strings.Internals.QString_View (Title),
        Qt4.Strings.Internals.QString_View (Text));
   end About;

   --------------
   -- About_Qt --
   --------------

   procedure About_Qt
    (Parent : not null access Qt4.Widgets.Q_Widget'Class;
     Title  : Qt4.Strings.Q_String := Qt4.Strings.Create)
   is
   begin
      aboutQt_wrapper
       (Parent.QObject_View,
        Qt4.Strings.Internals.QString_View (Title));
   end About_Qt;

   --------------
   -- Critical --
   --------------

   function Critical
    (Parent         : access Qt4.Widgets.Q_Widget'Class;
     Title          : Qt4.Strings.Q_String;
     Text           : Qt4.Strings.Q_String;
     Buttons        : Standard_Buttons := +Ok;
     Default_Button : Standard_Button  := No_Button)
       return Standard_Button
   is
   begin
      return critical_wrapper
       (Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_QObject (Parent),
        Qt4.Strings.Internals.QString_View (Title),
        Qt4.Strings.Internals.QString_View (Text),
        Buttons,
        Default_Button);
   end Critical;

   -----------------
   -- Information --
   -----------------

   function Information
    (Parent         : access Qt4.Widgets.Q_Widget'Class;
     Title          : Qt4.Strings.Q_String;
     Text           : Qt4.Strings.Q_String;
     Buttons        : Standard_Buttons := +Ok;
     Default_Button : Standard_Button  := No_Button)
       return Standard_Button
   is
   begin
      return information_wrapper
       (Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_QObject (Parent),
        Qt4.Strings.Internals.QString_View (Title),
        Qt4.Strings.Internals.QString_View (Text),
        Buttons,
        Default_Button);
   end Information;

   --------------
   -- Question --
   --------------

   function Question
    (Parent         : access Qt4.Widgets.Q_Widget'Class;
     Title          : Qt4.Strings.Q_String;
     Text           : Qt4.Strings.Q_String;
     Buttons        : Standard_Buttons := +Ok;
     Default_Button : Standard_Button  := No_Button)
       return Standard_Button
   is
   begin
      return question_wrapper
       (Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_QObject (Parent),
        Qt4.Strings.Internals.QString_View (Title),
        Qt4.Strings.Internals.QString_View (Text),
        Buttons,
        Default_Button);
   end Question;

   -------------
   -- Warning --
   -------------

   function Warning
    (Parent         : access Qt4.Widgets.Q_Widget'Class;
     Title          : Qt4.Strings.Q_String;
     Text           : Qt4.Strings.Q_String;
     Buttons        : Standard_Buttons := +Ok;
     Default_Button : Standard_Button  := No_Button)
       return Standard_Button
   is
   begin
      return warning_wrapper
       (Qt_Ada.Internals.Objects.Object_Utilities.Corresponding_QObject (Parent),
        Qt4.Strings.Internals.QString_View (Title),
        Qt4.Strings.Internals.QString_View (Text),
        Buttons,
        Default_Button);
   end Warning;

   -------------
   -- Warning --
   -------------

   procedure Warning
    (Parent         : access Qt4.Widgets.Q_Widget'Class;
     Title          : Qt4.Strings.Q_String;
     Text           : Qt4.Strings.Q_String;
     Buttons        : Standard_Buttons := +Ok;
     Default_Button : Standard_Button  := No_Button)
   is
      Aux : constant Standard_Button
        := Warning (Parent, Title, Text, Buttons, Default_Button);
      pragma Unreferenced (Aux);

   begin
      null;
   end Warning;

   pragma Style_Checks ("N");

   ----------------
   -- Add_Button --
   ----------------

   procedure Add_Button
    (Self : not null access Q_Message_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class;
     Role : Qt4.Message_Boxes.Message_Box_Button_Role)
   is
   begin
      addButton_1_wrapper
       (Self.QObject_View,
        Button.QObject_View,
        Role);
   end Add_Button;

   ----------------
   -- Add_Button --
   ----------------

   function Add_Button
    (Self : not null access Q_Message_Box'Class;
     Text : Qt4.Strings.Q_String;
     Role : Qt4.Message_Boxes.Message_Box_Button_Role)
       return not null access Qt4.Push_Buttons.Q_Push_Button'Class
   is
   begin
      return
        Qt4.Push_Buttons.Q_Push_Button'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (addButton_0_wrapper
             (Self.QObject_View,
              Qt4.Strings.Internals.QString_View (Text),
              Role)).all)'Access;
   end Add_Button;

   --------------------
   -- Clicked_Button --
   --------------------

   function Clicked_Button
    (Self : not null access constant Q_Message_Box'Class)
       return not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class
   is
   begin
      return
        Qt4.Abstract_Buttons.Q_Abstract_Button'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (clickedButton_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Clicked_Button;

   --------------------
   -- Default_Button --
   --------------------

   function Default_Button
    (Self : not null access constant Q_Message_Box'Class)
       return not null access Qt4.Push_Buttons.Q_Push_Button'Class
   is
   begin
      return
        Qt4.Push_Buttons.Q_Push_Button'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (defaultButton_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Default_Button;

   -------------------
   -- Detailed_Text --
   -------------------

   function Detailed_Text
    (Self : not null access constant Q_Message_Box'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      detailedText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Detailed_Text;

   -------------------
   -- Escape_Button --
   -------------------

   function Escape_Button
    (Self : not null access constant Q_Message_Box'Class)
       return not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class
   is
   begin
      return
        Qt4.Abstract_Buttons.Q_Abstract_Button'Class
         (Qt_Ada.Internals.Object_Registry.To_Q_Object
           (escapeButton_0_wrapper
             (Self.QObject_View)).all)'Access;
   end Escape_Button;

   ----------
   -- Icon --
   ----------

   function Icon
    (Self : not null access constant Q_Message_Box'Class)
       return Qt4.Message_Boxes.Message_Box_Icon
   is
   begin
      return
        icon_0_wrapper
         (Self.QObject_View);
   end Icon;

   ----------------------
   -- Informative_Text --
   ----------------------

   function Informative_Text
    (Self : not null access constant Q_Message_Box'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      informativeText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Informative_Text;

   -------------------
   -- Remove_Button --
   -------------------

   procedure Remove_Button
    (Self : not null access Q_Message_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class)
   is
   begin
      removeButton_0_wrapper
       (Self.QObject_View,
        Button.QObject_View);
   end Remove_Button;

   ------------------------
   -- Set_Default_Button --
   ------------------------

   procedure Set_Default_Button
    (Self : not null access Q_Message_Box'Class;
     Button : not null access Qt4.Push_Buttons.Q_Push_Button'Class)
   is
   begin
      setDefaultButton_0_wrapper
       (Self.QObject_View,
        Button.QObject_View);
   end Set_Default_Button;

   -----------------------
   -- Set_Detailed_Text --
   -----------------------

   procedure Set_Detailed_Text
    (Self : not null access Q_Message_Box'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setDetailedText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Detailed_Text;

   -----------------------
   -- Set_Escape_Button --
   -----------------------

   procedure Set_Escape_Button
    (Self : not null access Q_Message_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class)
   is
   begin
      setEscapeButton_0_wrapper
       (Self.QObject_View,
        Button.QObject_View);
   end Set_Escape_Button;

   --------------
   -- Set_Icon --
   --------------

   procedure Set_Icon
    (Self : not null access Q_Message_Box'Class;
     Icon : Qt4.Message_Boxes.Message_Box_Icon)
   is
   begin
      setIcon_0_wrapper
       (Self.QObject_View,
        Icon);
   end Set_Icon;

   --------------------------
   -- Set_Informative_Text --
   --------------------------

   procedure Set_Informative_Text
    (Self : not null access Q_Message_Box'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setInformativeText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Informative_Text;

   --------------
   -- Set_Text --
   --------------

   procedure Set_Text
    (Self : not null access Q_Message_Box'Class;
     Text : Qt4.Strings.Q_String)
   is
   begin
      setText_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Text));
   end Set_Text;

   ----------------------
   -- Set_Window_Title --
   ----------------------

   procedure Set_Window_Title
    (Self : not null access Q_Message_Box'Class;
     Title : Qt4.Strings.Q_String)
   is
   begin
      setWindowTitle_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Title));
   end Set_Window_Title;

   ----------
   -- Text --
   ----------

   function Text
    (Self : not null access constant Q_Message_Box'Class)
       return Qt4.Strings.Q_String
   is
      Returns : Qt4.Strings.Q_String;

   begin
      text_0_wrapper
       (Self.QObject_View,
        Qt4.Strings.Internals.QString_View (Returns));

      return Returns;
   end Text;

end Qt4.Message_Boxes;
