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. private with Widgets.Buttons; 
  10. private with Widgets.Input_Boxes; 
  11.  
  12. package Widgets.Containers.Panels.Dialogs.New_World is 
  13.  
  14.     function Create_New_Dialog( view : not null access Game_Views.Game_View'Class; 
  15.                                 id   : String ) return A_Dialog; 
  16.     pragma Precondition( id'Length > 0 ); 
  17.     pragma Postcondition( Create_New_Dialog'Result /= null ); 
  18.  
  19. private 
  20.  
  21.     use Widgets.Buttons; 
  22.     use Widgets.Input_Boxes; 
  23.  
  24.     type New_Dialog is new Dialog and 
  25.          Button_Listener and 
  26.          Input_Listener with null record; 
  27.  
  28.     procedure Construct( this : access New_Dialog; 
  29.                          view : not null access Game_Views.Game_View'Class; 
  30.                          id   : String ); 
  31.     pragma Precondition( id'Length > 0 ); 
  32.  
  33.     procedure Handle_Action( this   : access New_Dialog; 
  34.                              action : A_Button_Action ); 
  35.  
  36.     procedure Handle_Action( this   : access New_Dialog; 
  37.                              action : A_Input_Action ); 
  38.  
  39.     procedure Handle_Action( this    : access New_Dialog; 
  40.                              action  : A_Key_Action; 
  41.                              handled : out Boolean ); 
  42.  
  43.     procedure On_Dialog_Show( this : access New_Dialog ); 
  44.  
  45.     procedure Show( this : access New_Dialog ); 
  46.  
  47. end Widgets.Containers.Panels.Dialogs.New_World;