Automatic generation produced by ISE Eiffel
note description: "Token that describe one or several tabulations." legal: "See notice at end of class." status: "See notice at end of class." author: "Arnaud PICHERY [ aranud@mail.dotcom.fr ]" date: "$Date: 2018-12-18 09:07:47 -0900 (Tue, 18 Dec 2018) $" revision: "$Revision: 102628 $" class interface EDITOR_TOKEN_TABULATION create make (number: INTEGER_32) require number_valid: number > 0 ensure wide_image_not_void: wide_image /= Void length_positive: length > 0 feature -- Access character_length: INTEGER_32 -- Number characters represented by the token. -- (from EDITOR_TOKEN) data: ANY -- Associated data -- (from EDITOR_TOKEN) generating_type: TYPE [EDITOR_TOKEN_TABULATION] -- 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 length: INTEGER_32 -- Operational number of characters represented by the token. -- i.e. EOL of %R%N is 1 which is treated as one character when -- placing cursor, with character length 2. -- (from EDITOR_TOKEN) pebble: ANY -- pebble to be picked when user right-clicks -- on this token. -- Only cursors are used in the class STONE. -- (from EDITOR_TOKEN) position: INTEGER_32 -- position in pixels of the first character of -- this token -- (from EDITOR_TOKEN) wide_image: STRING_32 -- String representation of the token -- (from EDITOR_TOKEN) 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: EDITOR_TOKEN_TABULATION): 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: EDITOR_TOKEN_TABULATION): 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: EDITOR_TOKEN_TABULATION): 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 debug_output: STRING_32 -- String that should be displayed in debugger to represent Current. -- (from EDITOR_TOKEN) ensure -- from DEBUG_OUTPUT result_not_void: Result /= Void has_tabulation: BOOLEAN -- Does Current contain tabs? -- (from EDITOR_TOKEN) Has_tabulation_flag: NATURAL_8 = 1 -- (from EDITOR_TOKEN) is_clickable: BOOLEAN -- Is Current clickable? -- (from EDITOR_TOKEN) Is_clickable_flag: NATURAL_8 = 16 -- (from EDITOR_TOKEN) is_fake: BOOLEAN -- Is current fake? -- (from EDITOR_TOKEN) Is_fake_flag: NATURAL_8 = 8 -- (from EDITOR_TOKEN) is_highlighted: BOOLEAN -- Is current highlighted? -- (from EDITOR_TOKEN) Is_highlighted_flag: NATURAL_8 = 4 -- (from EDITOR_TOKEN) is_link: BOOLEAN -- Is Current a link? -- (from EDITOR_TOKEN) Is_link_flag: NATURAL_8 = 32 -- (from EDITOR_TOKEN) is_mouse_over: BOOLEAN -- Is mouse over current? -- (from EDITOR_TOKEN) Is_mouse_over_flag: NATURAL_8 = 64 -- (from EDITOR_TOKEN) is_selectable: BOOLEAN -- Is this token part of a group of selectable tokens? -- (from EDITOR_TOKEN) Is_selectable_flag: NATURAL_8 = 2 -- (from EDITOR_TOKEN) Is_tabulation: BOOLEAN = True -- Is current a tabulation token? 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)) set_token_status_flag (a_flag: NATURAL_8; a_flag_value: BOOLEAN) -- (from EDITOR_TOKEN) token_status_flags: NATURAL_8 -- Flags for token status report. -- (from EDITOR_TOKEN) feature -- Duplication copy (other: EDITOR_TOKEN_TABULATION) -- 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: EDITOR_TOKEN_TABULATION) -- 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: EDITOR_TOKEN_TABULATION -- 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: EDITOR_TOKEN_TABULATION) -- 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: EDITOR_TOKEN_TABULATION -- 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: EDITOR_TOKEN_TABULATION -- 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: EDITOR_TOKEN_TABULATION -- 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 -- Color background_color: EV_COLOR -- (from EDITOR_TOKEN) focus_out_selected_background_color: EV_COLOR -- (from EDITOR_TOKEN) selected_background_color: EV_COLOR -- (from EDITOR_TOKEN) selected_text_color: EV_COLOR -- (from EDITOR_TOKEN) text_color: EV_COLOR -- (from EDITOR_TOKEN) feature -- Color ids background_color_id: INTEGER_32 -- Background color -- (from EDITOR_TOKEN_BLANK) Comments_background_color_id: INTEGER_32 = 16 -- Color used to display comments background -- (from EDITOR_TOKEN_IDS) Comments_text_color_id: INTEGER_32 = 15 -- Color used to display comments -- (from EDITOR_TOKEN_IDS) Cursor_line_highlight_color_id: INTEGER_32 = 23 -- Background color used to highlight line with cursor in it -- (from EDITOR_TOKEN_IDS) focus_out_selected_background_color_id: INTEGER_32 -- (from EDITOR_TOKEN) Focus_out_selection_background_color_id: INTEGER_32 = 8 -- Background color used to display selected text when focus losed -- (from EDITOR_TOKEN_IDS) Highlight_background_color_id: INTEGER_32 = 22 -- Background color used to highlight lines -- (from EDITOR_TOKEN_IDS) Highlight_text_color_id: INTEGER_32 = 21 -- Background color used to highlight lines -- (from EDITOR_TOKEN_IDS) Keyword_background_color_id: INTEGER_32 = 12 -- Background color used to display keywords -- (from EDITOR_TOKEN_IDS) Keyword_text_color_id: INTEGER_32 = 11 -- Color used to display keywords -- (from EDITOR_TOKEN_IDS) Line_number_text_color_id: INTEGER_32 = 3 -- Color for line number text -- (from EDITOR_TOKEN_IDS) Link_background_color_id: INTEGER_32 = 25 -- Background color for links -- (from EDITOR_TOKEN_IDS) Link_color_id: INTEGER_32 = 24 -- Link color id -- (from EDITOR_TOKEN_IDS) Margin_background_color_id: INTEGER_32 = 1 -- Color for margin background -- (from EDITOR_TOKEN_IDS) Margin_separator_color_id: INTEGER_32 = 2 -- Color for margin separator -- (from EDITOR_TOKEN_IDS) max_color_id: INTEGER_32 -- Maximal id of color. -- (from EDITOR_TOKEN_IDS) Mouse_over_link_background_color_id: INTEGER_32 = 27 -- Link color when mouse is over -- (from EDITOR_TOKEN_IDS) Mouse_over_link_color_id: INTEGER_32 = 26 -- Link color when mouse is over -- (from EDITOR_TOKEN_IDS) Normal_background_color_id: INTEGER_32 = 5 -- Background color used to display normal text -- (from EDITOR_TOKEN_IDS) Normal_text_color_id: INTEGER_32 = 4 -- Color used to display normal text -- (from EDITOR_TOKEN_IDS) Number_background_color_id: INTEGER_32 = 18 -- Background color used to display numbers -- (from EDITOR_TOKEN_IDS) Number_text_color_id: INTEGER_32 = 17 -- Color used to display numbers -- (from EDITOR_TOKEN_IDS) Operator_background_color_id: INTEGER_32 = 20 -- Background color used to display operator -- (from EDITOR_TOKEN_IDS) Operator_text_color_id: INTEGER_32 = 19 -- Color used to display operator -- (from EDITOR_TOKEN_IDS) Quoted_feature_background_color_id: INTEGER_32 = 28 -- (from EDITOR_TOKEN_IDS) Quoted_feature_text_color_id: INTEGER_32 = 27 -- (from EDITOR_TOKEN_IDS) selected_background_color_id: INTEGER_32 -- (from EDITOR_TOKEN) selected_text_color_id: INTEGER_32 -- (from EDITOR_TOKEN) Selection_background_color_id: INTEGER_32 = 7 -- Background color used to display selected text when has focus -- (from EDITOR_TOKEN_IDS) Selection_text_color_id: INTEGER_32 = 6 -- Color used to display selected text -- (from EDITOR_TOKEN_IDS) Spaces_background_color_id: INTEGER_32 = 14 -- Background color used to display spaces -- (from EDITOR_TOKEN_IDS) Spaces_text_color_id: INTEGER_32 = 13 -- Color used to display spaces -- (from EDITOR_TOKEN_IDS) String_background_color_id: INTEGER_32 = 10 -- Background color used to display strings -- (from EDITOR_TOKEN_IDS) String_text_color_id: INTEGER_32 = 9 -- Color used to display strings -- (from EDITOR_TOKEN_IDS) text_color_id: INTEGER_32 -- (from EDITOR_TOKEN_BLANK) 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) 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_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 -- Display display (d_y: INTEGER_32; a_device: EV_DRAWABLE; panel: TEXT_PANEL) -- Display the current token on device context dc -- at the coordinates (`position`,d_y) -- (from EDITOR_TOKEN_BLANK) display_half_selected (d_y: INTEGER_32; start_selection, end_selection: INTEGER_32; a_device: EV_DRAWABLE; panel: TEXT_PANEL) -- Display the current token on device context dc -- at the coordinates (`position`,d_y) with its -- selected state from begining to pivot -- (from EDITOR_TOKEN_BLANK) require -- from EDITOR_TOKEN device_not_void: a_device /= Void panel_not_void: panel /= Void display_selected (d_y: INTEGER_32; a_device: EV_DRAWABLE; panel: TEXT_PANEL) -- Display the current token on device context dc -- at the coordinates (`position`,d_y) with its -- selected state. -- (from EDITOR_TOKEN_BLANK) require -- from EDITOR_TOKEN device_not_void: a_device /= Void panel_not_void: panel /= Void display_with_offset (x_offset, d_y: INTEGER_32; device: EV_DRAWABLE; panel: TEXT_PANEL) -- Display the current token on device context dc at the coordinates (x_offset,d_y) -- (from EDITOR_TOKEN_BLANK) feature -- Font font: EV_FONT -- Font of current. -- (from EDITOR_TOKEN) font_id: INTEGER_32 -- Font id. -- (from EDITOR_TOKEN) font_offset: INTEGER_32 -- Number of pixels from top of line to beginning of drawing operation -- (from EDITOR_TOKEN) font_width: INTEGER_32 -- Width of character in the editor. -- (from EDITOR_TOKEN) require -- from EDITOR_TOKEN is_fixed_width: is_fixed_width is_fixed_width: BOOLEAN -- Is `font` a fixed-width font? -- (from EDITOR_TOKEN) feature -- Font ids Editor_font_id: INTEGER_32 = 1 -- (from EDITOR_TOKEN_IDS) Keyword_font_id: INTEGER_32 = 2 -- (from EDITOR_TOKEN_IDS) max_font_id: INTEGER_32 -- Maximal id of font -- (from EDITOR_TOKEN_IDS) feature -- Implementation of clickable and editable text draw_text_top_left (pos, d_y: INTEGER_32; text_to_be_drawn: STRING_32; device: EV_DRAWABLE) -- (from EDITOR_TOKEN) is_text: BOOLEAN -- is this a text token ? -- (from EDITOR_TOKEN) Platform_is_windows: BOOLEAN -- Is the current platform Windows? -- (from EDITOR_TOKEN) pos_in_text: INTEGER_32 -- Position of the token in the text in characters -- (from EDITOR_TOKEN) set_is_clickable (a_clickable: BOOLEAN) -- Set `is_clickable` with a_clickable. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN is_clickable_set: is_clickable = a_clickable set_pos_in_text (pit: INTEGER_32) -- Does nothing : redefined in editor_token_text -- (from EDITOR_TOKEN) require -- from EDITOR_TOKEN pit_non_negative: pit >= 0 ensure -- from EDITOR_TOKEN pos_in_text_set: pos_in_text = pit feature -- Initialisation make (number: INTEGER_32) require number_valid: number > 0 ensure wide_image_not_void: wide_image /= Void length_positive: length > 0 feature -- Linkable functions next: EDITOR_TOKEN -- Next token in the line. Void if none. -- (from EDITOR_TOKEN) previous: EDITOR_TOKEN -- Previous token in the line. Void if none -- (from EDITOR_TOKEN) set_next_token (next_token: EDITOR_TOKEN) -- set `next` to next_token. `next` can -- be Void if there are no next token. -- (from EDITOR_TOKEN) set_previous_token (previous_token: EDITOR_TOKEN) -- set `next` to next_token. `next` can -- be Void if there are no next token. -- (from EDITOR_TOKEN) update_position -- Update the value of `position`. -- (from EDITOR_TOKEN) 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 initialized: BOOLEAN -- Have preferences been set and ready to be used? -- (from SHARED_EDITOR_DATA) 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 Report Is_blank: BOOLEAN = True -- Is this a blank token? -- (from EDITOR_TOKEN_BLANK) feature -- Status Setting set_background_color (a_color: like userset_background_color) -- Set `background_color` with a_color. -- Void to use color from preferences. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN userset_background_color_set: userset_background_color = a_color set_data (a_data: like data) -- Set `data` with a_data. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN data_set: data = a_data set_focus_out_selected_background_color (a_color: like userset_focus_out_selected_background_color) -- Set `focus_out_selected_background_color` with a_color. -- Void to use color from preferences. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN userset_focus_out_selected_background_color_set: userset_focus_out_selected_background_color = a_color set_highlighted (b: BOOLEAN) -- Highlight -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN value_set: is_highlighted = b set_is_fake (b: BOOLEAN) -- Set `is_fake` to b. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN value_set: is_fake = b set_is_link (b: BOOLEAN) -- Set `is_link` to b. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN value_set: is_link = b set_is_mouse_over (b: BOOLEAN) -- Set `is_mouse_over` to b. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN value_set: is_mouse_over = b set_is_selectable (b: BOOLEAN) -- Set `is_selectable` to b -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN value_set: is_selectable = b set_pebble (a_pebble: like pebble) -- Set `pebble` to a_pebble -- (from EDITOR_TOKEN) set_selected_background_color (a_color: like userset_selected_background_color) -- Set `selected_background_color` with a_color. -- Void to use color from preferences. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN userset_selected_background_color_set: userset_selected_background_color = a_color set_selected_text_color (a_color: like userset_selected_text_color) -- Set `selected_text_color` with a_color. -- Void to use color from preferences. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN userset_selected_text_color_set: userset_selected_text_color = a_color set_text_color (a_color: like userset_text_color) -- Set `text_color` with a_color. -- Void to use color from preferences. -- (from EDITOR_TOKEN) ensure -- from EDITOR_TOKEN userset_text_color_set: userset_text_color = a_color feature -- Token Type Status Report is_feature_start: BOOLEAN -- (from EDITOR_TOKEN) is_margin_token: BOOLEAN -- Is the current token a margin token? -- A margin token is a behavior token and does not -- contain any editable text. An example of a beginning token is -- the EDITOR_TOKEN_BREAKPOINT or EDITOR_TOKEN_LINE_NUMBER. Default is False. -- (from EDITOR_TOKEN) is_new_line: BOOLEAN -- Is current a new line token? -- (from EDITOR_TOKEN) may_contain_tabulation: BOOLEAN -- May Current contain tabulation marks? -- (from EDITOR_TOKEN) feature -- Visitor process (a_visitor: TOKEN_VISITOR) -- Visitor require -- from EDITOR_TOKEN visitor_not_void: a_visitor /= Void feature -- Width & Height get_substring_width (n: INTEGER_32): INTEGER_32 -- Conpute the width in pixels of the first -- n characters of the current string. require -- from EDITOR_TOKEN n_valid: n >= 0 retrieve_position_by_width (a_width: INTEGER_32): INTEGER_32 -- Return the character situated under the a_width-th -- pixel. require -- from EDITOR_TOKEN a_width_valid: a_width >= 0 ensure -- from EDITOR_TOKEN result_positive: Result > 0 result_small_enough: Result <= length width: INTEGER_32 -- Width in pixel of the entire token. feature -- Width & height height: INTEGER_32 -- Line height -- (from EDITOR_TOKEN) update_width -- update value of `width` -- (from EDITOR_TOKEN) invariant -- from EDITOR_TOKEN wide_image_not_void: wide_image /= Void width_positive_or_null: width >= 0 previous = Void implies position = 0 -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) -- from EDITOR_TOKEN_IDS invariant_clause: True note copyright: "Copyright (c) 1984-2018, 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 EDITOR_TOKEN_TABULATION -- Generated by Eiffel Studio --
For more details: eiffel.org