File : message_windows.ads


-----------------------------------------------------------------------
--                              Win_IO                               --
--     A simple set of packages for graphical input and output       --
--                                                                   --
--                       Copyright (C) 2001-2010                     --
--                 Universidad de Cantabria, SPAIN                   --
--                                                                   --
-- Author: Michael Gonzalez       mgh@unican.es                      --
--                                                                   --
-- This is free software; you can redistribute it and/or             --
-- modify it under the terms of the GNU General Public               --
-- License as published by the Free Software Foundation; either      --
-- version 2 of the License, or (at your option) any later version.  --
--                                                                   --
-- This software is distributed in the hope that it will be useful,  --
-- but WITHOUT 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 along with this program; if not, write to the             --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --
-- Boston, MA 02111-1307, USA.                                       --
--                                                                   --
-----------------------------------------------------------------------
--                                                                   --
-- The Message_Windows package provides a simple window              --
-- for displaying a short message                                    --
-- It provides an OK button for closing the window                   --
--                                                                   --
-- This package requires Gtkada-2.2.0 or later                       --
--                                                                   --
-----------------------------------------------------------------------

with Message_Window_Pkg;

package Message_Windows is

   -----------------------------------------------------------------------
   --
   --                           MESSAGE_WINDOW
   --
   --  A Message_Window is a window that provides the following items:
   --
   --    - A label with a used-provided message
   --
   --    - An OK button that indicates that the user has finished viewing
   --      the message
   --
   -----------------------------------------------------------------------

   type Message_Window_Type is private;

   -----------------------------------------------------------------------
   --                      MESSAGE_WINDOW Operations
   --
   --  Message_Window (Message)      --  Create the window, with the
   --                                --  specified message
   --
   --  Wait           (MW)           --  Wait for the OK button to be pressed.
   --                                --  This will an indication that message
   --                                --  has been viewed
   --                                --  Before returning, it hides the window
   -----------------------------------------------------------------------

   function Message_Window
     (Message : String)
     return Message_Window_Type;

   procedure Wait
     (MW : in out Message_Window_Type);

private

   type Message_Window_Type is record
      Win : Message_Window_Pkg.Message_Window_Access;
   end record;

end Message_Windows;