------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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: 3657 $ -- $Date: 2020-12-13 13:25:49 +0100 (dim., 13 déc. 2020) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Gtk.Widget; use Gtk.Widget; with Gtk.Drawing_Area; use Gtk.Drawing_Area; with Glib.Object; use Glib.Object; with Gdk.Event; use Gdk.Event; with Glib; use Glib; with Cairo; use Cairo; with multiprocessor_services_interface; use multiprocessor_services_interface; use multiprocessor_services_interface.scheduling_result_per_processor_package; package graphical_editor.draw_scheduling is ----------------- -- Constants that give in pixel the layout -- of any graphical elements of the -- scheduling in the drawing area -- left_margin : constant gdouble := 20.0; right_margin : constant gdouble := 500.0; high_margin : constant gdouble := 30.0; interligne : constant gdouble := 50.0; timeunit_margin : constant gdouble := 20.0; -- Initialize the drawing area widget -- procedure initialize; -- Draw GANTTs -- Draw all events of the scheduling table -- procedure draw_scheduling_events ( period1 : in Natural; start_draw1 : in Natural); -- Clear drawing area -- procedure clear_time_line; -------------------------- -- Callbacks to redraw when events are received -------------------------- -- Send an event to redraw the time line after update -- procedure Send_Draw_Event (Self : access Gtk_Widget_Record'Class); -- Callback to redraw when an Draw event is received -- function draw_cb (Self : access Gtk_Widget_Record'Class; Cr : Cairo_Context) return Boolean; function configure_event_cb (Self : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Configure) return Boolean; --------------------------------------------------- -- Drawing subprograms -- Subprogramms are not intented to be called -- outside the widget constructor --------------------------------------------------- private -- Draw axis for each CheddarADL entities -- procedure draw_axis (line_number : in gint); -- Compute the size of the widget according to -- elements to display -- procedure compute_drawingarea_size; -- Draw all horizontal time lines -- procedure draw_entity_lines; -- Display any elements on the horizontal and vertical views -- procedure draw_horizontal_data; procedure draw_vertical_data; -- Internal attributes to drive drawings -- period : Natural; zoomed_period : Natural; start_draw : Natural; Cr : Cairo_Context; surface : Cairo_Surface; current_width : gint; current_height : gint; end graphical_editor.draw_scheduling;