Automatic generation produced by ISE Eiffel
note description: "[ Editable: no Scroll bars: yes Cursor: yes Keyboard: yes Mouse: yes ]" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2016-05-05 23:27:03 -0800 (Thu, 05 May 2016) $" revision: "$Revision: 98672 $" class interface SELECTABLE_TEXT_PANEL create default_create -- Default creation -- (from TEXT_PANEL) require -- from ANY True feature -- Initialization default_create -- Default creation -- (from TEXT_PANEL) require -- from ANY True initialize_buffer_settings -- (from TEXT_PANEL) feature -- Access Console_encoding: ENCODING -- Console encoding. -- (from SYSTEM_ENCODINGS) ensure -- from SYSTEM_ENCODINGS instance_free: class console_encoding_not_void: Result /= Void current_class: DOCUMENT_CLASS -- Current document class -- (from DOCUMENT_TYPE_MANAGER) require -- from DOCUMENT_TYPE_MANAGER current_class_set: current_class_set cursors: EDITOR_CURSORS -- (from TEXT_PANEL) note option: stable date_of_file_when_loaded: INTEGER_32 -- Date of current file when it was loaded. -- (from TEXT_PANEL) Default_document_class: DOCUMENT_CLASS -- Default text class -- (from DOCUMENT_TYPE_MANAGER) display_scrollbars: BOOLEAN assign set_display_scrollbars -- Should scrollbars be display automatically? -- (from TEXT_PANEL) editor_drawing_area: EV_DRAWING_AREA -- (from TEXT_PANEL_IMP) editor_viewport: EV_VIEWPORT -- (from TEXT_PANEL_IMP) encoding: ENCODING -- Returns user encoding if `user_encoding` is set by `set_encoding`. -- Otherwise returns encodinge valuated when text was loaded. -- (from TEXT_PANEL) 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 file_path: PATH -- Name of the currently opened file, if any. -- (from TEXT_PANEL) first_line_displayed: INTEGER_32 -- First line currently displayed on the screen. -- (from TEXT_PANEL) flip_count: INTEGER_32 -- How many times has the `editor_viewport` been flipped? -- (from TEXT_PANEL) generating_type: TYPE [SELECTABLE_TEXT_PANEL] -- 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 horizontal_scrollbar: EV_HORIZONTAL_SCROLL_BAR -- (from TEXT_PANEL_IMP) icons: EDITOR_ICONS -- (from TEXT_PANEL) note option: stable inner_hbox: EV_HORIZONTAL_BOX -- (from TEXT_PANEL_IMP) is_checking_modifications: BOOLEAN -- Are document modifications being checked? -- (from TEXT_PANEL) is_initialized: BOOLEAN -- Is current text panel properly initialized? I.e. ready for use. -- (from TEXT_PANEL) Iso_8859_1: ENCODING -- ISO-8859-1 encoding. -- (from SYSTEM_ENCODINGS) ensure -- from SYSTEM_ENCODINGS instance_free: class key_code_from_key_string (key_string: READABLE_STRING_GENERAL): INTEGER_32 -- Key code value from key_string -- (from EV_KEY_CONSTANTS) require -- from EV_KEY_CONSTANTS key_string_not_void: key_string /= Void Key_strings: ARRAY [STRING_32] -- String representations of all key codes. -- (from EV_KEY_CONSTANTS) main_vbox: EV_VERTICAL_BOX -- (from TEXT_PANEL_IMP) margin: MARGIN_WIDGET -- (from TEXT_PANEL) note option: stable margin_container: EV_CELL -- (from TEXT_PANEL_IMP) new_text_displayed: like text_displayed -- New instance of `text_displayed` for Current. -- (from TEXT_PANEL) ensure -- from TEXT_PANEL new_text_not_void: Result /= Void register_observers -- Register observers for `text_displayed` -- (from TEXT_PANEL) scroll_cell: EV_CELL -- (from TEXT_PANEL_IMP) scroll_vbox: EV_VERTICAL_BOX -- (from TEXT_PANEL_IMP) Shared_environment: EV_ENVIRONMENT -- Shared EV_ENVIRONMENT object. -- (from EV_SHARED_APPLICATION) size_of_file_when_loaded: INTEGER_32 -- Number of bytes in current file when it was loaded. -- (from TEXT_PANEL) System_encoding: ENCODING -- System encoding. -- (from SYSTEM_ENCODINGS) ensure -- from SYSTEM_ENCODINGS instance_free: class system_encoding_not_void: Result /= Void text_displayed: SELECTABLE_TEXT -- text displayed in the panel. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) Utf16: ENCODING -- UTF16 Encoding. -- (from SYSTEM_ENCODINGS) ensure -- from SYSTEM_ENCODINGS instance_free: class utf16_not_void: Result /= Void Utf32: ENCODING -- UTF32 Encoding. -- (from SYSTEM_ENCODINGS) ensure -- from SYSTEM_ENCODINGS instance_free: class utf32_not_void: Result /= Void Utf8: ENCODING -- UTF8 Encoding. -- (from SYSTEM_ENCODINGS) ensure -- from SYSTEM_ENCODINGS instance_free: class utf8_not_void: Result /= Void vertical_scrollbar: EV_VERTICAL_SCROLL_BAR -- (from TEXT_PANEL_IMP) wide_text: STRING_32 -- Image of text in Current. -- (from TEXT_PANEL) widget: EV_HORIZONTAL_BOX -- Result is widget with which Current is implemented -- (from TEXT_PANEL_IMP) 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: SELECTABLE_TEXT_PANEL): 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: SELECTABLE_TEXT_PANEL): 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: SELECTABLE_TEXT_PANEL): 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 last_detection_successful: BOOLEAN -- Was last detection successful? -- (from ENCODING_DETECTOR) 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)) feature -- Status setting disable_line_numbers -- Disable line numbers -- (from TEXT_PANEL) ensure -- from TEXT_PANEL line_numbers_disabled: not line_numbers_enabled enable_line_numbers -- Enable line numbers -- (from TEXT_PANEL) ensure -- from TEXT_PANEL line_numbers_enabled: line_numbers_enabled refresh_line_number_display -- Refresh margin display in Current. -- Was declared in {TEXT_PANEL} as synonym of `refresh_margin`. -- (from TEXT_PANEL) ensure -- from TEXT_PANEL widget_displayed: has_margin = margin_container.is_show_requested refresh_margin -- Refresh margin display in Current. -- Was declared in {TEXT_PANEL} as synonym of `refresh_line_number_display`. -- (from TEXT_PANEL) ensure -- from TEXT_PANEL widget_displayed: has_margin = margin_container.is_show_requested set_focus -- Give the focus to the editor area. -- (from TEXT_PANEL) toggle_view_invisible_symbols -- Toggle `view_invisible_symbols`. -- (from TEXT_PANEL) ensure -- from TEXT_PANEL view_invisible_symbols_set: view_invisible_symbols = not old view_invisible_symbols feature -- Duplication copy (other: SELECTABLE_TEXT_PANEL) -- 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: SELECTABLE_TEXT_PANEL) -- 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: SELECTABLE_TEXT_PANEL -- 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: SELECTABLE_TEXT_PANEL) -- 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: SELECTABLE_TEXT_PANEL -- 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: SELECTABLE_TEXT_PANEL -- 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: SELECTABLE_TEXT_PANEL -- 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 -- Implementation buffered_drawable_height: INTEGER_32 -- Default size of drawable used for scrolling purposes. -- (from TEXT_PANEL) buffered_drawable_width: INTEGER_32 -- Default size of drawable used for scrolling purposes. -- (from TEXT_PANEL) buffered_line: EV_PIXMAP -- Buffer large enough to hold line information. -- (from TEXT_PANEL) common_line_count: INTEGER_32 -- Number of lines in common when performing a page down/page up operation. -- (from TEXT_PANEL) continue_editing -- Continue editing document -- Note: Called from the reload request prompt -- (from TEXT_PANEL) require -- from TEXT_PANEL file_loaded: file_loaded file_exists: file_exists text_is_fully_loaded: text_is_fully_loaded file_date_ticks: INTEGER_32 -- Retrieve file last modified date in the number of ticks -- (from TEXT_PANEL) require -- from TEXT_PANEL file_loaded: file_loaded file_exists: file_exists file_exists: BOOLEAN -- Does file exist? -- (from TEXT_PANEL) require -- from TEXT_PANEL file_loaded: file_loaded file_size: INTEGER_32 -- Retrieve file count -- (from TEXT_PANEL) require -- from TEXT_PANEL file_loaded: file_loaded file_exists: file_exists internal_focus_requested: BOOLEAN -- Should give focus after text has been fully loaded? -- (from TEXT_PANEL) internal_userset_data: like userset_data -- Buffered userset data -- (from TEXT_PANEL) last_vertical_scroll_bar_value: INTEGER_32 -- Last value of vertical_scroll_bar used within vertical_scroll_bar_changed. See -- comment of last_horizontal_scroll_bar_value for details of it's use. -- (from TEXT_PANEL) on_paint: BOOLEAN -- (from TEXT_PANEL) set_buffered_drawable_size (a_width, a_height: INTEGER_32) -- Set `buffered_drawable_width` and `buffered_drawable_height` to a_width and a_height. -- (from TEXT_PANEL) update_line_and_token_info -- Update all tokens for correct width. -- (from TEXT_PANEL) viewable_height: INTEGER_32 -- Height of Current available to view displayed items. Does -- not include width of any displayed scroll bars and/or header if shown. -- (from TEXT_PANEL) viewable_width: INTEGER_32 -- Width of Current available to view displayed items. Does -- not include width of any displayed scroll bars. -- (from TEXT_PANEL) feature -- Basic Operations check_document_modifications_and_reload -- Check document modifications and reload as necessary. -- (from TEXT_PANEL) require -- from TEXT_PANEL not_is_checking_modifications: not is_checking_modifications file_loaded: file_loaded ensure -- from TEXT_PANEL is_checking_modifications_is_false: not is_checking_modifications clear_window -- Wipe out the text area. -- (from TEXT_PANEL) flush -- Load texts immediately -- (from TEXT_PANEL) load_file_path (a_filename: PATH) -- Load contents of a_filename -- (from TEXT_PANEL) require -- from TEXT_PANEL filename_not_void: a_filename /= Void load_text (a_text: READABLE_STRING_GENERAL) -- Display a_text. -- a_text is not necessarily in UTF-32, it can be specified by `set_encoding`. -- (from TEXT_PANEL) on_font_changed -- Recompute token information for for loaded text. -- (from TEXT_PANEL) redraw_current_screen -- Redraw the current screen. Do not scroll or move the cursor, just redraw. -- (from TEXT_PANEL) refresh -- Update display. -- (from TEXT_PANEL) refresh_now -- Update display without waiting for next idle -- (from TEXT_PANEL) reset -- Reinitialize Current so that it can receive a new content. -- (from TEXT_PANEL) feature -- Basic operation show -- Show Current. -- (from TEXT_PANEL_IMP) feature -- Buffer size Default_buffered_drawable_height: INTEGER_32 = 15000 -- Default size of drawable used for scrolling purposes. -- (from TEXT_PANEL_CONSTANTS) Default_buffered_drawable_width: INTEGER_32 = 15000 -- (from TEXT_PANEL_CONSTANTS) feature -- Clipboard clipboard: EV_CLIPBOARD -- Clipboard. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) feature -- Constants Family_modern: INTEGER_32 = 5 -- (from EV_FONT_CONSTANTS) Family_roman: INTEGER_32 = 2 -- (from EV_FONT_CONSTANTS) Family_sans: INTEGER_32 = 3 -- (from EV_FONT_CONSTANTS) Family_screen: INTEGER_32 = 1 -- (from EV_FONT_CONSTANTS) Family_typewriter: INTEGER_32 = 4 -- (from EV_FONT_CONSTANTS) Key_0: INTEGER_32 = 1 -- (from EV_KEY_CONSTANTS) Key_1: INTEGER_32 = 2 -- (from EV_KEY_CONSTANTS) Key_2: INTEGER_32 = 3 -- (from EV_KEY_CONSTANTS) Key_3: INTEGER_32 = 4 -- (from EV_KEY_CONSTANTS) Key_4: INTEGER_32 = 5 -- (from EV_KEY_CONSTANTS) Key_5: INTEGER_32 = 6 -- (from EV_KEY_CONSTANTS) Key_6: INTEGER_32 = 7 -- (from EV_KEY_CONSTANTS) Key_7: INTEGER_32 = 8 -- (from EV_KEY_CONSTANTS) Key_8: INTEGER_32 = 9 -- (from EV_KEY_CONSTANTS) Key_9: INTEGER_32 = 10 -- (from EV_KEY_CONSTANTS) Key_a: INTEGER_32 = 68 -- (from EV_KEY_CONSTANTS) Key_alt: INTEGER_32 = 96 -- (from EV_KEY_CONSTANTS) Key_b: INTEGER_32 = 69 -- (from EV_KEY_CONSTANTS) Key_back_space: INTEGER_32 = 40 -- (from EV_KEY_CONSTANTS) Key_backquote: INTEGER_32 = 56 -- (from EV_KEY_CONSTANTS) Key_backslash: INTEGER_32 = 54 -- (from EV_KEY_CONSTANTS) Key_c: INTEGER_32 = 70 -- (from EV_KEY_CONSTANTS) Key_caps_lock: INTEGER_32 = 45 -- (from EV_KEY_CONSTANTS) Key_close_bracket: INTEGER_32 = 52 -- (from EV_KEY_CONSTANTS) Key_comma: INTEGER_32 = 47 -- (from EV_KEY_CONSTANTS) Key_ctrl: INTEGER_32 = 95 -- (from EV_KEY_CONSTANTS) Key_d: INTEGER_32 = 71 -- (from EV_KEY_CONSTANTS) Key_dash: INTEGER_32 = 57 -- (from EV_KEY_CONSTANTS) Key_delete: INTEGER_32 = 67 -- (from EV_KEY_CONSTANTS) Key_down: INTEGER_32 = 59 -- (from EV_KEY_CONSTANTS) Key_e: INTEGER_32 = 72 -- (from EV_KEY_CONSTANTS) Key_end: INTEGER_32 = 65 -- (from EV_KEY_CONSTANTS) Key_enter: INTEGER_32 = 41 -- (from EV_KEY_CONSTANTS) Key_equal: INTEGER_32 = 48 -- (from EV_KEY_CONSTANTS) Key_escape: INTEGER_32 = 42 -- (from EV_KEY_CONSTANTS) Key_f: INTEGER_32 = 73 -- (from EV_KEY_CONSTANTS) Key_f1: INTEGER_32 = 27 -- (from EV_KEY_CONSTANTS) Key_f10: INTEGER_32 = 36 -- (from EV_KEY_CONSTANTS) Key_f11: INTEGER_32 = 37 -- (from EV_KEY_CONSTANTS) Key_f12: INTEGER_32 = 38 -- (from EV_KEY_CONSTANTS) Key_f2: INTEGER_32 = 28 -- (from EV_KEY_CONSTANTS) Key_f3: INTEGER_32 = 29 -- (from EV_KEY_CONSTANTS) Key_f4: INTEGER_32 = 30 -- (from EV_KEY_CONSTANTS) Key_f5: INTEGER_32 = 31 -- (from EV_KEY_CONSTANTS) Key_f6: INTEGER_32 = 32 -- (from EV_KEY_CONSTANTS) Key_f7: INTEGER_32 = 33 -- (from EV_KEY_CONSTANTS) Key_f8: INTEGER_32 = 34 -- (from EV_KEY_CONSTANTS) Key_f9: INTEGER_32 = 35 -- (from EV_KEY_CONSTANTS) Key_g: INTEGER_32 = 74 -- (from EV_KEY_CONSTANTS) Key_h: INTEGER_32 = 75 -- (from EV_KEY_CONSTANTS) Key_home: INTEGER_32 = 64 -- (from EV_KEY_CONSTANTS) Key_i: INTEGER_32 = 76 -- (from EV_KEY_CONSTANTS) Key_insert: INTEGER_32 = 66 -- (from EV_KEY_CONSTANTS) Key_j: INTEGER_32 = 77 -- (from EV_KEY_CONSTANTS) Key_k: INTEGER_32 = 78 -- (from EV_KEY_CONSTANTS) Key_l: INTEGER_32 = 79 -- (from EV_KEY_CONSTANTS) Key_left: INTEGER_32 = 60 -- (from EV_KEY_CONSTANTS) Key_left_meta: INTEGER_32 = 97 -- (from EV_KEY_CONSTANTS) Key_m: INTEGER_32 = 80 -- (from EV_KEY_CONSTANTS) Key_menu: INTEGER_32 = 99 -- (from EV_KEY_CONSTANTS) Key_n: INTEGER_32 = 81 -- (from EV_KEY_CONSTANTS) Key_num_lock: INTEGER_32 = 24 -- (from EV_KEY_CONSTANTS) Key_numpad_0: INTEGER_32 = 11 -- (from EV_KEY_CONSTANTS) Key_numpad_1: INTEGER_32 = 12 -- (from EV_KEY_CONSTANTS) Key_numpad_2: INTEGER_32 = 13 -- (from EV_KEY_CONSTANTS) Key_numpad_3: INTEGER_32 = 14 -- (from EV_KEY_CONSTANTS) Key_numpad_4: INTEGER_32 = 15 -- (from EV_KEY_CONSTANTS) Key_numpad_5: INTEGER_32 = 16 -- (from EV_KEY_CONSTANTS) Key_numpad_6: INTEGER_32 = 17 -- (from EV_KEY_CONSTANTS) Key_numpad_7: INTEGER_32 = 18 -- (from EV_KEY_CONSTANTS) Key_numpad_8: INTEGER_32 = 19 -- (from EV_KEY_CONSTANTS) Key_numpad_9: INTEGER_32 = 20 -- (from EV_KEY_CONSTANTS) Key_numpad_add: INTEGER_32 = 21 -- (from EV_KEY_CONSTANTS) Key_numpad_decimal: INTEGER_32 = 26 -- (from EV_KEY_CONSTANTS) Key_numpad_divide: INTEGER_32 = 22 -- (from EV_KEY_CONSTANTS) Key_numpad_multiply: INTEGER_32 = 23 -- (from EV_KEY_CONSTANTS) Key_numpad_subtract: INTEGER_32 = 25 -- (from EV_KEY_CONSTANTS) Key_o: INTEGER_32 = 82 -- (from EV_KEY_CONSTANTS) Key_open_bracket: INTEGER_32 = 51 -- (from EV_KEY_CONSTANTS) Key_p: INTEGER_32 = 83 -- (from EV_KEY_CONSTANTS) Key_page_down: INTEGER_32 = 63 -- (from EV_KEY_CONSTANTS) Key_page_up: INTEGER_32 = 62 -- (from EV_KEY_CONSTANTS) Key_pause: INTEGER_32 = 44 -- (from EV_KEY_CONSTANTS) Key_period: INTEGER_32 = 49 -- (from EV_KEY_CONSTANTS) Key_q: INTEGER_32 = 84 -- (from EV_KEY_CONSTANTS) Key_quote: INTEGER_32 = 55 -- (from EV_KEY_CONSTANTS) Key_r: INTEGER_32 = 85 -- (from EV_KEY_CONSTANTS) Key_right: INTEGER_32 = 61 -- (from EV_KEY_CONSTANTS) Key_right_meta: INTEGER_32 = 98 -- (from EV_KEY_CONSTANTS) Key_s: INTEGER_32 = 86 -- (from EV_KEY_CONSTANTS) Key_scroll_lock: INTEGER_32 = 46 -- (from EV_KEY_CONSTANTS) Key_semicolon: INTEGER_32 = 50 -- (from EV_KEY_CONSTANTS) Key_shift: INTEGER_32 = 94 -- (from EV_KEY_CONSTANTS) Key_slash: INTEGER_32 = 53 -- (from EV_KEY_CONSTANTS) Key_space: INTEGER_32 = 39 -- (from EV_KEY_CONSTANTS) Key_t: INTEGER_32 = 87 -- (from EV_KEY_CONSTANTS) Key_tab: INTEGER_32 = 43 -- (from EV_KEY_CONSTANTS) Key_u: INTEGER_32 = 88 -- (from EV_KEY_CONSTANTS) Key_up: INTEGER_32 = 58 -- (from EV_KEY_CONSTANTS) Key_v: INTEGER_32 = 89 -- (from EV_KEY_CONSTANTS) Key_w: INTEGER_32 = 90 -- (from EV_KEY_CONSTANTS) Key_x: INTEGER_32 = 91 -- (from EV_KEY_CONSTANTS) Key_y: INTEGER_32 = 92 -- (from EV_KEY_CONSTANTS) Key_z: INTEGER_32 = 93 -- (from EV_KEY_CONSTANTS) Shape_italic: INTEGER_32 = 11 -- (from EV_FONT_CONSTANTS) Shape_regular: INTEGER_32 = 10 -- (from EV_FONT_CONSTANTS) Weight_black: INTEGER_32 = 9 -- (from EV_FONT_CONSTANTS) Weight_bold: INTEGER_32 = 8 -- (from EV_FONT_CONSTANTS) Weight_regular: INTEGER_32 = 7 -- (from EV_FONT_CONSTANTS) Weight_thin: INTEGER_32 = 6 -- (from EV_FONT_CONSTANTS) feature -- Contract support valid_family (a_family: INTEGER_32): BOOLEAN -- Is a_family a valid family value. -- (from EV_FONT_CONSTANTS) valid_key_code (a_code: INTEGER_32): BOOLEAN -- Is a_code a valid key code? -- (from EV_KEY_CONSTANTS) valid_shape (a_shape: INTEGER_32): BOOLEAN -- Is a_shape a valid shape value. -- (from EV_FONT_CONSTANTS) valid_weight (a_weight: INTEGER_32): BOOLEAN -- Is a_weight a valid weight value. -- (from EV_FONT_CONSTANTS) feature -- Cursor Management check_cursor_position -- Check if cursor position is displayed and scroll if necessary. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL text_not_empty: not text_displayed.is_empty position_cursor (a_cursor: like cursor_type; x_pos, y_pos: INTEGER_32) -- Position a_cursor as close as possible from coordinates (x_pos, y_pos). -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) feature -- Element Change register_document (a_type_name: STRING_8; a_class: DOCUMENT_CLASS) -- Register new document type -- (from DOCUMENT_TYPE_MANAGER) feature -- Encoding detector Default_encoding: ENCODING -- Detected encoding -- (from TEXT_PANEL) ensure -- from ENCODING_DETECTOR last_detection_successful_implies_not_void: last_detection_successful implies Result /= Void detect (a_string: READABLE_STRING_GENERAL) -- Detect `detected_encoding` of a_string. -- Current is used as a simple encoding detector -- that returns `system_encoding`. -- So, `last_detection_successful` is always true. -- (from TEXT_PANEL) require -- from ENCODING_DETECTOR a_string_not_void: a_string /= Void ensure -- from ENCODING_DETECTOR detected_encoding_set_when_found: last_detection_successful implies Default_encoding /= Void feature -- File Properties date_when_checked: INTEGER_32 -- Date of the open file when checked for the latest time -- (from TEXT_PANEL) file_date_already_checked: BOOLEAN -- Has the date of the file already been checked? -- (from TEXT_PANEL) file_is_up_to_date: BOOLEAN -- Is the open file up to date? -- (from TEXT_PANEL) set_reference_window (a_window: like reference_window) -- Set reference window -- (from TEXT_PANEL) feature -- Graphical interface font: EV_FONT -- Font used to display the text -- (from TEXT_PANEL) line_height: INTEGER_32 -- Height of lines in pixels -- (from TEXT_PANEL) pointer_style: EV_POINTER_STYLE -- Pointer style over the text. -- (from TEXT_PANEL) reference_window: EV_WINDOW -- Window which error dialogs will be shown relative to. Void if not set using `set_reference_window`. -- (from TEXT_PANEL) show_warning_message (a_message: READABLE_STRING_GENERAL) -- Show a_message in a dialog window -- |Use {READABLE_STRING_GENERAL}, following Vision2 interface. -- (from TEXT_PANEL) userset_fonts: SPECIAL [EV_FONT] -- Font set via set_font -- (from TEXT_PANEL) feature -- Markers fixme (comment: READABLE_STRING_8) -- Mark code that has to be "fixed" with comment. -- (from REFACTORING_HELPER) require -- from REFACTORING_HELPER comment_not_void: comment /= Void ensure -- from REFACTORING_HELPER instance_free: class to_implement (comment: READABLE_STRING_8) -- Mark code that has to be "implemented" with comment. -- (from REFACTORING_HELPER) require -- from REFACTORING_HELPER comment_not_void: comment /= Void ensure -- from REFACTORING_HELPER instance_free: class to_implement_assertion (comment: READABLE_STRING_8): BOOLEAN -- Mark assertion that has to be "implemented" with comment. -- (from REFACTORING_HELPER) require -- from REFACTORING_HELPER comment_not_void: comment /= Void ensure -- from REFACTORING_HELPER instance_free: class feature -- Memory Management recycle -- Destroy Current. require -- from TEXT_PANEL True ensure -- from TEXT_PANEL not_initialized: not is_initialized feature -- Observation add_cursor_observer (txt_observer: TEXT_OBSERVER) -- Add observer of `text_displayed` for cursor position changes. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) add_selection_observer (txt_observer: TEXT_OBSERVER) -- Add observer of `text_displayed` for selection changes. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) on_text_loaded -- Finish the panel setup as the entire text has been loaded. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from TEXT_OBSERVER True reload -- Reload the opened file from disk. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) remove_observer (txt_observer: TEXT_OBSERVER) -- Remove observer of `text_displayed`. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) 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 -- Pick and Drop drop_actions: EV_PND_ACTION_SEQUENCE -- Actions performed when user drops a stone on the text_area. -- (from TEXT_PANEL) 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 auto_scroll: BOOLEAN assign set_auto_scroll -- Auto scroll when selecting texts with mouse? -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) changed: BOOLEAN -- Has the content of the editor changed since it was -- loaded or saved? -- (from TEXT_PANEL) current_class_set: BOOLEAN -- Is `current_class` set? -- (from DOCUMENT_TYPE_MANAGER) current_cursor_position: INTEGER_32 -- Character position of current cursor in text. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) cursor_is_in_selection (cur: like cursor_type): BOOLEAN -- Is cursor in the selection? -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL cursor_is_not_void: cur /= Void cursor_is_visible: BOOLEAN -- Check if the cursor is visible in the editor. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) editor_x: INTEGER_32 -- editor_viewport absolute position. -- (from TEXT_PANEL) editor_y: INTEGER_32 -- editor_viewport absolute position. -- (from TEXT_PANEL) file_loaded: BOOLEAN -- Has a file been loaded into the text panel? -- (from TEXT_PANEL) 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 has_focus: BOOLEAN -- Does the text panel have focus? -- (from TEXT_PANEL) has_icons: BOOLEAN -- Has `icons` set? -- (from TEXT_PANEL) has_margin: BOOLEAN -- Should margin be displayed? -- (from TEXT_PANEL) has_selection: BOOLEAN -- Is there any selection in the text ? -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) initialized: BOOLEAN -- Have preferences been set and ready to be used? -- (from SHARED_EDITOR_DATA) is_empty: BOOLEAN -- Is the text panel blank? -- (from TEXT_PANEL) is_in_editor_panel (a_screen_x, a_screen_y: INTEGER_32): BOOLEAN -- Is point at absolute coordinates (a_screen_x, a_screeny) in the editor? -- (from TEXT_PANEL) is_offset_valid: BOOLEAN -- If viewport offset vaild? -- (from TEXT_PANEL) is_unix_file: BOOLEAN -- Is current file a Unix file? (i.e. is "%N" line separator?) -- (from TEXT_PANEL) is_windows_file: BOOLEAN -- Is current file a Windows file? (i.e. is "%R%N" line separator?) -- (from TEXT_PANEL) known_document_type (a_type: READABLE_STRING_GENERAL): BOOLEAN -- Is a_type a known document type? -- (from DOCUMENT_TYPE_MANAGER) left_margin_width: INTEGER_32 -- Width of left margin -- (from TEXT_PANEL) line_numbers_enabled: BOOLEAN -- Is it permitted to show line numbers in Current? -- (from TEXT_PANEL) line_numbers_visible: BOOLEAN -- Are line numbers currently visible -- (from TEXT_PANEL) number_of_lines: INTEGER_32 -- (from TEXT_PANEL) number_of_lines_displayed: INTEGER_32 -- Number of lines currently displayed on the screen. -- (from TEXT_PANEL) number_of_lines_displayed_from_text: INTEGER_32 -- Number of lines currently displayed on the screen, excluding the white space visible below the actual text. -- (from TEXT_PANEL) position_is_in_selection (x_pos, y_pos: INTEGER_32; include_selection_end: BOOLEAN): BOOLEAN -- Is point with coordinates x_pos, y_pos in the selection? -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) text_is_fully_loaded: BOOLEAN -- Is current text still being loaded? -- (from TEXT_PANEL) token_at (x, y: INTEGER_32): EDITOR_TOKEN -- Token at position (x, y) -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) token_at_screen (x, y: INTEGER_32): EDITOR_TOKEN -- Token at screen position (x, y) -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) view_invisible_symbols: BOOLEAN -- Are the spaces, the tabulations and the end_of_line characters visible? -- (from TEXT_PANEL) 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 -- Status Setting display_line_with_context (l_number: INTEGER_32) -- display line number l_number in the editor -- center display on this line if it is not yet displayed -- scroll otherwise. -- (from TEXT_PANEL) require -- from TEXT_PANEL line_number_is_valid: 0 < l_number and then l_number <= number_of_lines text_loaded: text_is_fully_loaded on_focus -- Editor received focus -- (from TEXT_PANEL) redraw_current_line -- Redraw the line where the cursor is -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) set_auto_scroll (a_auto_scroll: BOOLEAN) -- Set `auto_scroll` with a_auto_scroll. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) ensure -- from KEYBOARD_SELECTABLE_TEXT_PANEL auto_scroll_set: auto_scroll = a_auto_scroll 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_cursors (a_cursors: like cursors) -- Sets `cursors` with a_cursors -- (from TEXT_PANEL) require -- from TEXT_PANEL a_cursors_not_void: a_cursors /= Void ensure -- from TEXT_PANEL cursors_set: cursors = a_cursors set_display_scrollbars (a_display: BOOLEAN) -- Set `display_scrollbars` with a_display. -- Show or hide the scrollbars accordingly. -- (from TEXT_PANEL) set_editor_width (a_width: INTEGER_32) -- If a_width is greater than `editor_width`, assign a_width to `editor_width` -- update display if necessary. -- (from TEXT_PANEL) set_encoding (a_encoding: like user_encoding) -- Set `encoding` with a_encoding -- (from TEXT_PANEL) ensure -- from TEXT_PANEL encoding_set: user_encoding = a_encoding set_first_line_displayed (fld: INTEGER_32; refresh_if_necessary: BOOLEAN) -- Assign fld to `first_line_displayed`. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from TEXT_PANEL fld_large_enough: fld > 0 fld_small_enough: fld <= text_displayed.number_of_lines.max (1) fld_in_range: vertical_scrollbar.value_range.has (fld) set_font_offset (a_offset: INTEGER_32) -- Set font_offset -- (from TEXT_PANEL) set_fonts (a_fonts: like userset_fonts) -- Set userset_font with a_font. -- (from TEXT_PANEL) set_icons (a_icons: like icons) -- Sets `icons` with a_icons -- (from TEXT_PANEL) require -- from TEXT_PANEL a_icons_not_void: a_icons /= Void ensure -- from TEXT_PANEL icons_set: icons = a_icons set_left_margin_width (a_width: like left_margin_width) -- Set `left_margin_width` with a_width. -- Set with zero to use preference value. -- (from TEXT_PANEL) set_line_height (a_height: like line_height) -- Set userset_font_height -- (from TEXT_PANEL) set_link_between (a_start_char_pos, a_end_char_pos: INTEGER_32; a_link: BOOLEAN; a_pebble: ANY) -- Enable link between positions. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL start_char_valid: a_start_char_pos <= text_displayed.text_length and then a_start_char_pos > 0 end_char_valid: a_end_char_pos <= text_displayed.text_length and then a_end_char_pos >= a_start_char_pos set_offset (an_offset: INTEGER_32) -- Assign an_offset to `offset` and update scrollbar if necessary. -- (from TEXT_PANEL) set_text (a_text: like text_displayed; a_filename: STRING_8) -- Set `text_displayed` to `text`. If text is associated to a file store then -- a_filename should be that file. -- (from TEXT_PANEL) require -- from TEXT_PANEL text_not_void: a_text /= Void setup_editor (first_line_to_display: INTEGER_32) -- Update Current to display at line first_line_to_display on current text. -- (from TEXT_PANEL) feature -- Text Selection copy_selection -- Copy current selection to clipboard. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL text_is_not_empty: number_of_lines /= 0 deselect_all -- Forget selection if there is one. -- Was declared in {KEYBOARD_SELECTABLE_TEXT_PANEL} as synonym of `disable_selection`. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) dim_selection -- Dim selection to indicate panel has lost focus. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) disable_selection -- Forget selection if there is one. -- Was declared in {KEYBOARD_SELECTABLE_TEXT_PANEL} as synonym of `deselect_all`. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) select_all -- Select the entire text. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL text_is_not_empty: number_of_lines > 0 select_lines (a_start, a_end: INTEGER_32) -- Select lines between a_start and a_end. Do not scroll to new cursor position. -- Selection will be from first character of a_start line and last character of a_end line. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL start_valid: a_start > 0 and a_start <= number_of_lines end_valid: a_end > 0 and a_end <= number_of_lines range_valid: a_start <= a_end select_region (start_pos, end_pos: INTEGER_32) -- Select characters between indexes start_pos and end_pos. -- Do not scroll to selected position. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL text_loading_completed: text_is_fully_loaded right_order: start_pos <= end_pos text_is_not_empty: not is_empty character_to_select: start_pos /= end_pos show_selection (always_scroll: BOOLEAN) -- Center the display on the selected text. -- If always_scroll, the beginning of the selection appear in the middle of the panel, -- else the selection appear in the middle of the panel only if it was not already displayed. -- (from KEYBOARD_SELECTABLE_TEXT_PANEL) require -- from KEYBOARD_SELECTABLE_TEXT_PANEL text_is_not_empty: number_of_lines > 0 selection_exists: has_selection invariant -- from KEYBOARD_SELECTABLE_TEXT_PANEL stored_cursor_line_not_negative: stored_cursor_line >= 0 stored_cursor_char_not_negative: stored_cursor_char >= 0 stored_first_line_not_negative: stored_first_line >= 0 -- from TEXT_PANEL offset_view: is_initialized implies is_offset_valid buffered_line_not_void: is_initialized implies buffered_line /= Void -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note copyright: "Copyright (c) 1984-2016, 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 SELECTABLE_TEXT_PANEL -- Generated by Eiffel Studio --
For more details: eiffel.org