------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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-2023, Frank Singhoff, Alain Plantec, Jerome Legrand, -- Hai Nam Tran, Stephane Rubini -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285, 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 README.md -- -- 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: 4013 $ -- $Date: 2021-07-27 00:29:39 +0200 (mar., 27 juil. 2021) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Gtk.Text_Buffer; use Gtk.Text_Buffer; with Gtk.Widget; use Gtk.Widget; with Gtk.Window; use Gtk.Window; with Gtk.Text_Tag_Table; use Gtk.Text_Tag_Table; with Gtk.Handlers; use Gtk.Handlers; with Gtk.Check_Button; use Gtk.Check_Button; with Gtk.Button; use Gtk.Button; with Gtk.Drawing_Area; use Gtk.Drawing_Area; with glib; use glib; with gtkada.builder; use gtkada.builder; with Doubles; use Doubles; with Systems; use Systems; with Framework; use Framework; with Unbounded_strings; use Unbounded_strings; use Unbounded_strings.unbounded_string_list_package; package graphical_editor is --------------------------------------------------- ---- Parameters related to the XML project file --------------------------------------------------- -- Directory where to read glade files -- glade_path : Unbounded_String := install_path & "glade_files/"; -- List of directory where to read AADL or XML files -- project_file_dir_list : unbounded_string_list; -- File name of the working XML/AADL project files -- xml_project_file_name : Unbounded_String; aadl_project_file_name : unbounded_string_list; -- File name of the working XML event table file -- xml_event_table_file_name : Unbounded_String; -- The name of the file in which the event table has to be saved -- event_table_file_name : Unbounded_String; ---------------------------------------------------- ---- Variables required for analysis and editing ---------------------------------------------------- -- The working architecture project -- sys : system; -- This system is used during project editing -- in order to save sys before editing (to allow the user to cancel his modifications) -- sys_buffer : system; -- Is the XML/AADL project modified ? should we have to save it ? -- is_saved : Boolean := True; is_new : Boolean := False; -- Are we calling a customized scheduling simulation or not ? -- customized_simulation : Boolean := False; -- Processor name on which we should compute something -- last_selected_processor : Unbounded_String; ----------------------------------------------- ---- MMI/GTK editor entities ----------------------------------------------- -- Widget of the 2 parts of the main windows: for the GANTT -- and analysis text -- buffer_editor_cheddar : gtk_text_buffer; drawing_area_cheddar : gtk_drawing_area; -- Main Cheddar window -- window_cheddar : gtk_window; -- Main Cheddar glade builder builder_cheddar : gtkada_builder; -- Model file name -- model_file_name_entry : gtk_text_buffer; -- Zoom level selected by the user -- function display_zoom return Unbounded_String; zoom_level_entry : gtk_text_buffer; type zoom_range is new Integer range -4 .. +4; zoom_values : array (zoom_range'range) of gDouble := ( 5.0, 10.0, 25.0, 50.0, -- Initial zoom level 100.0, 200.0, 400.0, 1000.0, 2000.0 ); zoom_level : zoom_range := 0; -- Callbacks for all Cheddar buttons -- package button_callback is new Gtk.Handlers.Callback (gtk_button_record); -- Connect GUI callbacks procedure connect_callbacks; procedure connect_file_callbacks; procedure connect_tool_callbacks; procedure connect_edit_callbacks; procedure connect_help_callbacks; -- Sub programs for the file management -- procedure do_new; procedure do_open; procedure do_save; procedure do_wizard; procedure do_exit; procedure do_aadl_export; procedure do_aadl_import; end graphical_editor;