------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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-2020, 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 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$ -- $Date$ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Gdk; with Gdk.Event; use Gdk.Event; with Gtk; use Gtk; with graphical_editor.double_buffer; use graphical_editor.double_buffer; with Gtk.Widget; use Gtk.Widget; with Gdk.Color; use Gdk.Color; with Gdk.Font; use Gdk.Font; with Glib; use Glib; with Gdk.GC; use Gdk.GC; with buffers; use buffers; with scheduling_analysis; use scheduling_analysis; with time_unit_events; use time_unit_events; use time_unit_events.time_unit_package; use time_unit_events.time_unit_lists_package; with Gtkada.Builder; use Gtkada.Builder; package graphical_editor.draw_buffer is type draw_buffer_record is new gtk_double_buffer_record with record font : gdk_font; buff : buffer_size_table_ptr; last_time_unit : Natural; time_unit_number : time_unit_range; max_buff : Natural; white_gc : Gdk.GC.gdk_gc; black_gc : Gdk.GC.gdk_gc; red_color : gdk_color; left_margin : gint := 60; high_margin : gint := 20; buffer_margin : gint := 20; timeunit_margin : gint := 20; current_width : gint; current_height : gint; have_colors : Boolean := False; initialized : Boolean := False; buff_ptr : buffer_ptr; end record; type draw_buffer_access is access all draw_buffer_record'class; procedure gtk_new (draw_buffer : out draw_buffer_access; object : access gtkada_builder_record'class); procedure initialize (draw_buffer : access draw_buffer_record'class; object : access gtkada_builder_record'class); procedure redraw (draw_buffer : access draw_buffer_record'class); procedure redraw_mod (object : access gtkada_builder_record'class; draw_buffer : access draw_buffer_record'class); procedure draw_mod (object : access gtkada_builder_record'class; draw_buffer : access draw_buffer_record'class; buff : buffer_ptr; buff1 : buffer_size_table; last_time_unit1 : Natural; time_unit_number1 : time_unit_range); procedure draw (draw_buffer : access draw_buffer_record'class; buff : buffer_ptr; buff1 : buffer_size_table; last_time_unit1 : Natural; time_unit_number1 : time_unit_range); procedure clear (draw_buffer : access draw_buffer_record'class); function configure (draw_buffer : access draw_buffer_record'class; event : Gdk.Event.gdk_event) return Boolean; procedure color_allocation (draw_buffer : access draw_buffer_record'class); procedure size_allocate (draw_buffer : access draw_buffer_record'class; allocation : gtk_allocation_access); draw_buffer : draw_buffer_access := new draw_buffer_record; pragma inline (redraw); pragma inline (color_allocation); pragma inline (clear); end graphical_editor.draw_buffer;