1. -- 
  2. -- Copyright (c) 2012 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. with Widgets.Buttons;                   use Widgets.Buttons; 
  10. with Widgets.Input_Boxes;               use Widgets.Input_Boxes; 
  11.  
  12. package Widgets.Containers.Panels.Dialogs.Open_World is 
  13.  
  14.     type Open_Dialog is new Dialog and 
  15.                             Button_Listener and 
  16.                             Input_Listener with private; 
  17.     type A_Open_Dialog is access all Open_Dialog'Class; 
  18.  
  19.     function Create_Open_Dialog( view : not null access Game_Views.Game_View'Class; 
  20.                                  id   : String ) return A_Dialog; 
  21.     pragma Precondition( id'Length > 0 ); 
  22.     pragma Postcondition( Create_Open_Dialog'Result /= null ); 
  23.  
  24.     -- Sets the error message displayed on the dialog 
  25.     procedure Set_Error( this  : not null access Open_Dialog'Class; 
  26.                          error : String ); 
  27.  
  28. private 
  29.  
  30.  
  31.  
  32.     type Open_Dialog is new Dialog and 
  33.                             Button_Listener and 
  34.                             Input_Listener with null record; 
  35.  
  36.     procedure Construct( this : access Open_Dialog; 
  37.                          view : not null access Game_Views.Game_View'Class; 
  38.                          id   : String ); 
  39.     pragma Precondition( id'Length > 0 ); 
  40.  
  41.     procedure Handle_Action( this   : access Open_Dialog; 
  42.                              action : A_Button_Action ); 
  43.  
  44.     procedure Handle_Action( this   : access Open_Dialog; 
  45.                              action : A_Input_Action ); 
  46.  
  47.     procedure Handle_Action( this    : access Open_Dialog; 
  48.                              action  : A_Key_Action; 
  49.                              handled : out Boolean ); 
  50.  
  51.     procedure On_Dialog_Show( this : access Open_Dialog ); 
  52.  
  53.     procedure Show( this : access Open_Dialog ); 
  54.  
  55. end Widgets.Containers.Panels.Dialogs.Open_World;