PageRenderTime 25ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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