------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real-time scheduling analysis tool. -- This program provides services to automatically check schedulability and -- other performance criteria of real-time architecture models. -- -- Copyright (C) 2002-2016, Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285 laboratory, Université de Bretagne Occidentale -- -- Cheddar has been published in the "Agence de Protection des Programmes/France" in 2008. -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- The full list of contributors and sponsors can be found in AUTHORS.txt and SPONSORS.txt -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- ------------------------------------------------------------------------------ -- Last update : -- $Rev: 1249 $ -- $Date: 2014-08-28 07:02:15 +0200 (Fri, 28 Aug 2014) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Glib; use Glib; with Glib.Object; use Glib.Object; with Gtk; use Gtk; with Gtk.Widget; use Gtk.Widget; with Gtk.Enums; use Gtk.Enums; with Gtk.Menu_Item; use Gtk.Menu_Item; with Gtk.Main; use Gtk.Main; with Glib.Error; use Glib.Error; with Gtk.Widget; use Gtk.Widget; with Gtk.Dialog; use Gtk.Dialog; with Gtk.Button; use Gtk.Button; with Gtk.About_Dialog; use Gtk.About_Dialog; with Gtk.Label; use Gtk.Label; with Gtk.Drawing_Area; use Gtk.Drawing_Area; with Gtk.Handlers; use Gtk.Handlers; with gdk; use gdk; with Gdk.Color; use Gdk.Color; with Gdk.GC; use Gdk.GC; with Gdk.Window; use Gdk.Window; with Gdk.font; use Gdk.font; with Gdk.Event; use Gdk.Event; with pango.font; use pango.font; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Translate; use Translate; with Framework_Config; use Framework_Config; with Systems; use Systems; with Xml_generic_Parsers; use Xml_generic_Parsers; with AADL_Parsers; use AADL_Parsers; with Xml_generic_Parsers; use Xml_generic_Parsers; with Xml_generic_Parsers.architecture; use Xml_generic_Parsers.architecture; with graphical_editor.user_message; use graphical_editor.user_message; with graphical_editor.generic_package_widget; use graphical_editor.generic_package_widget; with graphical_editor.Draw_Scheduling; use graphical_editor.Draw_Scheduling; with graphical_editor.scheduling_simulation_draw_callbacks; use graphical_editor.scheduling_simulation_draw_callbacks; with Multiprocessor_Services; use Multiprocessor_Services; with ARINC_653_Schema; use ARINC_653_Schema; with arinc_653_Services; use arinc_653_Services; with Unicode.CES; use Unicode.CES; with Unicode.Encodings; use Unicode.Encodings; with Ada.Direct_IO; with Ada.Exceptions; use Ada.Exceptions; with Ada.IO_Exceptions; use Ada.IO_Exceptions; with Ada.Text_IO; use Ada.Text_IO; with Ada.Text_IO.Text_Streams; use Ada.Text_IO.Text_Streams; with Ada.Unchecked_Deallocation; with DOM.Core.Documents; use DOM.Core, DOM.Core.Documents; with DOM.core; use DOM.core; with DOM.Core.Nodes; use DOM.Core.Nodes; with DOM.Readers; use DOM.Readers; with GNAT.Command_Line; use GNAT.Command_Line; with GNAT.Expect; use GNAT.Expect; with GNAT.Current_Exception; use GNAT.Current_Exception; with GNAT.OS_Lib; use GNAT.OS_Lib; with Input_Sources.File; use Input_Sources.File; with Input_Sources.Http; use Input_Sources.Http; with Input_Sources; use Input_Sources; with Sax.Encodings; use Sax.Encodings; with Sax.Readers; use Sax.Readers; with Sax.Symbols; with Sax.Utils; use Sax.Utils; package body graphical_editor.file_selector is ----------------------------------------- -- Subprogram for all file selectors ----------------------------------------- procedure On_cancel_Pressed (Object : access Gtk_Button_Record'Class) is begin Destroy (Get_Toplevel (Gtk_Widget (Object))); end On_cancel_Pressed; procedure Gtk_New (File_Selector : out File_Selector_Access) is begin File_Selector := new File_Selector_Record; end Gtk_New; procedure Initialize (File_Selector : access File_Selector_Record'Class; label : unbounded_string) is begin Gtk.File_Selection.Initialize (File_Selector, To_String( label ) ); Set_Show_File_Op_Buttons (File_Selector, True); Set_Border_Width (File_Selector, 10); Set_Title (File_Selector, To_String( label ) ); Set_Policy (File_Selector, False, True, False); Set_Position (File_Selector, Win_Pos_Center_Always); Set_Modal (File_Selector, True); File_Selector.Cancel_Button := Get_Cancel_Button (File_Selector); Set_Flags (File_Selector.Cancel_Button, Can_Default); Button_Callback.Connect (File_Selector.Cancel_Button, "clicked", Button_Callback.To_Marshaller (On_cancel_Pressed'Access)); end Initialize; ----------------------------------------- -- Open XML file specific subprograms ----------------------------------------- procedure On_open_xml_Ok_Pressed (Object : access Gtk_Button_Record'Class) is begin Do_Open; Xml_Project_File_Name := To_Unbounded_String (Get_Filename (File_Selector_widget)); begin Systems.Read_From_Xml_File (Sys, Project_File_Dir_List, Xml_Project_File_Name); Is_Saved := True; exception when Xml_Read_Error => Show_Message_Box (Lb_Can_Not_Read_File (Current_Language) & To_Unbounded_String (" ; Xml Fatal Error ; ") & Exception_Message); when Ada.IO_Exceptions.Name_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Name_Error")); when Ada.IO_Exceptions.Status_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Status_Error")); when Ada.IO_Exceptions.Mode_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Mode_Error")); when Ada.IO_Exceptions.Use_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Use_Error")); when Ada.IO_Exceptions.Device_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Device_Error")); when Ada.IO_Exceptions.End_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", End_Error")); when Ada.IO_Exceptions.Data_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Data_Error")); when Ada.IO_Exceptions.Layout_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Layout_Error")); when others => Show_Message_Box (Lb_Can_Not_Read_File (Current_Language) & " ; " & Exception_Name & " ; " & Exception_Message); end; Destroy (File_Selector_widget); end On_open_xml_Ok_Pressed ; procedure Initialize_open_xml_file (File_Selector : access File_Selector_Record'Class) is begin initialize(file_selector, Lb_Open_Xml (Current_Language) & To_Unbounded_String (" ") & Lb_File (Current_Language) ); File_Selector.Ok_Button := Get_Ok_Button (File_Selector); Set_Flags (File_Selector.Ok_Button, Can_Default); Button_Callback.Connect (File_Selector.Ok_Button, "clicked", Button_Callback.To_Marshaller (On_open_xml_Ok_Pressed'Access)); end Initialize_open_xml_file; ----------------------------------------- -- Saveas XML file specific subprograms ----------------------------------------- procedure On_saveas_xml_Ok_Pressed (Object : access Gtk_Button_Record'Class) is begin Xml_Project_File_Name := To_Unbounded_String (Get_Filename (File_Selector_widget)); begin Systems.Write_To_Xml_File (Sys, Xml_Project_File_Name); Is_Saved := True; Is_New := False; exception when Ada.IO_Exceptions.Name_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Name_Error")); when Ada.IO_Exceptions.Status_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Status_Error")); when Ada.IO_Exceptions.Mode_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Mode_Error")); when Ada.IO_Exceptions.Use_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Use_Error")); when Ada.IO_Exceptions.Device_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Device_Error")); when Ada.IO_Exceptions.End_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", End_Error")); when Ada.IO_Exceptions.Data_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Data_Error")); when Ada.IO_Exceptions.Layout_Error => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Layout_Error")); when others => Xml_Project_File_Name := empty_string; Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & " ; Exception name : " & Exception_Name & " ; " & "Exception message : " & Exception_Message); end; Destroy (File_Selector_widget); end On_saveas_xml_Ok_Pressed; procedure Initialize_saveas_xml_file (File_Selector : access File_Selector_Record'Class) is begin initialize(file_selector, Lb_save_as_xml (Current_Language) ); File_Selector.Ok_Button := Get_Ok_Button (File_Selector); Set_Flags (File_Selector.Ok_Button, Can_Default); Button_Callback.Connect (File_Selector.Ok_Button, "clicked", Button_Callback.To_Marshaller (On_saveas_xml_Ok_Pressed'Access)); end Initialize_saveas_xml_file; ----------------------------------------- -- AADL import file specific subprograms ----------------------------------------- procedure On_aadl_import_Ok_Pressed (Object : access Gtk_Button_Record'Class) is File : Unbounded_String; Temp : constant unbounded_string_ptr := new Unbounded_String; begin Do_Aadl_Import; File := To_Unbounded_String (Get_Filename (File_Selector_widget)); Temp.all := File; begin add (Aadl_Project_File_Name, Temp); Systems.Read_From_Aadl_File (Sys, Project_File_Dir_List, Aadl_Project_File_Name); Is_Saved := True; exception when AADL_Read_Error => Show_Message_Box (Lb_Can_Not_Read_File (Current_Language) & To_Unbounded_String (" ; AADL parsing Error ; ") & Exception_Message); when Ada.IO_Exceptions.Name_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Name_Error")); when Ada.IO_Exceptions.Status_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Status_Error")); when Ada.IO_Exceptions.Mode_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Mode_Error")); when Ada.IO_Exceptions.Use_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Use_Error")); when Ada.IO_Exceptions.Device_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Device_Error")); when Ada.IO_Exceptions.End_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", End_Error")); when Ada.IO_Exceptions.Data_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Data_Error")); when Ada.IO_Exceptions.Layout_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Layout_Error")); when others => Show_Message_Box (Lb_Can_Not_Read_File (Current_Language) & " ; " & Exception_Name & " ; " & Exception_Message); end; Destroy (File_Selector_widget); end On_aadl_import_Ok_Pressed; procedure Initialize_aadl_import (File_Selector : access File_Selector_Record'Class) is begin initialize(file_selector, Lb_Import_Aadl (Current_Language) ); File_Selector.Ok_Button := Get_Ok_Button (File_Selector); Set_Flags (File_Selector.Ok_Button, Can_Default); Button_Callback.Connect (File_Selector.Ok_Button, "clicked", Button_Callback.To_Marshaller (On_aadl_import_Ok_Pressed'Access)); end Initialize_aadl_import; ----------------------------------------- -- AADL export file specific subprograms ----------------------------------------- procedure On_aadl_export_Ok_Pressed (Object : access Gtk_Button_Record'Class) is File : Unbounded_String; begin Do_Aadl_export; File := To_Unbounded_String (Get_Filename (File_Selector_widget)); begin Systems.Write_To_Aadl_File (Sys, File); exception when Ada.IO_Exceptions.Name_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Name_Error")); when Ada.IO_Exceptions.Status_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Status_Error")); when Ada.IO_Exceptions.Mode_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Mode_Error")); when Ada.IO_Exceptions.Use_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Use_Error")); when Ada.IO_Exceptions.Device_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Device_Error")); when Ada.IO_Exceptions.End_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", End_Error")); when Ada.IO_Exceptions.Data_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Data_Error")); when Ada.IO_Exceptions.Layout_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Layout_Error")); when others => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & " ; Exception name : " & Exception_Name & " ; " & "Exception message : " & Exception_Message); end; Destroy (File_Selector_widget); end on_aadl_export_Ok_Pressed; procedure Initialize_aadl_export (File_Selector : access File_Selector_Record'Class) is begin initialize(file_selector, Lb_export_Aadl (Current_Language) ); File_Selector.Ok_Button := Get_Ok_Button (File_Selector); Set_Flags (File_Selector.Ok_Button, Can_Default); Button_Callback.Connect (File_Selector.Ok_Button, "clicked", Button_Callback.To_Marshaller (On_aadl_export_Ok_Pressed'Access)); end Initialize_aadl_export; ------------------------------------------------------ -- Import XML event table file specific subprograms ------------------------------------------------------ procedure on_import_event_table_Ok_Pressed(Object : access Gtk_Button_Record'Class) is begin Xml_Event_Table_File_Name := To_Unbounded_String (Get_Filename (File_Selector_widget)); begin Read_From_Xml_File (Framework.Sched, Sys, Xml_Event_Table_File_Name); exception when Xml_Read_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Xml Fatal Error")); when Ada.IO_Exceptions.Name_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Name_Error")); when Ada.IO_Exceptions.Status_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Status_Error")); when Ada.IO_Exceptions.Mode_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Mode_Error")); when Ada.IO_Exceptions.Use_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Use_Error")); when Ada.IO_Exceptions.Device_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Device_Error")); when Ada.IO_Exceptions.End_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", End_Error")); when Ada.IO_Exceptions.Data_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Data_Error")); when Ada.IO_Exceptions.Layout_Error => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & To_Unbounded_String (", Layout_Error")); when others => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & " ; Exception name : " & Exception_Name & " ; " & "Exception message : " & Exception_Message); end; Destroy (File_Selector_widget); end on_import_event_table_Ok_Pressed; procedure Initialize_import_event_table (File_Selector : access File_Selector_Record'Class) is begin initialize(file_selector, Lb_import_event_table (Current_Language) ); File_Selector.Ok_Button := Get_Ok_Button (File_Selector); Set_Flags (File_Selector.Ok_Button, Can_Default); Button_Callback.Connect (File_Selector.Ok_Button, "clicked", Button_Callback.To_Marshaller (on_import_event_table_Ok_Pressed'Access)); end Initialize_import_event_table; ------------------------------------------------------ -- Export XML event table file specific subprograms ------------------------------------------------------ procedure on_export_event_table_Ok_Pressed(Object : access Gtk_Button_Record'Class) is begin Xml_Event_Table_File_Name := To_Unbounded_String (Get_Filename (File_Selector_widget)); begin Write_To_Xml_File (Framework.Sched, Sys, Xml_Event_Table_File_Name); exception when Ada.IO_Exceptions.Name_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Name_Error")); when Ada.IO_Exceptions.Status_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Status_Error")); when Ada.IO_Exceptions.Mode_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Mode_Error")); when Ada.IO_Exceptions.Use_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Use_Error")); when Ada.IO_Exceptions.Device_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Device_Error")); when Ada.IO_Exceptions.End_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", End_Error")); when Ada.IO_Exceptions.Data_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Data_Error")); when Ada.IO_Exceptions.Layout_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Layout_Error")); when others => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & " ; Exception name : " & Exception_Name & " ; " & "Exception message : " & Exception_Message); end; Destroy (File_Selector_widget); end on_export_event_table_Ok_Pressed; procedure Initialize_export_event_table (File_Selector : access File_Selector_Record'Class) is begin initialize(file_selector, Lb_export_event_table (Current_Language) ); File_Selector.Ok_Button := Get_Ok_Button (File_Selector); Set_Flags (File_Selector.Ok_Button, Can_Default); Button_Callback.Connect (File_Selector.Ok_Button, "clicked", Button_Callback.To_Marshaller (on_export_event_table_Ok_Pressed'Access)); end Initialize_export_event_table; ------------------------------------------------------ -- Export XML ARINS 653 TSP ------------------------------------------------------ procedure on_export_arinc653_tsp_Ok_Pressed (Object : access Gtk_Button_Record'Class) is file_name : unbounded_string; Input : File_Input; Reader : Tree_Reader; d : Document; Into : File_Type; -- The ARINC module to produce from the Cheddar ADL model -- a_module : ARINC_653_Module_Ptr; begin begin File_Name := To_Unbounded_String (Get_Filename (File_Selector_widget)); -- Compute PST -- a_module := Build_ARINC653_Module (framework.Sched, Sys, framework.Scheduling_Base_Period); -- Open file and Write XML Header -- Create (Into, Mode => Out_File, Name => To_String (File_Name)); Put_Line (Into, " "); New_Line (Into, 2); Put (Into, To_String (Xml_string (A_module))); Close (Into); Open (to_string(file_name), Input); Parse (Reader, Input); d:=Get_Tree(Reader); Close (Input); Create (Into, Mode => Out_File, Name => To_String (File_Name)); Write (Stream => Stream (into), N => d, Print_Comments => false, Print_XML_Declaration => true, With_URI => false, EOL_Sequence => "" & ASCII.LF, Pretty_Print => true, Encoding => Unicode.Encodings.Get_By_Name ("utf-8"), Collapse_Empty_Nodes => false); Free (Reader); Close (into); exception when Ada.IO_Exceptions.Name_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Name_Error")); when Ada.IO_Exceptions.Status_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Status_Error")); when Ada.IO_Exceptions.Mode_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Mode_Error")); when Ada.IO_Exceptions.Use_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Use_Error")); when Ada.IO_Exceptions.Device_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Device_Error")); when Ada.IO_Exceptions.End_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", End_Error")); when Ada.IO_Exceptions.Data_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Data_Error")); when Ada.IO_Exceptions.Layout_Error => Show_Message_Box (Lb_Can_Not_Save_File (Current_Language) & To_Unbounded_String (", Layout_Error")); when others => Show_Message_Box (Lb_Can_Not_Open_File (Current_Language) & " ; Exception name : " & Exception_Name & " ; " & "Exception message : " & Exception_Message); end; Destroy (File_Selector_widget); end on_export_arinc653_tsp_Ok_Pressed; procedure Initialize_export_arinc653_tsp (File_Selector : access File_Selector_Record'Class) is begin initialize(file_selector, Lb_export_arinc653_tsp (Current_Language) ); File_Selector.Ok_Button := Get_Ok_Button (File_Selector); Set_Flags (File_Selector.Ok_Button, Can_Default); Button_Callback.Connect (File_Selector.Ok_Button, "clicked", Button_Callback.To_Marshaller (on_export_arinc653_tsp_Ok_Pressed'Access)); end Initialize_export_arinc653_tsp; end graphical_editor.file_selector;