/src/wrappers/gtk/library/cancel_signal_receiver.e

http://github.com/tybor/Liberty · Specman e · 50 lines · 31 code · 9 blank · 10 comment · 2 complexity · 5de7b90be57070a72d3c2248ee0fa486 MD5 · raw file

  1. indexing
  2. description: "Receiver of the cancel signal."
  3. copyright: "[
  4. Copyright (C) 2006 Paolo Redaelli
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hopeOA that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. deferred class CANCEL_SIGNAL_RECEIVER
  19. inherit GTK_WIDGET
  20. feature -- The "cancel" signal
  21. cancel_signal_name: STRING is "cancel"
  22. connect_agent_to_activate_signal (a_procedure: PROCEDURE [ANY, TUPLE[CANCEL_SIGNAL_RECEIVER]]) is
  23. -- The "::cancel" signal is emitted when the cancel button is
  24. -- clicked. The default behavior of the GtkAssistant is to
  25. -- switch to the page after the current page, unless the
  26. -- current page is the last one.
  27. -- A handler for the "::cancel" signal should carry out the
  28. -- actions for which the wizard has collected data. If the
  29. -- action takes a long time to complete, you might consider
  30. -- to put a page of type GTK_ASSISTANT_PAGE_PROGRESS after
  31. -- the confirmation page and handle this operation within the
  32. -- ::prepare signal of the progress page.
  33. require
  34. valid_procedure: a_procedure /= Void
  35. local
  36. cancel_callback: CANCEL_CALLBACK
  37. do
  38. create cancel_callback.make
  39. cancel_callback.connect (Current, a_procedure)
  40. end
  41. end -- class CANCEL_SIGNAL_RECEIVER