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