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.Save_World is 
  13.  
  14.     type Save_Dialog is new Dialog and 
  15.                             Button_Listener and 
  16.                             Input_Listener with private; 
  17.     type A_Save_Dialog is access all Save_Dialog'Class; 
  18.  
  19.     function Create_Save_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_Save_Dialog'Result /= null ); 
  23.  
  24.     -- Sets the error message displayed on the dialog 
  25.     procedure Set_Error( this  : not null access Save_Dialog'Class; 
  26.                          error : String ); 
  27.  
  28. private 
  29.  
  30.     type Save_Dialog is new Dialog and 
  31.                             Button_Listener and 
  32.                             Input_Listener with null record; 
  33.  
  34.     procedure Construct( this : access Save_Dialog; 
  35.                          view : not null access Game_Views.Game_View'Class; 
  36.                          id   : String ); 
  37.     pragma Precondition( id'Length > 0 ); 
  38.  
  39.     procedure Handle_Action( this   : access Save_Dialog; 
  40.                              action : A_Button_Action ); 
  41.  
  42.     procedure Handle_Action( this   : access Save_Dialog; 
  43.                              action : A_Input_Action ); 
  44.  
  45.     procedure Handle_Action( this    : access Save_Dialog; 
  46.                              action  : A_Key_Action; 
  47.                              handled : out Boolean ); 
  48.  
  49.     procedure On_Dialog_Show( this : access Save_Dialog ); 
  50.  
  51.     procedure Show( this : access Save_Dialog ); 
  52.  
  53. end Widgets.Containers.Panels.Dialogs.Save_World;