indexing description: "[ Item for use in EV_MENU. ]" note: "[ Single ampersands in text are not shown in the actual widget. If you need an ampersand in your text, use && instead. The character following the & may be a shortcut to this widget (combined with Alt) &File -> File (Alt+F = shortcut) Fish && Chips -> Fish & Chips (no shortcut). ]" status: "See notice at end of class" keywords: "menu, item, dropdown, popup" date: "$Date$" revision: "$Revision$" class EV_MENU_ITEM inherit EV_ITEM redefine implementation, create_implementation, is_in_default_state end EV_TEXTABLE undefine initialize redefine implementation, is_in_default_state end EV_SENSITIVE undefine initialize redefine implementation, is_in_default_state end EV_MENU_ITEM_ACTION_SEQUENCES redefine implementation end create default_create, make_with_text, make_with_text_and_action feature {NONE} -- Initialization make_with_text_and_action (a_text: STRING; an_action: PROCEDURE [ANY, TUPLE]) is -- Create with 'a_text' and `an_action' in `select_actions'. require text_not_void: a_text /= Void an_action_not_void: an_action /= Void do default_create set_text (a_text) select_actions.extend (an_action) ensure text_assigned: text.is_equal (a_text) select_actions_has_an_action: select_actions.has (an_action) end feature -- Obsolete align_text_left is -- Display text left aligned obsolete "Was not implemented on all platforms." require not_destroyed: not is_destroyed do end align_text_center is -- Display text center aligned obsolete "Was not implemented on all platforms." require not_destroyed: not is_destroyed do end align_text_right is -- Display text right aligned obsolete "Was not implemented on all platforms." require not_destroyed: not is_destroyed do end feature {NONE} -- Contract support is_in_default_state: BOOLEAN is -- Is `Current' in its default state? do Result := Precursor {EV_ITEM} and Precursor {EV_TEXTABLE} and Precursor {EV_SENSITIVE} end feature {EV_ANY_I} -- Implementation implementation: EV_MENU_ITEM_I -- Responsible for interaction with native graphics toolkit. feature {NONE} -- Implementation create_implementation is -- See `{EV_ANY}.create_implementation'. do create {EV_MENU_ITEM_IMP} implementation.make (Current) end end -- class EV_MENU_ITEM --|---------------------------------------------------------------- --| EiffelVision2: library of reusable components for ISE Eiffel. --| Copyright (C) 1985-2004 Eiffel Software. All rights reserved. --| Duplication and distribution prohibited. May be used only with --| ISE Eiffel, under terms of user license. --| Contact Eiffel Software for any other use. --| --| Interactive Software Engineering Inc. --| dba Eiffel Software --| 356 Storke Road, Goleta, CA 93117 USA --| Telephone 805-685-1006, Fax 805-685-6869 --| Contact us at: http://www.eiffel.com/general/email.html --| Customer support: http://support.eiffel.com --| For latest info on our award winning products, visit: --| http://www.eiffel.com --|----------------------------------------------------------------