------------------------------------------------------------------------------
--                                                                          --
--                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.     --
------------------------------------------------------------------------------
limited with Qt4.Abstract_Buttons;
with Qt4.Dialogs;
limited with Qt4.Push_Buttons;
with Qt4.Strings;
with Qt4.Widgets;
with Qt_Ada.Generic_Object_Pointers;

package Qt4.Message_Boxes is

   type Message_Box_Icon is
    (No_Icon,
     Information,
     Warning,
     Critical,
     Question);
   pragma Convention (C, Message_Box_Icon);

   type Message_Box_Button_Role is
    (Invalid_Role,
     Accept_Role,
     Reject_Role,
     Destructive_Role,
     Action_Role,
     Help_Role,
     Yes_Role,
     No_Role,
     Reset_Role,
     Apply_Role,
     N_Roles);
   pragma Convention (C, Message_Box_Button_Role);
   for Message_Box_Button_Role use
    (Invalid_Role =>     -16#1#,
     Accept_Role =>      16#0#,
     Reject_Role =>      16#1#,
     Destructive_Role =>      16#2#,
     Action_Role =>      16#3#,
     Help_Role =>      16#4#,
     Yes_Role =>      16#5#,
     No_Role =>      16#6#,
     Reset_Role =>      16#7#,
     Apply_Role =>      16#8#,
     N_Roles =>      16#9#);

   type Q_Message_Box is limited interface
     and Qt4.Dialogs.Q_Dialog;

   type Q_Message_Box_Access is
     access all Q_Message_Box'Class;
   for Q_Message_Box_Access'Storage_Size use 0;

   type Q_Message_Box_Pointer is tagged;

   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);

   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;

   function Clicked_Button
    (Self : not null access constant Q_Message_Box'Class)
       return not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class;

   function Default_Button
    (Self : not null access constant Q_Message_Box'Class)
       return not null access Qt4.Push_Buttons.Q_Push_Button'Class;

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

   function Escape_Button
    (Self : not null access constant Q_Message_Box'Class)
       return not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class;

   function Icon
    (Self : not null access constant Q_Message_Box'Class)
       return Qt4.Message_Boxes.Message_Box_Icon;

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

   procedure Remove_Button
    (Self : not null access Q_Message_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class);

   procedure Set_Default_Button
    (Self : not null access Q_Message_Box'Class;
     Button : not null access Qt4.Push_Buttons.Q_Push_Button'Class);

   procedure Set_Detailed_Text
    (Self : not null access Q_Message_Box'Class;
     Text : Qt4.Strings.Q_String);

   procedure Set_Escape_Button
    (Self : not null access Q_Message_Box'Class;
     Button : not null access Qt4.Abstract_Buttons.Q_Abstract_Button'Class);

   procedure Set_Icon
    (Self : not null access Q_Message_Box'Class;
     Icon : Qt4.Message_Boxes.Message_Box_Icon);

   procedure Set_Informative_Text
    (Self : not null access Q_Message_Box'Class;
     Text : Qt4.Strings.Q_String);

   procedure Set_Text
    (Self : not null access Q_Message_Box'Class;
     Text : Qt4.Strings.Q_String);

   procedure Set_Window_Title
    (Self : not null access Q_Message_Box'Class;
     Title : Qt4.Strings.Q_String);

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

   type Standard_Button is
    (No_Button,
     Ok,
     Save,
     Save_All,
     Open,
     Yes,
     Yes_To_All,
     No,
     No_To_All,
     Abort_Button,
     --  XXX Вместо Abort используется Abort_Button,
     --  т.к. Abort является ключевым словом языка Ада
     Retry,
     Ignore,
     Close,
     Cancel,
     Discard,
     Help,
     Apply,
     Reset,
     Restore_Defaults);
   pragma Convention (C, Standard_Button);
   for Standard_Button'Size use Interfaces.C.unsigned'Size;
   for Standard_Button use
    (No_Button        => 16#00000000#,
     Ok               => 16#00000400#,
     Save             => 16#00000800#,
     Save_All         => 16#00001000#,
     Open             => 16#00002000#,
     Yes              => 16#00004000#,
     Yes_To_All       => 16#00008000#,
     No               => 16#00010000#,
     No_To_All        => 16#00020000#,
     Abort_Button     => 16#00040000#,
     Retry            => 16#00080000#,
     Ignore           => 16#00100000#,
     Close            => 16#00200000#,
     Cancel           => 16#00400000#,
     Discard          => 16#00800000#,
     Help             => 16#01000000#,
     Apply            => 16#02000000#,
     Reset            => 16#04000000#,
     Restore_Defaults => 16#08000000#);

   package Standard_Button_Flags is new Qt4_Generic_Flags (Standard_Button);
   type Standard_Buttons is new Standard_Button_Flags.Flags;

   procedure About
    (Parent : not null access Qt4.Widgets.Q_Widget'Class;
     Title  : Qt4.Strings.Q_String;
     Text   : Qt4.Strings.Q_String);

   procedure About_Qt
    (Parent : not null access Qt4.Widgets.Q_Widget'Class;
     Title  : Qt4.Strings.Q_String := Qt4.Strings.Create);

   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;

   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;

   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;

   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;

   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);

   package Q_Message_Box_Pointers is
     new Qt_Ada.Generic_Object_Pointers (Q_Message_Box, Q_Message_Box_Access);

   type Q_Message_Box_Pointer is
     new Q_Message_Box_Pointers.Q_Pointer with null record;

end Qt4.Message_Boxes;
