indexing description: "Ancestor to all buttons (check, push, etc.)." status: "See notice at end of class." date: "$Date$" revision: "$Revision$" deferred class WEL_BUTTON inherit WEL_CONTROL redefine process_notification end WEL_COLOR_CONTROL WEL_BN_CONSTANTS export {NONE} all end feature {NONE} -- Initialization make (a_parent: WEL_WINDOW; a_name: STRING; a_x, a_y, a_width, a_height, an_id: INTEGER) is -- Make a button. require a_parent_not_void: a_parent /= Void a_parent_exists: a_parent.exists a_name_not_void: a_name /= Void do internal_window_make (a_parent, a_name, default_style, a_x, a_y, a_width, a_height, an_id, default_pointer) id := an_id ensure parent_set: parent = a_parent exists: exists name_set: text.is_equal (a_name) id_set: id = an_id end feature -- Color foreground_color: WEL_COLOR_REF is -- Foreground color has no effect with SCROLL_BAR. -- Cannot be Void. do create Result.make_system (Color_windowtext) end background_color: WEL_COLOR_REF is -- Background color used for the background of the -- control -- Can be redefined by the user do create Result.make_system (color_scrollbar) end feature -- Notifications on_bn_clicked is -- Called when the button is clicked require exists: exists do end feature {NONE} -- Implementation process_notification (notification_code: INTEGER) is do if notification_code = Bn_clicked then on_bn_clicked else default_process_notification (notification_code) end end class_name: STRING is -- Window class name to create once Result := "BUTTON" end end -- class WEL_BUTTON --|---------------------------------------------------------------- --| Windows Eiffel Library: library of reusable components for ISE Eiffel. --| Copyright (C) 1986-2001 Interactive Software Engineering Inc. --| All rights reserved. Duplication and distribution prohibited. --| May be used only with ISE Eiffel, under terms of user license. --| Contact ISE for any other use. --| --| Interactive Software Engineering Inc. --| ISE Building --| 360 Storke Road, Goleta, CA 93117 USA --| Telephone 805-685-1006, Fax 805-685-6869 --| Electronic mail --| Customer support: http://support.eiffel.com> --| For latest info see award-winning pages: http://www.eiffel.com --|----------------------------------------------------------------