From 8f53167c7add2c47400d0b9604ff59c5bb6f2ac0 Mon Sep 17 00:00:00 2001 From: mariot Date: Tue, 27 Apr 2004 09:31:39 +0000 Subject: - msg 'IvyControlPanel KillAll' --- src/IvyIO.pm | 10 ++++++++++ src/ivycontrolpanel | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/IvyIO.pm b/src/IvyIO.pm index 8283a02..c933ffc 100644 --- a/src/IvyIO.pm +++ b/src/IvyIO.pm @@ -110,5 +110,15 @@ sub bind_for_clock_and_rate_event { } # end bind_for_clock_event +# execute the callback kill all +sub bind_for_kill_all { + my $cb = shift; + return unless $cb; + return unless $ivy; + $ivy->bindRegexp('IvyControlPanel KillAll', + [sub { shift; &$cb(); }]); + +} # end bind_for_clock_event + 1; diff --git a/src/ivycontrolpanel b/src/ivycontrolpanel index 2dd638f..887d50c 100755 --- a/src/ivycontrolpanel +++ b/src/ivycontrolpanel @@ -354,6 +354,7 @@ $fm1->Button(@buttonattr, )->place(-x => $x, -y => $y); $x -= $fm_w + 10*$coef; +IvyIO::bind_for_kill_all(\&killandquit); #--------------------------------------------------------------------------------- # @@ -797,6 +798,9 @@ ivycontrolpanel displays agents detected on a given ivy bus. For each agent, a l At bottom of window, two areas are dedicated to a specific agent, the air traffic simulator Rejeu. At bottom left, you can adjust the traffic speed. At bottom center, you have a clock; when you click on one of time fields, two scrolling arrows appears which let you adjust time; validation is done by clicking on the last selected field. Near, play/pause buttons let you start or stop the traffic simulator. Then, at bottom right, the cross button will be used to kill all agents and quit. +=head1 LISTENED MESSAGE + +listen to the message 'IvyControlPanel KillAll', to kill all the agent (like quit button). =head1 OPTIONS -- cgit v1.1