/src/wrappers/gtk/library/close_signal_receiver.e
Specman e | 49 lines | 37 code | 10 blank | 2 comment | 2 complexity | 8c547f2f672bca2d29d768935b52fed4 MD5 | raw file
1indexing 2 description: "Receiver of the close 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 CLOSE_SIGNAL_RECEIVER 23 24inherit GTK_WIDGET 25 26feature -- The "close" signal 27 close_signal_name: STRING is "close" 28 29 enable_on_close is 30 -- Connects "close" signal to `on_close' feature. 31 do 32 connect (Current, close_signal_name, $on_close) 33 end 34 35 on_close is 36 -- Built-in close signal handler; empty by design; redefine it. 37 do 38 end 39 40 connect_agent_to_activate_signal (a_procedure: PROCEDURE [ANY, TUPLE[CLOSE_SIGNAL_RECEIVER]]) is 41 require 42 valid_procedure: a_procedure /= Void 43 local close_callback: CLOSE_CALLBACK 44 do 45 create close_callback.make 46 close_callback.connect (Current, a_procedure) 47 end 48 49end -- class CLOSE_SIGNAL_RECEIVER