close all;
graphics_toolkit qt

hl = line ();

lsn = @() disp ("line listener");

function lsn2 (h, evt, hl)
  disp ("begin axes listener");
  set (hl, "linewidth", get (h, "linewidth"));
  disp ("end axes listener");
endfunction

addlistener (gca, "linewidth", {@lsn2, hl});
addlistener (hl, "linewidth", lsn);

disp ("Interruptible : ON");
set (gca, "linewidth", 2);
drawnow ();

disp ("\nInterruptible : OFF, BusyAction : QUEUE");
set (gca, "interruptible", "off");
set (gca, "linewidth", 3);
drawnow ();

disp ("\nInterruptible : OFF, BusyAction : CANCEL");
set (gca, "busyaction", "cancel");
set (gca, "linewidth", 4);
drawnow ();

