Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:
note description: "[ Editable text with cursor and selection. Changes in text are stored in an UNDO_REDO_STACK and are undo- and redoable. ]" legal: "See notice at end of class." status: "See notice at end of class." author: "Etienne Amodeo" date: "$Date: 2023-03-29 03:03:09 -0800 (Wed, 29 Mar 2023) $" revision: "$Revision: 106725 $" class interface EDITABLE_TEXT create make -- create an empty text require -- from B_345_TREE True require -- from TEXT_OBSERVER_MANAGER True feature -- Initialization make -- create an empty text require -- from B_345_TREE True require -- from TEXT_OBSERVER_MANAGER True feature -- Access attached_cursor: like cursor -- Attached `cursor`. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT not_is_empty: not is_empty and then has_cursor attached_selection_cursor: like cursor -- Attached `selection_cursor`. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT not_is_empty: not is_empty number_of_lines: INTEGER_32 -- (from B_345_TREE) current_char: CHARACTER_32 -- Current character at cursor position -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty current_class: DOCUMENT_CLASS -- Current document class -- (from DOCUMENT_TYPE_MANAGER) require -- from DOCUMENT_TYPE_MANAGER current_class_set: current_class_set current_line: like line -- current line -- (from TEXT) current_line_number: INTEGER_32 -- Current line number. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty cursor: EDITOR_CURSOR -- Current cursor. Default_document_class: DOCUMENT_CLASS -- Default text class -- (from DOCUMENT_TYPE_MANAGER) ev_application: EV_APPLICATION -- Current application if created yet. -- (from EV_SHARED_APPLICATION) require -- from EV_SHARED_APPLICATION application_exists: attached Shared_environment.application same_processor_as_application: Shared_environment.is_application_processor ev_separate_application: separate EV_APPLICATION -- Current application if created yet. -- (from EV_SHARED_APPLICATION) require -- from EV_SHARED_APPLICATION application_exists: attached Shared_environment.application first_line: EDITOR_LINE -- (from TEXT) first_read_block_size: INTEGER_32 -- size in lines of the first block of text that -- will be read. -- (from TEXT) generating_type: TYPE [EDITABLE_TEXT] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty history: UNDO_REDO_STACK -- Set of undo and redoable commands on text line (i: INTEGER_32): like first_line -- (from B_345_TREE) require -- from B_345_TREE i_is_valid: i >= 1 and i <= number_of_lines last_line: like first_line -- (from B_345_TREE) selected_wide_string: STRING_32 -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty selection_cursor: like cursor -- Position where the user has started to select -- the text. This position can be below the current -- cursor (and therefore represent the end of the -- selection) -- (from SELECTABLE_TEXT) selection_end: like cursor -- End of the selection (always > than -- `selection_start`). -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty ensure -- from SELECTABLE_TEXT result_cursor_position_greater: Result >= selection_start selection_start: like cursor -- Beginning of the selection (always < than -- `selection_end`). -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty ensure -- from SELECTABLE_TEXT result_cursor_position_lesser: Result <= selection_end Shared_environment: EV_ENVIRONMENT -- Shared EV_ENVIRONMENT object. -- (from EV_SHARED_APPLICATION) tabulation_size: INTEGER_32 -- Tabulation size in characters. -- (from TEXT) tabulation_symbol: STRING_8 -- String representing a tab. -- Is '%T' or as many blank spaces as defined in -- the preferences text_loaded: STRING_8 -- Text in UTF-8 loaded by `load_string` -- (from TEXT) wide_text: STRING_32 -- Image of text in Current. -- In UTF-32. -- (from TEXT) require -- from TEXT text_loaded: reading_text_finished feature -- Comparison frozen deep_equal (a: ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: EDITABLE_TEXT): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: EDITABLE_TEXT): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "" (other: EDITABLE_TEXT): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void has_cursor: BOOLEAN -- is `cursor` set? -- (from SELECTABLE_TEXT) has_selection: BOOLEAN -- Is there a selection? -- (from SELECTABLE_TEXT) is_empty: BOOLEAN -- Is there no text loaded in the editor ? -- (from TEXT) is_modified: BOOLEAN -- Has the text been modified since it was opened? -- (from TEXT_OBSERVER_MANAGER) is_notifying: BOOLEAN -- Is the manager in the process of notifying its observers -- of a change ? -- (from TEXT_OBSERVER_MANAGER) is_removing_block: BOOLEAN -- (from TEXT_OBSERVER_MANAGER) is_windows_eol_style: BOOLEAN -- Is the text windows eol style? -- (from TEXT) reading_text_finished: BOOLEAN -- Is text completely read? -- (from TEXT) same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) selection_is_empty: BOOLEAN -- Is the selection empty ? -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty text_being_processed: BOOLEAN -- is the text currently processed? -- (from TEXT) feature -- Status setting disable_selection -- Set that text cannot be selected in the editor -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty ensure -- from SELECTABLE_TEXT no_selection: not has_selection enable_selection -- Set that text can be selected in the editor -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty internal_has_selection: BOOLEAN -- here for debugging -- (from SELECTABLE_TEXT) set_changed (value: BOOLEAN; directly_edited: BOOLEAN) -- Assign value to changed feature -- Removal wipe_out -- Erase data. -- (from B_345_TREE) feature -- Duplication copy (other: EDITABLE_TEXT) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: EDITABLE_TEXT) -- Effect equivalent to that of: -- `copy` (other . `deep_twin`) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: EDITABLE_TEXT -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: EDITABLE_TEXT) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: EDITABLE_TEXT -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: EDITABLE_TEXT -- New object equal to Current -- `twin` calls `copy`; to change copying/twinning semantics, redefine `copy`. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen default: EDITABLE_TEXT -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.`default` for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Basic Operations back_delete_char -- Delete character before cursor position. -- Delete selection, if any. require not_empty: not is_empty comment_selection -- Comment all lines included in the selection with the string --. require not_empty: not is_empty copy_selection_to_pos (i: INTEGER_32) require not_empty: not is_empty selection_exists: has_selection delete_char -- Delete character at cursor position. -- Delete selection, if any. require text_not_empty: not is_empty delete_selection -- delete selected text. delete_word (back: BOOLEAN) -- Delete word before cursor position if back, -- or else at cursor position. -- Delete selection, if any. indent_selection -- Tabify all lines included in the selection. require not_empty: not is_empty insert_char (c: CHARACTER_32) -- Insert c at the cursor position. -- Delete selection if any. require text_not_empty: not is_empty insert_eol -- Insert new line at cursor position. -- Delete selection, if any. require text_not_empty: not is_empty insert_string (txt: READABLE_STRING_GENERAL) -- Insert txt at cursor position. -- Delete selection, if any. require text_not_empty: not is_empty insert_string_as_selectable (txt: READABLE_STRING_GENERAL) -- Insert txt at cursor position as a selectable token require text_not_empty: not is_empty move_selection_to_pos (i: INTEGER_32) require not_empty: not is_empty selection_exists: has_selection paste_with_indentation (a_text: READABLE_STRING_GENERAL) -- Paste clipboard at cursor position with proper indentation -- according to the context text and the content of the clipboard. -- -- Behavior: -- If there are tabs before editor cursor and leading tabs in the pasting text: -- Adjust the number of leading tabs for each line in the pasting text -- by the result of the number of existing tabs before the editor cursor -- substracting the number of leading tabs in the pasting text. -- -- Example: -- text in clipboard: "%T%Tfoo%N%T%T%Tgoo" -- Line of the cursor before pasting: "%T%T%T|" -- Note: | is the cursor -- Pasting result: "%T%T%Tfoo%N%T%T%T%Tgoo|" note eis: "name=Paste with Indentation", "src=$(ISE_WIKI)/Paste_with_Indentation" require text_not_empty: not is_empty redo -- redo last command remove_trailing_blanks -- Remove trailing blanks, this will be recorded in history stack, but invisible to user. -- Blanks before the cursor are not removed. require not_empty: not is_empty remove_trailing_fake_blanks -- Remove trailing fake (inserted automatically) blanks, -- this will be recorded in history stack, but invisible to user. require not_empty: not is_empty replace_char (c: CHARACTER_32) -- Replace character at cursor position by c. -- Delete selection, if any. require text_not_empty: not is_empty replace_char_including_new_line (c: CHARACTER_32) -- Replace character at cursor position by c, -- including new line. require text_not_empty: not is_empty replace_selection (a_word: READABLE_STRING_GENERAL) -- replace the selected text with a_word require selection_present: has_selection selection_not_empty: selection_cursor /= cursor set_selection_case (lower: BOOLEAN) -- Change selected text to lower case if lower, -- else to upper case. toggle_comment_selection -- Comment or uncomment all lines included in the selection with the string --. require not_empty: not is_empty uncomment_selection -- Uncomment all lines included in the selection with the string --. require not_empty: not is_empty undo -- undo last command unindent_selection -- Tabify all lines included in the selection. require not_empty: not is_empty feature -- Content Change load_string (a_string: STRING_8) -- Scan a_string and fill the object with resulting -- lines and tokens -- a_string must be in UTF8. -- (from TEXT) require -- from TEXT string_not_void: a_string /= Void text_has_been_reinitialized: is_empty ensure -- from TEXT read_enough_lines: number_of_lines >= first_read_block_size or else reading_text_finished feature -- Cursor creation new_cursor_from_character_pos (ch_num, y: INTEGER_32): like cursor -- Correct way to create a cursor for Current text since `cursor` -- could be covariantly redefined. require ch_num_valid: ch_num >= 1 y_valid: y >= 1 ensure new_cursor_attached: Result /= Void feature -- Element Change append_line (tl: like first_line) -- add tl at the end of the tree. -- (from B_345_TREE) require -- from B_345_TREE tl_not_linked: tl.next = Void and then tl.previous = Void ensure -- from B_345_TREE tl_linked: tl /= first_line implies (attached tl.previous as l_previous and then l_previous.next = tl) tl_has_key: tl.key /= Void tl_has_tree: tl.tree /= Void forth -- move `current_line` to the next line -- (from TEXT) require -- from TEXT not_after: not after go_i_th (i: INTEGER_32) -- set the i-th line as `current_line` -- (from TEXT) require -- from TEXT valid_i: i >= 1 and then i <= number_of_lines ensure -- from TEXT not_after: not after prepend_line (tl: like first_line) -- add tl at the beginning of the tree. -- (from B_345_TREE) require -- from B_345_TREE tl_not_linked: tl.next = Void and then tl.previous = Void ensure -- from B_345_TREE tl_linked: tl /= last_line implies (attached tl.next as l_next and then l_next.previous = tl) tl_has_key: tl.key /= Void tl_has_tree: tl.tree /= Void register_document (a_type_name: STRING_8; a_class: DOCUMENT_CLASS) -- Register new document type -- (from DOCUMENT_TYPE_MANAGER) set_first_data (tl: like first_line) -- (from B_345_TREE) set_last_data (tl: like first_line) -- (from B_345_TREE) start -- set the first line as `current_line` -- (from TEXT) require -- from TEXT number_of_lines >= 1 update_line (a_line: INTEGER_32) -- Update line tokens -- (from TEXT) require -- from TEXT line_index_valid: a_line > 0 and a_line <= number_of_lines feature -- Memory management recycle -- Recycle Current, but leave Current in an unstable state, -- so that we know whether we're still referenced or not. -- Not necessary to dereference the container, as they are wiped out. -- (from TEXT) feature -- Operations add_cursor_observer (a_text_observer: TEXT_OBSERVER) -- Add an observer an_text_observer to the "cursor observers" list. -- (from TEXT_OBSERVER_MANAGER) require -- from TEXT_OBSERVER_MANAGER not_in_loop: not is_notifying add_edition_observer (a_text_observer: TEXT_OBSERVER) -- Add an observer an_text_observer to the "edition observers" list. -- (from TEXT_OBSERVER_MANAGER) require -- from TEXT_OBSERVER_MANAGER not_in_loop: not is_notifying add_lines_observer (a_text_observer: TEXT_OBSERVER) -- Add an observer an_text_observer to the "lines observers" list. -- (from TEXT_OBSERVER_MANAGER) require -- from TEXT_OBSERVER_MANAGER not_in_loop: not is_notifying add_selection_observer (a_text_observer: TEXT_OBSERVER) -- Add an observer an_text_observer to the "selection observers" list. -- (from TEXT_OBSERVER_MANAGER) require -- from TEXT_OBSERVER_MANAGER not_in_loop: not is_notifying execute_post_notify_actions -- Execute actions in post_notify_acions -- (from TEXT_OBSERVER_MANAGER) post_notify_actions: ARRAYED_LIST [ROUTINE] -- Actions to call after other notifications -- (from TEXT_OBSERVER_MANAGER) remove_observer (a_text_observer: TEXT_OBSERVER) -- Remove the observer 'an_text_observer' from the list. -- (from TEXT_OBSERVER_MANAGER) require -- from TEXT_OBSERVER_MANAGER not_in_loop: not is_notifying feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void feature -- Query after: BOOLEAN -- Is the `current_line` beyond the end of the text ? -- (from TEXT) current_class_set: BOOLEAN -- Is `current_class` set? -- (from DOCUMENT_TYPE_MANAGER) first_non_blank_token (a_line: like line): EDITOR_TOKEN -- First non blank token in a_line. -- (from TEXT) require -- from TEXT a_line_not_void: a_line /= Void get_class_from_type (a_type: READABLE_STRING_GENERAL): DOCUMENT_CLASS -- Get the document class from the type -- (from DOCUMENT_TYPE_MANAGER) require -- from DOCUMENT_TYPE_MANAGER known_type: known_document_type (a_type) ensure -- from DOCUMENT_TYPE_MANAGER has_result: Result /= Void initialized: BOOLEAN -- Have preferences been set and ready to be used? -- (from SHARED_EDITOR_DATA) known_document_type (a_type: READABLE_STRING_GENERAL): BOOLEAN -- Is a_type a known document type? -- (from DOCUMENT_TYPE_MANAGER) line_pos_in_chars (a_line: like line): INTEGER_32 -- Position in chars of start of a_line. -- (from TEXT) require -- from TEXT line_not_void: a_line /= Void ensure -- from TEXT line_pos_in_chars_positive: Result > 0 text_length: INTEGER_32 -- Length of displayed text -- (from TEXT) feature -- Reinitialization on_text_loaded -- reinitialize text after loading. require -- from TEXT_OBSERVER_MANAGER not_in_loop: not is_notifying reset_text -- put Current back in its original state require -- from TEXT True feature -- Resources editor_preferences: EDITOR_DATA -- Editor preferences -- (from SHARED_EDITOR_DATA) Panel_manager: TEXT_PANEL_MANAGER -- List of open panels -- (from SHARED_EDITOR_DATA) feature -- Search found_string_character_position: INTEGER_32 -- Position of the first character within the line of the last string. -- Valid only if `successful_search` is set. -- (from TEXT) found_string_line: INTEGER_32 -- Line number of the last found string. -- Valid only if `successful_search` is set. -- (from TEXT) found_string_total_character_position: INTEGER_32 -- Position of the first character within the complete text. -- Valid only if `successful_search` is set. -- (from TEXT) search_string (searched_string: READABLE_STRING_GENERAL) -- Search the text for the string searched_string. -- If the search was successful, `successful_search` is -- set to True and `found_string_line` & -- `found_string_character_position` are set. -- searched_string should be in UTF-32 as STRING_32 or compatible STRING_8. -- (from TEXT) require -- from TEXT text_is_not_empty: not is_empty search_string_from_cursor (searched_string: STRING_8) -- Search the text for the string searched_string. -- Begin search from position of cursor. -- If the search was successful, `successful_search` is -- set to True and `found_string_line` & -- `found_string_character_position` are set. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty successful_search: BOOLEAN -- Was the last call to `search_string` successful? -- (from TEXT) feature -- Selection Changes forget_selection -- Unselect all. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty ensure -- from SELECTABLE_TEXT no_selection: not has_selection select_all -- Select the entire text. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty ensure -- from SELECTABLE_TEXT selection: has_selection cursor_positioned: attached last_line as l_last_line and then attached_cursor.line = l_last_line and then attached_cursor.token = l_last_line.eol_token selection_cursor_positioned: attached first_line as l_first_line and then attached_selection_cursor.line = l_first_line and then attached_selection_cursor.token = l_first_line.first_token select_region (start_pos, end_pos: INTEGER_32) -- Select characters between indexes start_pos and end_pos. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty text_loading_completed: reading_text_finished right_order: start_pos <= end_pos set_selection_cursor (c: like cursor) -- Set the selection to be from c to `cursor`. -- Allows empty selections. Be careful about this. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT text_is_not_empty: not is_empty cursor_not_void: c /= Void ensure -- from SELECTABLE_TEXT selection_cursor_set: attached selection_cursor as l_c and then l_c.is_equal (c) feature -- Status Report is_commented_selection: BOOLEAN -- Is selection fully commented using "--" ? require not_empty: not is_empty redo_is_possible: BOOLEAN -- is there anything in the redo stack ? undo_is_possible: BOOLEAN -- is there anything in the undo stack ? use_smart_indentation: BOOLEAN -- Is smart_indentation enabled? feature -- Status Setting highlight_line (a_line: INTEGER_32) -- Highlight line.  Do not move cursor to this line. -- (from TEXT) require -- from TEXT valid_i: a_line >= 1 and then a_line <= number_of_lines set_current_document_class (doc_class: like current_class) -- Update the current document class to reflect type of text loaded in text panel -- (from DOCUMENT_TYPE_MANAGER) set_first_read_block_size (a_size: INTEGER_32) -- set the size in lines of the first block of text -- that will be read. -- (from TEXT) require -- from TEXT valid_size: a_size >= 0 set_is_windows_eol_style (a_windows_style: BOOLEAN) -- Set is_unix_style with a_style. -- (from TEXT) ensure -- from TEXT is_windows_eol_style_set: is_windows_eol_style = a_windows_style set_tabulation_size (a_size: INTEGER_32) -- Set thet tabulation size.  Overrides preferences default value. -- (from TEXT) require -- from TEXT a_size_big_enough: a_size > 0 unhighlight_line (a_line: INTEGER_32) -- Highlight line.  Do not move cursor to this line. -- (from TEXT) require -- from TEXT valid_i: a_line >= 1 and then a_line <= number_of_lines feature -- String string_between_cursor (a_start_cursor, a_end_cursor: like cursor): STRING_32 -- String between cursors a_start_cursor and a_end_cursor. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT attached_cursors: a_start_cursor /= Void and then a_end_cursor /= Void right_order: a_start_cursor <= a_end_cursor string_between_pos_in_text (a_start_pos, a_end_pos: INTEGER_32): STRING_32 -- String between pos_in_text a_start_pos and a_end_pos. -- (from SELECTABLE_TEXT) require -- from SELECTABLE_TEXT pos_valid: a_start_pos > 0 and a_end_pos > 0 right_order: a_start_pos <= a_end_pos feature -- for search only replace_for_replace_all (start_pos, end_pos: INTEGER_32; a_word: READABLE_STRING_GENERAL) -- replace the selected text with a_word require not_empty: not is_empty right_order: start_pos < end_pos word_is_not_void: a_word /= Void invariant history_attached: attached history tabulation_symbol_valid: tabulation_symbol.count > 0 -- from SELECTABLE_TEXT valid_selection: has_selection implies selection_cursor /= Void -- from TEXT current_line_valid: attached current_line as l_line implies l_line.is_valid positive_current_pos: current_pos > 0 -- from B_345_TREE first_data_valid: attached first_line as l_first_data implies l_first_data.is_valid last_data_valid: attached last_line as l_last_data implies l_last_data.is_valid -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note copyright: "Copyright (c) 1984-2023, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., 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 EDITABLE_TEXT
Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:

-- Generated by Eiffel Studio --
For more details: eiffel.org