Automatic generation produced by ISE Eiffel
note description: "A token that describes an image glyph." legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2011-10-14 17:54:44 -0700 (Fri, 14 Oct 2011) $" revision: "$Revision: 87478 $" class interface EDITOR_TOKEN_GLYPH create make (a_glyph: like glyph) -- Initialize token with a predefined image glyph require not_a_glyph_is_destroyed: not a_glyph.is_destroyed ensure glyph_set: glyph = a_glyph feature -- Access generating_type: TYPE [detachable EDITOR_TOKEN_GLYPH] -- 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 glyph: attached EV_PIXEL_BUFFER -- Graphical image. height: INTEGER_32 length: INTEGER_32 -- Number of characters represented by the token. -- (from EDITOR_TOKEN) padding: INTEGER_32 -- Padding of glyph pebble: detachable 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) width: INTEGER_32 -- Width in pixel of the entire token. feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are `a' and `b' either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY 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: detachable ANY; b: like arg #1): BOOLEAN -- Are `a' and `b' either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal (other: attached EDITOR_TOKEN_GLYPH): 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: attached EDITOR_TOKEN_GLYPH): 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: detachable 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 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 (other: attached EDITOR_TOKEN_GLYPH): 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_8 -- 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_selectable: BOOLEAN -- Is this token part of a group of selectable tokens? -- (from EDITOR_TOKEN) Is_selectable_flag: NATURAL_8 = 2 -- (from EDITOR_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: attached EDITOR_TOKEN_GLYPH) -- 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: attached EDITOR_TOKEN_GLYPH) -- 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: attached EDITOR_TOKEN_GLYPH -- 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: attached EDITOR_TOKEN_GLYPH) -- 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: attached EDITOR_TOKEN_GLYPH -- 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: attached EDITOR_TOKEN_GLYPH -- New object equal to `Current' -- twin calls copy; to change copying/twining semantics, redefine copy. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen as_attached: attached EDITOR_TOKEN_GLYPH -- Attached version of Current -- (Can be used during transitional period to convert -- non-void-safe classes to void-safe ones.) -- (from ANY) frozen default: detachable EDITOR_TOKEN_GLYPH -- 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) default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) 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 -- (from EDITOR_TOKEN) 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 = 22 -- 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_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) 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) 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) 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) feature -- Display display (d_y: INTEGER_32; device: EV_DRAWABLE; panel: TEXT_PANEL) -- Display the current token on device context `dc' -- at the coordinates (position,`d_y') display_half_selected (d_y: INTEGER_32; start_selection, end_selection: INTEGER_32; 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 beginning to `pivot' -- (from EDITOR_TOKEN) require -- from EDITOR_TOKEN device_not_void: device /= Void panel_not_void: panel /= Void display_selected (d_y: INTEGER_32; 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) require -- from EDITOR_TOKEN device_not_void: 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',`d_y') 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 -- Linkable functions next: detachable EDITOR_TOKEN -- Next token in the line. Void if none. -- (from EDITOR_TOKEN) previous: detachable EDITOR_TOKEN -- Previous token in the line. Void if none -- (from EDITOR_TOKEN) set_next_token (next_token: detachable 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: detachable 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 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: detachable ANY) -- Write terse external representation of `o' -- on standard output. -- (from ANY) 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 operating_environment_not_void: Result /= Void feature -- Query frozen get_substring_width (n: INTEGER_32): INTEGER_32 -- Compute the width in pixels of the first -- `n' characters of the current string. require -- from EDITOR_TOKEN n_valid: n >= 0 initialized: BOOLEAN -- (from SHARED_EDITOR_DATA) frozen 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 feature -- Resources editor_preferences: EDITOR_DATA -- Editor preferences -- (from SHARED_EDITOR_DATA) require -- from SHARED_EDITOR_DATA initialized: initialized Panel_manager: TEXT_PANEL_MANAGER -- List of open panels -- (from SHARED_EDITOR_DATA) 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_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_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_blank: BOOLEAN -- Is this a blank token? -- (from EDITOR_TOKEN) 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) is_tabulation: BOOLEAN -- Is current a tabulation 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 update_width -- update value of width -- (from EDITOR_TOKEN) invariant not_glyph_is_destroyed: not glyph.is_destroyed length_is_one: length = 1 is_fake: is_fake -- 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-2007, 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 EDITOR_TOKEN_GLYPH -- Generated by Eiffel Studio --
For more details: docs.eiffel.com