note description: "Objects that represent an EV_TITLED_WINDOW.% %The original version of this class was generated by EiffelBuild." legal: "See notice at end of class." status: "See notice at end of class." date: "$Date$" revision: "$Revision$" class SEARCH_CONTROL inherit SEARCH_CONTROL_IMP SHARED_OBJECTS undefine copy, is_equal, default_create end create make feature {NONE} -- Initialization make -- do default_create end user_initialization -- called by `initialize'. -- Any custom user initialization that -- could not be performed in `initialize', -- (due to regeneration of implementation class) -- can be added here. do search_button.select_actions.extend (agent search_panel_text) search_text.key_press_actions.extend (agent key_pressed) end feature {NONE} -- Implementation panel: SELECTABLE_TEXT_PANEL -- Panel do Result := shared_document_manager.current_editor end search_panel_text -- local l_pos, l_line: INTEGER l_text: SELECTABLE_TEXT l_panel: like panel do l_panel := panel if l_panel /= Void and not l_panel.text.is_empty and then not search_text.text.is_empty then l_text := l_panel.text_displayed l_text.search_string_from_cursor (search_text.text) if l_text.successful_search then -- Highlight found text l_pos := l_text.found_string_total_character_position l_line := l_text.found_string_line l_panel.set_first_line_displayed (l_line, True) l_panel.select_region (l_pos, l_pos + search_text.text.count) end end end key_pressed (a_key: EV_KEY) -- Key pressed event do if a_key.code = (create {EV_KEY_CONSTANTS}).key_enter then search_panel_text end end note copyright: "Copyright (c) 1984-2006, Eiffel Software" license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" licensing_options: "http://www.eiffel.com/licensing" copying: "[ This file is part of Eiffel Software's Eiffel Development Environment. Eiffel Software's Eiffel Development Environment is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License (available at the URL listed under "license" above). Eiffel Software's Eiffel Development Environment is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Eiffel Software's Eiffel Development Environment; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ]" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class SEARCH_CONTROL