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 Events; 
  10. private with Events.Listeners; 
  11. private with Widgets.Buttons; 
  12.  
  13. package Widgets.Containers.Panels.Dialogs.Resize_World is 
  14.  
  15.     function Create_Resize_Dialog( view : not null access Game_Views.Game_View'Class; 
  16.                                    id   : String ) return A_Dialog; 
  17.     pragma Precondition( id'Length > 0 ); 
  18.     pragma Postcondition( Create_Resize_Dialog'Result /= null ); 
  19.  
  20. private 
  21.  
  22.     use Events; 
  23.     use Events.Listeners; 
  24.     use Widgets.Buttons; 
  25.  
  26.     type Resize_Dialog is new Dialog and 
  27.          Button_Listener and 
  28.          Event_Listener with 
  29.         record 
  30.             mapHeight, 
  31.             mapWidth  : Integer; 
  32.         end record; 
  33.  
  34.     procedure Construct( this : access Resize_Dialog; 
  35.                          view : not null access Game_Views.Game_View'Class; 
  36.                          id   : String ); 
  37.     pragma Precondition( id'Length > 0 ); 
  38.  
  39.     procedure Delete( this : in out Resize_Dialog ); 
  40.  
  41.     procedure Handle_Action( this   : access Resize_Dialog; 
  42.                              action : A_Button_Action ); 
  43.  
  44.     procedure Handle_Action( this    : access Resize_Dialog; 
  45.                              action  : A_Key_Action; 
  46.                              handled : out Boolean ); 
  47.  
  48.     procedure Handle_Event( this : access Resize_Dialog; 
  49.                             evt  : in out A_Event; 
  50.                             resp : out Response_Type ); 
  51.     pragma Precondition( evt /= null ); 
  52.  
  53.     procedure On_Dialog_Show( this : access Resize_Dialog ); 
  54.  
  55.     procedure Show( this : access Resize_Dialog ); 
  56.  
  57. end Widgets.Containers.Panels.Dialogs.Resize_World;