1. package Widgets.Containers.Panels.Dialogs is 
  2.  
  3.     type Dialog is abstract new Panel and 
  4.                                 Key_Listener and 
  5.                                 Visibility_Listener with private; 
  6.     type A_Dialog is access all Dialog'Class; 
  7.  
  8.     -- Hides the dialog. It remains a child of the window. 
  9.     procedure Hide( this : access Dialog ); 
  10.  
  11.     -- Displays the modal dialog in the window. The dialog must have been added 
  12.     -- to the window before this is called. 
  13.     procedure Show( this : access Dialog ); 
  14.  
  15. private 
  16.  
  17.     type Dialog is abstract new Panel and 
  18.                                 Key_Listener and 
  19.                                 Visibility_Listener with 
  20.         record 
  21.             dragStartX, 
  22.             dragStartY : Integer := -1; 
  23.         end record; 
  24.  
  25.     procedure Construct( this  : access Dialog; 
  26.                          view  : not null access Game_Views.Game_View'Class; 
  27.                          id    : String; 
  28.                          title : String; 
  29.                          icon  : String ); 
  30.     pragma Precondition( id'Length > 0 ); 
  31.  
  32.     procedure Delete( this : in out Dialog ); 
  33.  
  34.     procedure Handle_Action( this    : access Dialog; 
  35.                              action  : A_Key_Action; 
  36.                              handled : out Boolean ); 
  37.  
  38.     procedure Handle_Action( this   : access Dialog; 
  39.                              action : A_Visibility_Action ); 
  40.  
  41.     procedure Handle_Hide( this : access Dialog ); 
  42.  
  43.     procedure Handle_Mouse_Move( this : access Dialog; 
  44.                                  evt  : not null A_Mouse_Event ); 
  45.  
  46.     procedure Handle_Mouse_Press( this : access Dialog; 
  47.                                   evt  : not null A_Mouse_Button_Event ); 
  48.  
  49.     procedure Handle_Show( this : access Dialog ); 
  50.  
  51. end Widgets.Containers.Panels.Dialogs;