INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Edit control which can contain multiple lines. ", "WEL: library of reusable components for Eiffel. ", "Based on WEL library for ISE Eiffel, used with permission. "
project: "Windows Eiffel Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997-2001 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
cluster: wel
class WEL_MULTIPLE_LINE_EDIT
inherit

WEL_EDIT
redefine
scroll,
set_caret_position,
set_selection
end

WEL_ES_CONSTANTS
export
{NONE}
all
end
creation

make,
make_by_id
feature -- Basic operations

scroll (horizontal, vertical: INTEGER)
-- Scroll the text vertically and horizontally.
-- `horizontal' is the number of characters to
-- scroll horizontally, `vertical' is the number
-- of lines to scroll vertically.
feature -- Status setting

set_selection (start_position, end_position: INTEGER)
-- Set the selection between `start_position'
-- and `end_position'.
-- If `scroll_caret_at_selection' is True, the
-- caret will be scrolled to `start_position'.

set_caret_position (position: INTEGER)
-- Set the caret position with `position'.
-- If `scroll_caret_at_selection' is True, the
-- caret will be scrolled to `position'.

set_formatting_rect (rect: WEL_RECT)
-- Set `formatting_rect' with `rect'.
require
exists: exists
rect_not_void: rect /= void

set_tab_stops (tab: INTEGER)
-- Set tab stops at every `tab' dialog box units.
require
exists: exists
positive_tab: tab > 0

set_tab_stops_array (tab: ARRAY [INTEGER])
-- Set tab stops using the values of `tab'.
require
exists: exists
tab_not_void: tab /= void
tab_large_enough: tab.count > 1

set_default_tab_stops
-- Set tab stops at every 32 dialog box units.
require
exists: exists

enable_scroll_caret_at_selection
-- Set `scroll_caret_at_selection' to True.
-- The caret will be scrolled at the selection after
-- a call to `set_selection'.
require
exists: exists
ensure
scroll_caret_at_selection_enabled: scroll_caret_at_selection

disable_scroll_caret_at_selection
-- Set `scroll_caret_at_selection' to False.
-- The caret will not be scrolled at the selection
-- after a call to `set_selection'.
require
exists: exists
ensure
scroll_caret_at_selection_disabled: not scroll_caret_at_selection
feature -- Status report

line_count: INTEGER
-- Number of lines
require
exists: exists
ensure
positive_result: Result >= 0

current_line_index: INTEGER
-- Index of the line that contains the caret.
require
exists: exists
ensure
positive_result: Result >= 0

first_visible_line: INTEGER
-- Upper most visible line
require
exists: exists
ensure
positive_result: Result >= 0
result_small_enough: Result < line_count

current_line_number: INTEGER
-- Line number of the line that contains the caret.
require
exists: exists
ensure
positive_result: Result >= 0
result_small_enough: Result < line_count

line_length (i: INTEGER): INTEGER
-- Length of the `i'th line
require
exists: exists
i_large_enough: i >= 0
i_small_enough: i < line_count
ensure
positive_result: Result >= 0
result_ok: Result = line (i).count

line (i: INTEGER): STRING
-- `i'th line
require
exists: exists
i_large_enough: i >= 0
i_small_enough: i < line_count
ensure
result_exists: Result /= void
count_ok: Result.count = line_length (i)

line_index (i: INTEGER): INTEGER
-- Number of characters from the beginning of the edit
-- control to the zero-based line `i'.
-- Retrieve a character index for a given line number.
require
exists: exists
i_large_enough: i >= 0
i_small_enough: i < line_count
ensure
positive_result: Result >= 0

line_from_char (i: INTEGER): INTEGER
-- Index of the line that contains the character
-- index `i'. A character index is the number of
-- characters from the beginning of the edit control.
require
exists: exists
ensure
positive_result: Result >= 0

scroll_caret_at_selection: BOOLEAN
end -- class WEL_MULTIPLE_LINE_EDIT

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES