1 with Gdk
.Event
; use Gdk
.Event
;
2 with Gtk
.Widget
; use Gtk
.Widget
;
4 with Gtk
.Window
; use Gtk
.Window
;
5 with Gtk
.Box
; use Gtk
.Box
;
6 with Gtk
.Frame
; use Gtk
.Frame
;
7 with Gtk
.Scrolled_Window
; use Gtk
.Scrolled_Window
;
8 with Gtk
.Tree_Model
; use Gtk
.Tree_Model
;
9 with Gtk
.List_Store
; use Gtk
.List_Store
;
10 with Gtk
.Tree_Sortable
; use Gtk
.Tree_Sortable
;
11 with Gtk
.Tree_Model_Sort
; use Gtk
.Tree_Model_Sort
;
12 with Gtk
.Tree_View
; use Gtk
.Tree_View
;
13 with Gtk
.Tree_View_Column
; use Gtk
.Tree_View_Column
;
14 with Gtk
.Cell_Renderer
; use Gtk
.Cell_Renderer
;
15 with Gtk
.Cell_Renderer_Text
; use Gtk
.Cell_Renderer_Text
;
16 with Gtk
.Label
; use Gtk
.Label
;
17 with Gtk
.Alignment
; use Gtk
.Alignment
;
18 with Gtk
.Button
; use Gtk
.Button
;
20 with Simulator
.Gui
; use Simulator
.Gui
;
22 package Simulator
.Monitor
.Gui
is
23 type ChangePosition_T
is array (CarId_T
) of Integer;
24 ChangePosition
: ChangePosition_T
;
25 type Monitor_Record
is new Gtk_Window_Record
with record
26 -- varabili logica monitor
27 LastLap
: Natural := 0;
28 LastInt
: Natural := 0;
29 LastTime
: Duration := 0.0;
30 Observing
: Boolean := False;
31 BestLap_Id
: CarId_T
:= 1;
32 BestLap_Lap
: Natural := 0;
33 BestLap
: Duration := Duration'Last;
34 MaxSpeed_Id
: CarId_T
:= 1;
35 MaxSpeed
: Float := 0.0;
46 Scrolledwindow1
: Gtk_Scrolled_Window
;
47 Scrolledwindow2
: Gtk_Scrolled_Window
;
48 Model1
: Gtk_List_Store
;
49 Model1_Sort
: Gtk_Tree_Model_Sort
;
50 Model2
: Gtk_List_Store
;
51 Treeview1
: Gtk_Tree_View
;
52 Treeview2
: Gtk_Tree_View
;
53 Col
: Gtk_Tree_View_Column
;
54 Text_R
: Gtk_Cell_Renderer_Text
;
58 Alignment1
: Gtk_Alignment
;
59 Alignment2
: Gtk_Alignment
;
60 Alignment3
: Gtk_Alignment
;
63 BestLap_Info
: Gtk_Label
;
64 MaxSpeed_Info
: Gtk_Label
;
67 type Monitor_Access
is access all Monitor_Record
'Class;
71 procedure Gtk_New
(Monitor
: out Monitor_Access
);
72 procedure Initialize
(Monitor
: access Monitor_Record
'Class);
73 procedure Update_Model
(Pos
: Positive;
77 Intermediate
: Natural;
80 TimeElapsed
: Duration);
81 procedure UpdateLapTime
( Id
: CarId_T
; LastLap
: Duration; BestLap
: Duration) ;
82 procedure UpdateCarStatus
( Id
: CarId_T
; Status
: CarStatus_T
);
83 procedure Update_BestLap
(Id
: CarId_T
; Lap
: Positive; Time
: Duration);
84 procedure Update_MaxSpeed
(Id
: CarId_T
; Val
: Float);
85 procedure ToggleLock
(Widget
: access Gtk_Widget_Record
'Class);
87 end Simulator
.Monitor
.Gui
;